summaryrefslogtreecommitdiffstats
path: root/sys/dev/isp/isp_freebsd.h
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2011-02-14 21:50:51 +0000
committermarius <marius@FreeBSD.org>2011-02-14 21:50:51 +0000
commit38e77638a44f19dcca8baf8a19e30750c6c7be94 (patch)
treee9d7d89e8be16e2991384a4512a90155d7ceeef0 /sys/dev/isp/isp_freebsd.h
parente5e190244192755e197dbd88660bc40f2f01fc66 (diff)
downloadFreeBSD-src-38e77638a44f19dcca8baf8a19e30750c6c7be94.zip
FreeBSD-src-38e77638a44f19dcca8baf8a19e30750c6c7be94.tar.gz
- Use the correct DMA tag/map pair for synchronize the FC scratch area.
- Allocate coherent DMA memory for the request/response queue area and and the FC scratch area. These changes allow isp(4) to work properly on sparc64 with usage of the IOMMU streaming buffers enabled. Approved by: mjacob MFC after: 2 weeks
Diffstat (limited to 'sys/dev/isp/isp_freebsd.h')
-rw-r--r--sys/dev/isp/isp_freebsd.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/dev/isp/isp_freebsd.h b/sys/dev/isp/isp_freebsd.h
index 44c8bdf..5d21535 100644
--- a/sys/dev/isp/isp_freebsd.h
+++ b/sys/dev/isp/isp_freebsd.h
@@ -338,15 +338,27 @@ struct isposinfo {
#define MAXISPREQUEST(isp) ((IS_FC(isp) || IS_ULTRA2(isp))? 1024 : 256)
-#define MEMORYBARRIER(isp, type, offset, size) \
+#define MEMORYBARRIER(isp, type, offset, size, chan) \
switch (type) { \
case SYNC_SFORDEV: \
+{ \
+ struct isp_fc *fc = ISP_FC_PC(isp, chan); \
+ bus_dmamap_sync(fc->tdmat, fc->tdmap, \
+ BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); \
+ break; \
+} \
case SYNC_REQUEST: \
bus_dmamap_sync(isp->isp_osinfo.cdmat, \
isp->isp_osinfo.cdmap, \
BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); \
break; \
case SYNC_SFORCPU: \
+{ \
+ struct isp_fc *fc = ISP_FC_PC(isp, chan); \
+ bus_dmamap_sync(fc->tdmat, fc->tdmap, \
+ BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); \
+ break; \
+} \
case SYNC_RESULT: \
bus_dmamap_sync(isp->isp_osinfo.cdmat, \
isp->isp_osinfo.cdmap, \
OpenPOWER on IntegriCloud