Module Name: src
Committed By: nonaka
Date: Tue Jan 17 08:35:16 UTC 2017
Modified Files:
src/sys/dev/pci: if_iwm.c
Log Message:
only bus_dmamap_sync(9) once for ICT region.
To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/dev/pci/if_iwm.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/if_iwm.c
diff -u src/sys/dev/pci/if_iwm.c:1.61 src/sys/dev/pci/if_iwm.c:1.62
--- src/sys/dev/pci/if_iwm.c:1.61 Fri Jan 13 11:21:47 2017
+++ src/sys/dev/pci/if_iwm.c Tue Jan 17 08:35:16 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: if_iwm.c,v 1.61 2017/01/13 11:21:47 nonaka Exp $ */
+/* $NetBSD: if_iwm.c,v 1.62 2017/01/17 08:35:16 nonaka Exp $ */
/* OpenBSD: if_iwm.c,v 1.148 2016/11/19 21:07:08 stsp Exp */
#define IEEE80211_NO_HT
/*
@@ -107,7 +107,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.61 2017/01/13 11:21:47 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.62 2017/01/17 08:35:16 nonaka Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -7221,13 +7221,13 @@ iwm_intr(void *arg)
while (tmp) {
r1 |= tmp;
ict[sc->ict_cur] = 0; /* Acknowledge. */
- bus_dmamap_sync(sc->sc_dmat, sc->ict_dma.map,
- &ict[sc->ict_cur] - ict, sizeof(*ict),
- BUS_DMASYNC_PREWRITE);
sc->ict_cur = (sc->ict_cur + 1) % IWM_ICT_COUNT;
tmp = htole32(ict[sc->ict_cur]);
}
+ bus_dmamap_sync(sc->sc_dmat, sc->ict_dma.map,
+ 0, sc->ict_dma.size, BUS_DMASYNC_PREWRITE);
+
/* this is where the fun begins. don't ask */
if (r1 == 0xffffffff)
r1 = 0;