-/* $OpenBSD: cd.c,v 1.143 2008/07/26 04:39:51 krw Exp $ */
+/* $OpenBSD: cd.c,v 1.144 2008/08/01 01:44:20 dlg Exp $ */
/* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */
/*
/* Lock the cd in. */
error = scsi_prevent(sc_link, PR_PREVENT,
- SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_MEDIA_CHANGE);
+ SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_MEDIA_CHANGE |
+ SCSI_SILENT);
if (error)
goto bad;
bad:
if (cd->sc_dk.dk_openmask == 0) {
scsi_prevent(sc_link, PR_ALLOW,
- SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_MEDIA_CHANGE);
+ SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_MEDIA_CHANGE |
+ SCSI_SILENT);
sc_link->flags &= ~(SDEV_OPEN | SDEV_MEDIA_LOADED);
}
/* XXXX Must wait for I/O to complete! */
scsi_prevent(cd->sc_link, PR_ALLOW,
- SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_NOT_READY);
+ SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_NOT_READY |
+ SCSI_SILENT);
cd->sc_link->flags &= ~(SDEV_OPEN | SDEV_MEDIA_LOADED);
if (cd->sc_link->flags & SDEV_EJECTING) {
*/
if (why == PWR_RESUME && cd->sc_dk.dk_openmask != 0)
scsi_prevent(cd->sc_link, PR_PREVENT,
- SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_MEDIA_CHANGE);
+ SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_MEDIA_CHANGE |
+ SCSI_SILENT);
}
int
-/* $OpenBSD: sd.c,v 1.151 2008/07/08 12:17:48 dlg Exp $ */
+/* $OpenBSD: sd.c,v 1.152 2008/08/01 01:44:20 dlg Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*-
* it's open. But allow the open to proceed if the device can't
* be locked in.
*/
- if ((sc_link->flags & SDEV_REMOVABLE) != 0)
- scsi_prevent(sc_link, PR_PREVENT,
+ if ((sc_link->flags & SDEV_REMOVABLE) != 0) {
+ scsi_prevent(sc_link, PR_PREVENT, SCSI_SILENT |
SCSI_IGNORE_ILLEGAL_REQUEST |
SCSI_IGNORE_MEDIA_CHANGE);
+ }
/* Check that it is still responding and ok. */
error = scsi_test_unit_ready(sc_link,
- TEST_READY_RETRIES, (rawopen ? SCSI_SILENT : 0) |
+ TEST_READY_RETRIES, SCSI_SILENT |
SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_MEDIA_CHANGE);
if (error) {
bad:
if (sd->sc_dk.dk_openmask == 0) {
if ((sd->sc_link->flags & SDEV_REMOVABLE) != 0)
- scsi_prevent(sc_link, PR_ALLOW,
+ scsi_prevent(sc_link, PR_ALLOW, SCSI_SILENT |
SCSI_IGNORE_ILLEGAL_REQUEST |
SCSI_IGNORE_MEDIA_CHANGE);
sc_link->flags &= ~(SDEV_OPEN | SDEV_MEDIA_LOADED);
if ((sd->sc_link->flags & SDEV_REMOVABLE) != 0)
scsi_prevent(sd->sc_link, PR_ALLOW,
SCSI_IGNORE_ILLEGAL_REQUEST |
- SCSI_IGNORE_NOT_READY);
+ SCSI_IGNORE_NOT_READY | SCSI_SILENT);
sd->sc_link->flags &= ~(SDEV_OPEN | SDEV_MEDIA_LOADED);
if (sd->sc_link->flags & SDEV_EJECTING) {