From fc4aea9e02bf57962e9fbec614769f5f64003e3d Mon Sep 17 00:00:00 2001 From: joerg Date: Sun, 7 Sep 1997 15:06:08 +0000 Subject: Add a quirk flag for CD drives that jam when seeing a START STOP UNIT command. PR: 2388 Submitted by: nsayer@quack.kfu.com (Nick Sayer) [basically] --- sys/scsi/cd.c | 10 +++++++--- sys/scsi/scsiconf.c | 6 +++++- sys/scsi/scsiconf.h | 3 ++- 3 files changed, 14 insertions(+), 5 deletions(-) (limited to 'sys/scsi') diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c index 448eedf..368dcfa 100644 --- a/sys/scsi/cd.c +++ b/sys/scsi/cd.c @@ -14,7 +14,7 @@ * * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992 * - * $Id: cd.c,v 1.83 1997/05/04 15:24:22 joerg Exp $ + * $Id: cd.c,v 1.84 1997/09/02 20:06:30 bde Exp $ */ #include "opt_bounce.h" @@ -277,9 +277,13 @@ cd_open(dev_t dev, int flags, int fmt, struct proc *p, /* * Start the drive, and take notice of error returns. + * Some (arguably broken) drives go crazy on this attempt, we can + * handle it. */ - scsi_start_unit(sc_link, CD_START); - SC_DEBUG(sc_link, SDEV_DB3, ("'start' attempted ")); + if ((sc_link->quirks & CD_Q_NO_START) == 0) { + scsi_start_unit(sc_link, CD_START); + SC_DEBUG(sc_link, SDEV_DB3, ("'start' attempted ")); + } sc_link->flags |= SDEV_OPEN; /* unit attn errors are now errors */ if (scsi_test_unit_ready(sc_link, SCSI_SILENT) != 0) { SC_DEBUG(sc_link, SDEV_DB3, ("not ready\n")); diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c index a5f20ca..c90560a 100644 --- a/sys/scsi/scsiconf.c +++ b/sys/scsi/scsiconf.c @@ -16,7 +16,7 @@ * * New configuration setup: dufault@hda.com * - * $Id: scsiconf.c,v 1.90 1997/09/02 20:06:35 bde Exp $ + * $Id: scsiconf.c,v 1.91 1997/09/05 10:16:03 joerg Exp $ */ #include "opt_scsi.h" @@ -385,6 +385,10 @@ static struct scsidevs knowndevs[] = T_READONLY, T_READONLY, T_REMOV, "NEC", "CD-ROM DRIVE:210","*", "cd", SC_ONE_LU }, + { + T_READONLY, T_READONLY, T_REMOV, "MEDIAVIS", "RENO CD-ROMX2A","*", + "cd", SC_ONE_LU, CD_Q_NO_START + }, /* * Doobe-doo-be doooo * -Mary diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h index 6c14350..489e13f 100644 --- a/sys/scsi/scsiconf.h +++ b/sys/scsi/scsiconf.h @@ -14,7 +14,7 @@ * * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992 * - * $Id: scsiconf.h,v 1.54 1997/05/19 17:32:10 jmz Exp $ + * $Id: scsiconf.h,v 1.55 1997/06/25 19:07:43 tegge Exp $ */ #ifndef SCSI_SCSICONF_H #define SCSI_SCSICONF_H 1 @@ -274,6 +274,7 @@ typedef struct st_mode st_modes[4]; /* cd specific CD_Q_* */ #define CD_Q_NO_TOUCH 0x0001 #define CD_Q_BCD_TRACKS 0x0002 +#define CD_Q_NO_START 0x0004 /* worm specific WORM_Q_* */ -- cgit v1.1