summaryrefslogtreecommitdiffstats
path: root/sys/dev/isp/isp_freebsd.h
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>2007-03-13 06:46:08 +0000
committermjacob <mjacob@FreeBSD.org>2007-03-13 06:46:08 +0000
commit908c2dbd7779f5a96ac734c367bd5746a00bb50b (patch)
tree86355511610932092f842226931b948e8bcd59a1 /sys/dev/isp/isp_freebsd.h
parent191a467dd2b55bf9dcc1a33ccdb7bf6061c321bb (diff)
downloadFreeBSD-src-908c2dbd7779f5a96ac734c367bd5746a00bb50b.zip
FreeBSD-src-908c2dbd7779f5a96ac734c367bd5746a00bb50b.tar.gz
Move bus_space_tag and bus_space_handle register access
tokens into the common isp_osinfo structure instead of being in bus specific structures. This allows us to implement a SYNC_REG MEMORYBARRIER call (using bus_space_barrier) and also reduce the amount of bus specific wrapper structure usages in isp_pci && isp_sbus. MFC after: 3 days
Diffstat (limited to 'sys/dev/isp/isp_freebsd.h')
-rw-r--r--sys/dev/isp/isp_freebsd.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/isp/isp_freebsd.h b/sys/dev/isp/isp_freebsd.h
index 89cea8e..7663ccb 100644
--- a/sys/dev/isp/isp_freebsd.h
+++ b/sys/dev/isp/isp_freebsd.h
@@ -140,6 +140,8 @@ typedef struct tstate {
struct isposinfo {
struct ispsoftc * next;
+ bus_space_tag_t bus_tag;
+ bus_space_handle_t bus_handle;
uint64_t default_port_wwn;
uint64_t default_node_wwn;
uint32_t default_id;
@@ -194,6 +196,8 @@ struct isposinfo {
};
#define isp_lock isp_osinfo.lock
+#define isp_bus_tag isp_osinfo.bus_tag
+#define isp_bus_handle isp_osinfo.bus_handle
/*
* Locking macros...
@@ -251,6 +255,11 @@ case SYNC_RESULT: \
bus_dmamap_sync(isp->isp_cdmat, isp->isp_cdmap, \
BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); \
break; \
+case SYNC_REG: \
+ bus_space_barrier(isp->isp_bus_tag, \
+ isp->isp_bus_handle, offset, size, \
+ BUS_SPACE_BARRIER_READ); \
+ break; \
default: \
break; \
}
OpenPOWER on IntegriCloud