summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2005-08-27 03:50:05 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2005-08-27 03:50:05 +0000
commita0dbc34adc90aeacb26e57becc86026bc599f60e (patch)
treec791651d4f5efa7a2f9ee111140f28b203e02f1a /sys
parent1983706e833c7427665d698419ab9a12296b8bd1 (diff)
Put in missing parenthesis and thus always pass
SCSI_IGNORE_ILLEGAL_REQUEST and SCSI_IGNORE_MEDIA_CHANGE flags to scsi_test_unit_ready() and scsi_start() during sdopen(). Re-enables use of devices that don't support START_STOP or TEST_UNIT_READY commands. Noted by and fix tested by Jason Crawford on VMWare disks. ok dlg@ henning@, supportive comments from miod@.
Diffstat (limited to 'sys')
-rw-r--r--sys/scsi/sd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index 985a34efecc..7e5d583f277 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sd.c,v 1.89 2005/08/24 01:19:47 krw Exp $ */
+/* $OpenBSD: sd.c,v 1.90 2005/08/27 03:50:04 krw Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*-
@@ -382,12 +382,12 @@ sdopen(dev, flag, fmt, p)
/* Check that it is still responding and ok. */
error = scsi_test_unit_ready(sc_link,
TEST_READY_RETRIES_DEFAULT,
- (part == RAW_PART && fmt == S_IFCHR) ? SCSI_SILENT : 0 |
+ ((part == RAW_PART && fmt == S_IFCHR) ? SCSI_SILENT : 0) |
SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_MEDIA_CHANGE);
/* Spin up the unit, ready or not. */
error = scsi_start(sc_link, SSS_START,
- (part == RAW_PART && fmt == S_IFCHR) ? SCSI_SILENT : 0 |
+ ((part == RAW_PART && fmt == S_IFCHR) ? SCSI_SILENT : 0) |
SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_MEDIA_CHANGE);
if (error) {