From 54cbee5db20e480f346ddd4296754f76ef16d8dd Mon Sep 17 00:00:00 2001 From: "Kenneth D. Merry" Date: Wed, 23 Sep 1998 03:17:08 +0000 Subject: [PATCH] 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. --- sys/cam/scsi/scsi_cd.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c index 8cb211bc922..d240f5f938e 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 "