Source-Changes-HG archive

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

[src/netbsd-2]: src/sys/dev/ic Pull up following revision(s) (requested by ma...



details:   https://anonhg.NetBSD.org/src/rev/f9468864a4a7
branches:  netbsd-2
changeset: 564466:f9468864a4a7
user:      tron <tron%NetBSD.org@localhost>
date:      Fri Apr 21 21:52:48 2006 +0000

description:
Pull up following revision(s) (requested by martti in ticket #10451):
        sys/dev/ic/ciss.c: revision 1.2
Merged changes between OpenBSD rev 1.13 and 1.14.

diffstat:

 sys/dev/ic/ciss.c |  18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diffs (76 lines):

diff -r 5b1872ce2b43 -r f9468864a4a7 sys/dev/ic/ciss.c
--- a/sys/dev/ic/ciss.c Fri Apr 21 21:50:10 2006 +0000
+++ b/sys/dev/ic/ciss.c Fri Apr 21 21:52:48 2006 +0000
@@ -1,5 +1,5 @@
-/*     $NetBSD: ciss.c,v 1.1.6.2 2006/04/11 01:15:22 riz Exp $ */
-/*     $OpenBSD: ciss.c,v 1.13 2006/02/02 22:13:04 brad Exp $  */
+/*     $NetBSD: ciss.c,v 1.1.6.3 2006/04/21 21:52:48 tron Exp $        */
+/*     $OpenBSD: ciss.c,v 1.14 2006/03/13 16:02:23 mickey Exp $        */
 
 /*
  * Copyright (c) 2005 Michael Shalayeff
@@ -19,7 +19,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.1.6.2 2006/04/11 01:15:22 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.1.6.3 2006/04/21 21:52:48 tron Exp $");
 
 /* #define CISS_DEBUG */
 
@@ -412,7 +412,7 @@
                bp->b_bcount = CISS_MAXFER;
 #endif
        minphys(bp);
-}               
+}
 
 /*
  * submit a command and optionally wait for completition.
@@ -558,6 +558,7 @@
 {
        struct ciss_softc *sc = ccb->ccb_sc;
        struct scsipi_xfer *xs = ccb->ccb_xs;
+       struct ciss_cmd *cmd;
        ciss_lock_t lock;
        int error = 0;
 
@@ -576,11 +577,11 @@
        if (ccb->ccb_cmd.id & CISS_CMD_ERR)
                error = ciss_error(ccb);
 
+       cmd = &ccb->ccb_cmd;
        if (ccb->ccb_data) {
                bus_dmamap_sync(sc->sc_dmat, ccb->ccb_dmamap, 0,
-                   ccb->ccb_dmamap->dm_mapsize,
-                   (xs  && xs->xs_control & XS_CTL_DATA_IN) ?
-                    BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE);
+                   ccb->ccb_dmamap->dm_mapsize, (cmd->flags & CISS_CDB_IN) ?
+                   BUS_DMASYNC_POSTREAD : BUS_DMASYNC_POSTWRITE);
                bus_dmamap_unload(sc->sc_dmat, ccb->ccb_dmamap);
                ccb->ccb_xs = NULL;
                ccb->ccb_data = NULL;
@@ -679,6 +680,7 @@
        ccb = ciss_get_ccb(sc);
        ccb->ccb_len = sizeof(*inq);
        ccb->ccb_data = inq;
+       ccb->ccb_xs = NULL;
        cmd = &ccb->ccb_cmd;
        cmd->tgt = htole32(CISS_CMD_MODE_PERIPH);
        cmd->tgt2 = 0;
@@ -711,6 +713,7 @@
        ccb = ciss_get_ccb(sc);
        ccb->ccb_len = total;
        ccb->ccb_data = lmap;
+       ccb->ccb_xs = NULL;
        cmd = &ccb->ccb_cmd;
        cmd->tgt = CISS_CMD_MODE_PERIPH;
        cmd->tgt2 = 0;
@@ -751,6 +754,7 @@
        ccb = ciss_get_ccb(sc);
        ccb->ccb_len = sizeof(*flush);
        ccb->ccb_data = flush;
+       ccb->ccb_xs = NULL;
        cmd = &ccb->ccb_cmd;
        cmd->tgt = CISS_CMD_MODE_PERIPH;
        cmd->tgt2 = 0;



Home | Main Index | Thread Index | Old Index