summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>2001-01-22 19:10:14 +0000
committerConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>2001-01-22 19:10:14 +0000
commitbf1e786453727cfd89c119989ac1a4445724ba3f (patch)
treedf9e082f2cd6ed9b33bef38f131935cfc55339c3 /sys
parent2057837f5527078bea6d69ae34ccaf9455be8874 (diff)
Reduce # of retries on scsi_test_unit_ready to 5. This means that devices
that don't support it will only hang the system in boot-up for 50 seconds as opposed to 500 seconds. Return 0 from scsi_start if the device doesn't support START/STOP unit.
Diffstat (limited to 'sys')
-rw-r--r--sys/scsi/scsi_base.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c
index e2870871413..af1fe01ab07 100644
--- a/sys/scsi/scsi_base.c
+++ b/sys/scsi/scsi_base.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsi_base.c,v 1.26 2000/03/01 18:12:04 millert Exp $ */
+/* $OpenBSD: scsi_base.c,v 1.27 2001/01/22 19:10:13 csapuntz Exp $ */
/* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */
/*
@@ -239,7 +239,7 @@ scsi_test_unit_ready(sc_link, flags)
scsi_cmd.opcode = TEST_UNIT_READY;
return scsi_scsi_cmd(sc_link, (struct scsi_generic *) &scsi_cmd,
- sizeof(scsi_cmd), 0, 0, 50, 10000, NULL, flags);
+ sizeof(scsi_cmd), 0, 0, 5, 10000, NULL, flags);
}
/*
@@ -309,6 +309,9 @@ scsi_start(sc_link, type, flags)
{
struct scsi_start_stop scsi_cmd;
+ if ((sc_link->quirks & SDEV_NOSTARTUNIT) == SDEV_NOSTARTUNIT)
+ return 0;
+
bzero(&scsi_cmd, sizeof(scsi_cmd));
scsi_cmd.opcode = START_STOP;
scsi_cmd.byte2 = 0x00;