diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-08-07 00:09:18 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-08-07 00:09:18 +0000 |
commit | 37f1a4a66aae72eec67ccfdac50c4aeb34027f8e (patch) | |
tree | 2b3183825b76175059b2c95f805aebb11cff37c8 /sys | |
parent | 99940d023b67cb6d7b308c9d677ee6c1f92c5ceb (diff) |
disk_unbusy if op failed to enqueue
Diffstat (limited to 'sys')
-rw-r--r-- | sys/scsi/cd.c | 4 | ||||
-rw-r--r-- | sys/scsi/sd.c | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c index ed5a0c51bf2..b26160db53f 100644 --- a/sys/scsi/cd.c +++ b/sys/scsi/cd.c @@ -631,8 +631,10 @@ cdstart(v) if (scsi_scsi_cmd(sc_link, cmdp, cmdlen, (u_char *) bp->b_data, bp->b_bcount, CDRETRIES, 30000, bp, SCSI_NOSLEEP | - ((bp->b_flags & B_READ) ? SCSI_DATA_IN : SCSI_DATA_OUT))) + ((bp->b_flags & B_READ) ? SCSI_DATA_IN : SCSI_DATA_OUT))) { + disk_unbusy(&cd->sc_dk, 0); printf("%s: not queued", cd->sc_dev.dv_xname); + } } } diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index 287fdbde779..71361c38ed8 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.17 1996/07/12 08:57:57 pefo Exp $ */ +/* $OpenBSD: sd.c,v 1.18 1996/08/07 00:09:17 deraadt Exp $ */ /* $NetBSD: sd.c,v 1.100.4.1 1996/06/04 23:14:08 thorpej Exp $ */ /* @@ -601,9 +601,11 @@ sdstart(v) (u_char *)bp->b_data, bp->b_bcount, SDRETRIES, 10000, bp, SCSI_NOSLEEP | ((bp->b_flags & B_READ) ? SCSI_DATA_IN : SCSI_DATA_OUT)); - if (error) + if (error) { + disk_unbusy(&sd->sc_dk, 0); printf("%s: not queued, error %d\n", sd->sc_dev.dv_xname, error); + } } } |