diff options
author | ken <ken@FreeBSD.org> | 1998-09-23 03:17:08 +0000 |
---|---|---|
committer | ken <ken@FreeBSD.org> | 1998-09-23 03:17:08 +0000 |
commit | aa7f228f6559293b555f5ff515c4f827d2279a7a (patch) | |
tree | 6ad6829f34607ce22c5c307cd25777f1741ebb30 /sys/cam | |
parent | f1d051737d9a3de9003b10ab16428120a65ffa82 (diff) | |
download | FreeBSD-src-aa7f228f6559293b555f5ff515c4f827d2279a7a.zip FreeBSD-src-aa7f228f6559293b555f5ff515c4f827d2279a7a.tar.gz |
Treat not ready errors (asc 0x04) as non-fatal errors for attach. We
already allowed medium not present type errors (0x3a), but some Philips and
HP WORM drives return 0x04,0x00 when you issue a read capacity without
media in the drive.
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/scsi/scsi_cd.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c index 8cb211b..d240f5f 100644 --- a/sys/cam/scsi/scsi_cd.c +++ b/sys/cam/scsi/scsi_cd.c @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: scsi_cd.c,v 1.2 1998/09/20 07:17:11 gibbs Exp $ + * $Id: scsi_cd.c,v 1.3 1998/09/20 22:48:15 ken Exp $ */ /* * Portions of this driver taken from the original FreeBSD cd driver. @@ -1707,11 +1707,16 @@ cddone(struct cam_periph *periph, union ccb *done_ccb) /* * With CDROM devices, we expect 0x3a * (Medium not present) errors, since not - * everyone leaves a CD in the drive. If - * the error is anything else, though, we - * shouldn't attach. + * everyone leaves a CD in the drive. Some + * broken Philips and HP WORM drives return + * 0x04,0x00 (logical unit not ready, cause + * not reportable), so we accept any "not + * ready" type errors as well. If the error + * is anything else, though, we shouldn't + * attach. */ - if ((have_sense) && (asc == 0x3a) + if ((have_sense) + && ((asc == 0x3a) || (asc == 0x04)) && (error_code == SSD_CURRENT_ERROR)) sprintf(announce_buf, "Attempt to query device " |