diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-10-20 16:10:10 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-10-20 16:10:10 +0000 |
commit | 8773a9b3d4717b24aa6d4d36537878310289d731 (patch) | |
tree | dacee5890b66ea46c09d542538cbe9203d711c2e | |
parent | e03f0259de8a5b418992f5b13249e15268bcdedd (diff) |
Call scsi_done() at SPLBIO. 'looks olright' says mickey.
-rw-r--r-- | sys/dev/ic/ciss.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/twe.c | 5 |
2 files changed, 8 insertions, 5 deletions
diff --git a/sys/dev/ic/ciss.c b/sys/dev/ic/ciss.c index ced349a564a..3223ff072fd 100644 --- a/sys/dev/ic/ciss.c +++ b/sys/dev/ic/ciss.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ciss.c,v 1.28 2007/09/18 00:46:41 krw Exp $ */ +/* $OpenBSD: ciss.c,v 1.29 2007/10/20 16:10:09 krw Exp $ */ /* * Copyright (c) 2005,2006 Michael Shalayeff @@ -830,6 +830,7 @@ ciss_scsi_raw_cmd(struct scsi_xfer *xs) /* TODO */ CISS_DPRINTF(CISS_D_CMD, ("ciss_scsi_raw_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)); @@ -838,10 +839,10 @@ ciss_scsi_raw_cmd(struct scsi_xfer *xs) /* TODO */ xs->sense.add_sense_code = 0x20; /* illcmd, 0x24 illfield */ xs->error = XS_SENSE; scsi_done(xs); + CISS_UNLOCK(sc, lock); return (COMPLETE); } - lock = CISS_LOCK(sc); error = 0; xs->error = XS_NOERROR; @@ -890,6 +891,7 @@ 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)); @@ -898,10 +900,10 @@ 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 (COMPLETE); } - lock = CISS_LOCK(sc); error = 0; xs->error = XS_NOERROR; diff --git a/sys/dev/ic/twe.c b/sys/dev/ic/twe.c index b17721ef9a1..a6f8c79ae28 100644 --- a/sys/dev/ic/twe.c +++ b/sys/dev/ic/twe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: twe.c,v 1.27 2006/12/29 13:04:37 pedro Exp $ */ +/* $OpenBSD: twe.c,v 1.28 2007/10/20 16:10:09 krw Exp $ */ /* * Copyright (c) 2000-2002 Michael Shalayeff. All rights reserved. @@ -922,13 +922,14 @@ twe_scsi_cmd(xs) if ((error = twe_cmd(ccb, ((xs->flags & SCSI_NOSLEEP)? BUS_DMA_NOWAIT : BUS_DMA_WAITOK), wait))) { - TWE_UNLOCK(sc, lock); TWE_DPRINTF(TWE_D_CMD, ("failed %p ", xs)); if (xs->flags & SCSI_POLL) { + TWE_UNLOCK(sc, lock); return (TRY_AGAIN_LATER); } else { xs->error = XS_DRIVER_STUFFUP; scsi_done(xs); + TWE_UNLOCK(sc, lock); return (COMPLETE); } } |