summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2008-06-02 17:01:14 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2008-06-02 17:01:14 +0000
commitdbe2b2dca9331d0aca4c0f0da391cbc7751f0362 (patch)
treeab1eabbe276b1656abfce53c9ab2b9f14287772d
parent5d32cef2e7c7402e29ec864fac6ce9af3d3c5665 (diff)
Don't spew sense errors (e.g. 'media not present') when probing a
device. Fallout from doing better PREVENT ALLOW dance. Prodded by marco@ as a result of a report from Andreas Kahari on tech@.
-rw-r--r--sys/scsi/sd.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index 5ac4bb06e72..62ce54cba60 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sd.c,v 1.144 2008/05/24 18:53:46 krw Exp $ */
+/* $OpenBSD: sd.c,v 1.145 2008/06/02 17:01:13 krw Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*-
@@ -215,7 +215,7 @@ sdattach(struct device *parent, struct device *self, void *aux)
*/
if ((sc_link->flags & SDEV_REMOVABLE) != 0)
scsi_prevent(sc_link, PR_PREVENT, SCSI_IGNORE_ILLEGAL_REQUEST |
- SCSI_IGNORE_MEDIA_CHANGE);
+ SCSI_IGNORE_MEDIA_CHANGE | SCSI_SILENT);
/* Check that it is still responding and ok. */
error = scsi_test_unit_ready(sd->sc_link, TEST_READY_RETRIES,
@@ -229,9 +229,8 @@ sdattach(struct device *parent, struct device *self, void *aux)
scsi_autoconf | SCSI_SILENT | SCSI_IGNORE_MEDIA_CHANGE);
if ((sc_link->flags & SDEV_REMOVABLE) != 0)
- scsi_prevent(sc_link, PR_ALLOW,
- SCSI_IGNORE_ILLEGAL_REQUEST |
- SCSI_IGNORE_MEDIA_CHANGE);
+ scsi_prevent(sc_link, PR_ALLOW, SCSI_IGNORE_ILLEGAL_REQUEST |
+ SCSI_IGNORE_MEDIA_CHANGE | SCSI_SILENT);
printf("%s: ", sd->sc_dev.dv_xname);
switch (result) {