diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2009-10-24 20:17:18 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2009-10-24 20:17:18 +0000 |
commit | d0a6f98358ceeddb8063a66cbb2c6eeaf8af0b9b (patch) | |
tree | e88044646551e057ff651a3489ce89d1bd095cc3 /sys/dev/pci/if_iwnreg.h | |
parent | 7baa71c51b9dbf84ab1d35c621b2e28f06e39a46 (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.h | 10 |
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) |