Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic Thanks to Jason Wright of OpenBSD- spotted that t...



details:   https://anonhg.NetBSD.org/src/rev/faabb3a05830
branches:  trunk
changeset: 524846:faabb3a05830
user:      mjacob <mjacob%NetBSD.org@localhost>
date:      Sun Mar 31 17:56:54 2002 +0000

description:
Thanks to Jason Wright of OpenBSD- spotted that the offsets were all wrong
for bus_dmamap_sync calls. They'd been blindly ported from Solaris which
had *one* dma map for the entire control space, so offset was incremented
for the Request, Response and FC Scratch spaces. Tsk. There are three maps
in NetBSD. I should probably make them one anyway.

diffstat:

 sys/dev/ic/isp_netbsd.h |  11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diffs (37 lines):

diff -r 300b89021b48 -r faabb3a05830 sys/dev/ic/isp_netbsd.h
--- a/sys/dev/ic/isp_netbsd.h   Sun Mar 31 17:30:16 2002 +0000
+++ b/sys/dev/ic/isp_netbsd.h   Sun Mar 31 17:56:54 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isp_netbsd.h,v 1.48 2002/02/21 22:32:42 mjacob Exp $ */
+/* $NetBSD: isp_netbsd.h,v 1.49 2002/03/31 17:56:54 mjacob Exp $ */
 /*
  * This driver, which is contained in NetBSD in the files:
  *
@@ -175,25 +175,20 @@
 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;                                                  \



Home | Main Index | Thread Index | Old Index