summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2005-03-25 05:07:44 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2005-03-25 05:07:44 +0000
commite4f8df56e0664431f34e2b87a70c6b6af9c42799 (patch)
treeec50d8ca60b2eac0c824fd8c9d6d4f9495aff039
parent77686e09b6def5486d0f62877459c9643686a200 (diff)
Since START_STOP is an optional command that a device need not
support, don't penalize devices that don't support it. May help some usb devices. ok marco@
-rw-r--r--sys/scsi/sd.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index ce4baa13be1..8378bdb8ecb 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sd.c,v 1.71 2005/02/27 01:12:11 krw Exp $ */
+/* $OpenBSD: sd.c,v 1.72 2005/03/25 05:07:43 krw Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*-
@@ -222,9 +222,10 @@ sdattach(parent, self, aux)
scsi_autoconf | SCSI_IGNORE_ILLEGAL_REQUEST |
SCSI_IGNORE_MEDIA_CHANGE | SCSI_SILENT);
- /* Start the pack spinning if necessary. */
+ /* Try to start the unit if it wasn't ready. */
if (error == EIO)
- error = scsi_start(sc_link, SSS_START, 0);
+ error = scsi_start(sc_link, SSS_START,
+ SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_MEDIA_CHANGE);
/* Fill in name struct for spoofed label */
viscpy(sd->name.vendor, sa->sa_inqbuf->vendor, 8);
@@ -395,9 +396,11 @@ sdopen(dev, flag, fmt, p)
SCSI_IGNORE_ILLEGAL_REQUEST |
SCSI_IGNORE_MEDIA_CHANGE);
- /* Start the pack spinning if necessary. */
+ /* Try to start the unit if it wasn't ready. */
if (error == EIO)
- error = scsi_start(sc_link, SSS_START, 0);
+ error = scsi_start(sc_link, SSS_START,
+ SCSI_IGNORE_ILLEGAL_REQUEST |
+ SCSI_IGNORE_MEDIA_CHANGE);
if (error)
goto bad3;
@@ -1134,7 +1137,8 @@ sd_interpret_sense(xs)
} else {
printf("%s: respinning up disk\n", sd->sc_dev.dv_xname);
retval = scsi_start(sd->sc_link, SSS_START,
- SCSI_URGENT | SCSI_NOSLEEP);
+ SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_URGENT |
+ SCSI_NOSLEEP);
if (retval != 0) {
printf("%s: respin of disk failed - %d\n",
sd->sc_dev.dv_xname, retval);