Date: Mon, 6 Jan 1997 17:32:35 -0800 (PST) From: nsayer@quack.kfu.com To: FreeBSD-gnats-submit@freebsd.org Subject: kern/2388: start unit command screws up some CDROM drives. Message-ID: <199701070132.RAA00418@icarus.kfu.com> Resent-Message-ID: <199701070140.RAA19647@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 2388
>Category: kern
>Synopsis: start unit command screws up some CDROM drives.
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: freebsd-bugs
>State: open
>Class: support
>Submitter-Id: current-users
>Arrival-Date: Mon Jan 6 17:40:01 PST 1997
>Last-Modified:
>Originator: Nick Sayer
>Organization:
Just me
>Release: FreeBSD 2.2-ALPHA i386
>Environment:
HP Omnibook 5000, amd SCSI controller
also duped on a P-Pro 200 w/ Adaptec 2940
>Description:
The SCSI CD driver will attempt to send a start-unit command on open.
Some drives (for example, my Media Vision Reno) will hack and barf
if this happens.
>How-To-Repeat:
Any attempt to talk to the CD that results in an open will hang
or other such anti-social behavior.
>Fix:
The fix is to add a CDROM "quirk" that will disable the start unit
if a quirky CDROM is used. See the Reno entry.
diff -c scsi.o/cd.c scsi/cd.c
*** scsi.o/cd.c Mon Jan 6 09:06:08 1997
--- scsi/cd.c Mon Jan 6 09:07:02 1997
***************
*** 292,300 ****
* not needed for some drives
* failure here is ignored.
*/
! scsi_start_unit(sc_link, CD_START);
! scsi_prevent(sc_link, PR_PREVENT, SCSI_SILENT);
! SC_DEBUG(sc_link, SDEV_DB3, ("'start' attempted "));
/*
* Load the physical device parameters
*/
--- 292,303 ----
* not needed for some drives
* failure here is ignored.
*/
! if (! (sc_link->quirks & CD_Q_NO_START) )
! {
! scsi_start_unit(sc_link, CD_START);
! scsi_prevent(sc_link, PR_PREVENT, SCSI_SILENT);
! SC_DEBUG(sc_link, SDEV_DB3, ("'start' attempted "));
! }
/*
* Load the physical device parameters
*/
diff -c scsi.o/scsiconf.c scsi/scsiconf.c
*** scsi.o/scsiconf.c Mon Jan 6 09:06:09 1997
--- scsi/scsiconf.c Mon Jan 6 09:15:34 1997
***************
*** 352,357 ****
--- 352,361 ----
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 -c scsi.o/scsiconf.h scsi/scsiconf.h
*** scsi.o/scsiconf.h Mon Jan 6 09:06:09 1997
--- scsi/scsiconf.h Mon Jan 6 09:08:27 1997
***************
*** 275,280 ****
--- 275,281 ----
/* cd specific CD_Q_* */
#define CD_Q_NO_TOUCH 0x0001
+ #define CD_Q_NO_START 0x0002
/*
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701070132.RAA00418>
