Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys/dev/ic Pull up following revision(s) (requested by jm...
details: https://anonhg.NetBSD.org/src/rev/0684e2f6ec85
branches: netbsd-8
changeset: 435070:0684e2f6ec85
user: martin <martin%NetBSD.org@localhost>
date: Mon Jun 18 15:39:49 2018 +0000
description:
Pull up following revision(s) (requested by jmcneill in ticket #885):
sys/dev/ic/dwc_gmac.c: revision 1.47
Avoid calling bus_dmamap_sync with len=0
diffstat:
sys/dev/ic/dwc_gmac.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diffs (37 lines):
diff -r be03ae3ed0ca -r 0684e2f6ec85 sys/dev/ic/dwc_gmac.c
--- a/sys/dev/ic/dwc_gmac.c Mon Jun 18 15:37:46 2018 +0000
+++ b/sys/dev/ic/dwc_gmac.c Mon Jun 18 15:39:49 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_gmac.c,v 1.40.6.3 2018/01/13 04:44:29 snj Exp $ */
+/* $NetBSD: dwc_gmac.c,v 1.40.6.4 2018/06/18 15:39:49 martin Exp $ */
/*-
* Copyright (c) 2013, 2014 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.40.6.3 2018/01/13 04:44:29 snj Exp $");
+__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.40.6.4 2018/06/18 15:39:49 martin Exp $");
/* #define DWC_GMAC_DEBUG 1 */
@@ -636,11 +636,13 @@
TX_DESC_OFFSET(start),
TX_DESC_OFFSET(AWGE_TX_RING_COUNT)-TX_DESC_OFFSET(start),
ops);
- /* sync from start of ring to 'end' */
- bus_dmamap_sync(sc->sc_dmat, sc->sc_dma_ring_map,
- TX_DESC_OFFSET(0),
- TX_DESC_OFFSET(end)-TX_DESC_OFFSET(0),
- ops);
+ if (TX_DESC_OFFSET(end) - TX_DESC_OFFSET(0) > 0) {
+ /* sync from start of ring to 'end' */
+ bus_dmamap_sync(sc->sc_dmat, sc->sc_dma_ring_map,
+ TX_DESC_OFFSET(0),
+ TX_DESC_OFFSET(end)-TX_DESC_OFFSET(0),
+ ops);
+ }
}
static void
Home |
Main Index |
Thread Index |
Old Index