summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_iwnreg.h
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2009-10-24 20:17:18 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2009-10-24 20:17:18 +0000
commitd0a6f98358ceeddb8063a66cbb2c6eeaf8af0b9b (patch)
treee88044646551e057ff651a3489ce89d1bd095cc3 /sys/dev/pci/if_iwnreg.h
parent7baa71c51b9dbf84ab1d35c621b2e28f06e39a46 (diff)
add explicit barriers for read/write accesses to prph and internal memory.
Diffstat (limited to 'sys/dev/pci/if_iwnreg.h')
-rw-r--r--sys/dev/pci/if_iwnreg.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/pci/if_iwnreg.h b/sys/dev/pci/if_iwnreg.h
index 68de80122f3..b4addc90e65 100644
--- a/sys/dev/pci/if_iwnreg.h
+++ b/sys/dev/pci/if_iwnreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwnreg.h,v 1.28 2009/10/24 19:00:40 damien Exp $ */
+/* $OpenBSD: if_iwnreg.h,v 1.29 2009/10/24 20:17:17 damien Exp $ */
/*-
* Copyright (c) 2007, 2008
@@ -1604,3 +1604,11 @@ static const char * const iwn_fw_errmsg[] = {
#define IWN_CLRBITS(sc, reg, mask) \
IWN_WRITE(sc, reg, IWN_READ(sc, reg) & ~(mask))
+
+#define IWN_BARRIER_WRITE(sc) \
+ bus_space_barrier((sc)->sc_st, (sc)->sc_sh, 0, (sc)->sc_sz, \
+ BUS_SPACE_BARRIER_WRITE)
+
+#define IWN_BARRIER_READ_WRITE(sc) \
+ bus_space_barrier((sc)->sc_st, (sc)->sc_sh, 0, (sc)->sc_sz, \
+ BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE)