diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2002-03-06 16:42:44 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2002-03-06 16:42:44 +0000 |
commit | 64ee73e1dd82a80db75694aa9360b45cc6d09a26 (patch) | |
tree | 5cf4dd64cb7294d514652184c7c8ee9c96f1761f /sys/dev/ic | |
parent | 7190047df688e6c6e148b6cb2970bc8690b2e55f (diff) |
Get the offsets and lengths right when sync'n dma maps; patch from mjacob
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/isp_openbsd.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/dev/ic/isp_openbsd.h b/sys/dev/ic/isp_openbsd.h index acfb931fd4f..94e579286d4 100644 --- a/sys/dev/ic/isp_openbsd.h +++ b/sys/dev/ic/isp_openbsd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: isp_openbsd.h,v 1.19 2002/02/15 02:37:51 art Exp $ */ +/* $OpenBSD: isp_openbsd.h,v 1.20 2002/03/06 16:42:43 jason Exp $ */ /* * OpenBSD Specific definitions for the Qlogic ISP Host Adapter */ @@ -147,25 +147,20 @@ case SYNC_REQUEST: \ case SYNC_RESULT: \ { \ off_t off = (off_t) offset * QENTRY_LEN; \ - off += ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp)); \ bus_dmamap_sync(isp->isp_dmatag, isp->isp_rsdmap, \ off, size, BUS_DMASYNC_POSTREAD); \ break; \ } \ case SYNC_SFORDEV: \ { \ - off_t off = \ - ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp)) + \ - ISP_QUEUE_SIZE(RESULT_QUEUE_LEN(isp)) + offset; \ + off_t off = (off_t) offset; \ bus_dmamap_sync(isp->isp_dmatag, isp->isp_scdmap, \ off, size, BUS_DMASYNC_PREWRITE); \ break; \ } \ case SYNC_SFORCPU: \ { \ - off_t off = \ - ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp)) + \ - ISP_QUEUE_SIZE(RESULT_QUEUE_LEN(isp)) + offset; \ + off_t off = (off_t) offset; \ bus_dmamap_sync(isp->isp_dmatag, isp->isp_scdmap, \ off, size, BUS_DMASYNC_POSTREAD); \ break; \ |