summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2010-06-02 01:45:15 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2010-06-02 01:45:15 +0000
commit3f41b3bf7b823c71c5364c1bd9a6a23add80db0a (patch)
tree6491f8fac678eae856437e1fcd21e19b79ef1450 /sys/dev/ic
parentf781d3bcd838d60368133bf54ee4c6771724fd19 (diff)
push the "locking" in ciss_scsi_cmd down. we dont need splbio to call
scsi_done or to get or put ccbs anymore.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/ciss.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/dev/ic/ciss.c b/sys/dev/ic/ciss.c
index 7020040064f..c51b3ce8fcd 100644
--- a/sys/dev/ic/ciss.c
+++ b/sys/dev/ic/ciss.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ciss.c,v 1.47 2010/06/02 01:33:57 dlg Exp $ */
+/* $OpenBSD: ciss.c,v 1.48 2010/06/02 01:45:14 dlg Exp $ */
/*
* Copyright (c) 2005,2006 Michael Shalayeff
@@ -856,7 +856,6 @@ ciss_scsi_cmd(struct scsi_xfer *xs)
CISS_DPRINTF(CISS_D_CMD, ("ciss_scsi_cmd "));
- lock = CISS_LOCK(sc);
if (xs->cmdlen > CISS_MAX_CDB) {
CISS_DPRINTF(CISS_D_CMD, ("CDB too big %p ", xs));
bzero(&xs->sense, sizeof(xs->sense));
@@ -865,7 +864,6 @@ ciss_scsi_cmd(struct scsi_xfer *xs)
xs->sense.add_sense_code = 0x20; /* illcmd, 0x24 illfield */
xs->error = XS_SENSE;
scsi_done(xs);
- CISS_UNLOCK(sc, lock);
return;
}
@@ -877,7 +875,6 @@ ciss_scsi_cmd(struct scsi_xfer *xs)
if (ccb == NULL) {
xs->error = XS_NO_CCB;
scsi_done(xs);
- CISS_UNLOCK(sc, lock);
return;
}
@@ -897,8 +894,8 @@ ciss_scsi_cmd(struct scsi_xfer *xs)
bzero(&cmd->cdb[0], sizeof(cmd->cdb));
bcopy(xs->cmd, &cmd->cdb[0], CISS_MAX_CDB);
+ lock = CISS_LOCK(sc);
ciss_cmd(ccb, BUS_DMA_WAITOK, xs->flags & (SCSI_POLL|SCSI_NOSLEEP));
-
CISS_UNLOCK(sc, lock);
}