diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2003-05-21 23:43:59 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2003-05-21 23:43:59 +0000 |
commit | 34d1117610e5f64b215c411ca8f24ce52fcacfce (patch) | |
tree | b0b98e580ddd4a3256ec5b6d0cf716f520678d74 /sys/scsi/sd.c | |
parent | 6c307dca52a01811a9fbe61ce8054a034e1db4d1 (diff) |
Make sure that the first scsi command issued to a device during
sdattach() has the flag SCSI_IGNORE_MEDIA_CHANGE set. This was not
true for devices with the quirk SDEV_NOSTARTUNIT, such as some umass
devices.
This fixes the display of the disk parameters for any loaded media.
Previously the displayed parameters would show 0 size, 0 sectors and a
faked number of cylinders, etc. By ignoring the error generated by
devices trying to tell us the media may have changed since the last
command the SCSI command completes correctly and valid values are
obtained/displayed. We are interested in the current values and
unconcerned about any previous ones.
Tested by drahn@.
Diffstat (limited to 'sys/scsi/sd.c')
-rw-r--r-- | sys/scsi/sd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index 46e19691539..90e6850c52e 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.60 2003/05/18 16:06:35 mickey Exp $ */ +/* $OpenBSD: sd.c,v 1.61 2003/05/21 23:43:58 krw Exp $ */ /* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */ /*- @@ -234,7 +234,7 @@ sdattach(parent, self, aux) result = SDGP_RESULT_OFFLINE; else result = (*sd->sc_ops->sdo_get_parms)(sd, &sd->params, - scsi_autoconf); + scsi_autoconf | SCSI_IGNORE_MEDIA_CHANGE); printf("%s: ", sd->sc_dev.dv_xname); switch (result) { |