diff options
author | 2010-01-07 10:58:37 +0000 | |
---|---|---|
committer | 2010-01-07 10:58:37 +0000 | |
commit | 85ff44bad8806eda8f6b49f9c630e36ed04e2192 (patch) | |
tree | 8f21481d147c35c07171fe0a2c8bdd7613cc9f53 | |
parent | Enable IPI interrrupt in trap. ok miod@ (diff) | |
download | wireguard-openbsd-85ff44bad8806eda8f6b49f9c630e36ed04e2192.tar.xz wireguard-openbsd-85ff44bad8806eda8f6b49f9c630e36ed04e2192.zip |
CISS_UNLOCK before returning from the scsi_cmd handler when we hit NO_CCB.
this should solve problems like this:
WARNING: SPL NOT LOWERED ON SYSCALL 16384 8 EXIT dae4560 6
Stopped at Xsyscall+0x1eb: movl $0,%gs:0x3d4
ddb{3}>
-rw-r--r-- | sys/dev/ic/ciss.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/sys/dev/ic/ciss.c b/sys/dev/ic/ciss.c index 66c124b553b..375d9fb51af 100644 --- a/sys/dev/ic/ciss.c +++ b/sys/dev/ic/ciss.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ciss.c,v 1.36 2009/12/17 19:42:39 krw Exp $ */ +/* $OpenBSD: ciss.c,v 1.37 2010/01/07 10:58:37 dlg Exp $ */ /* * Copyright (c) 2005,2006 Michael Shalayeff @@ -892,8 +892,12 @@ ciss_scsi_raw_cmd(struct scsi_xfer *xs) /* TODO */ /* TODO check this target has not yet employed w/ any volume */ ccb = ciss_get_ccb(sc); - if (ccb == NULL) - return NO_CCB; + if (ccb == NULL) { + xs->error = XS_NO_CCB; + scsi_done(xs); + CISS_UNLOCK(sc, lock); + return (COMPLETE); + } cmd = &ccb->ccb_cmd; ccb->ccb_len = xs->datalen; @@ -952,8 +956,12 @@ ciss_scsi_cmd(struct scsi_xfer *xs) /* XXX emulate SYNCHRONIZE_CACHE ??? */ ccb = ciss_get_ccb(sc); - if (ccb == NULL) - return NO_CCB; + if (ccb == NULL) { + xs->error = XS_NO_CCB; + scsi_done(xs); + CISS_UNLOCK(sc, lock); + return (COMPLETE); + } cmd = &ccb->ccb_cmd; ccb->ccb_len = xs->datalen; |