From owner-freebsd-bugs Mon Jan 6 17:40:04 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id RAA19676 for bugs-outgoing; Mon, 6 Jan 1997 17:40:04 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id RAA19647; Mon, 6 Jan 1997 17:40:02 -0800 (PST) Resent-Date: Mon, 6 Jan 1997 17:40:02 -0800 (PST) Resent-Message-Id: <199701070140.RAA19647@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, nsayer@quack.kfu.com Received: from quack.kfu.com (0@quack.kfu.com [204.147.226.1]) by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id RAA19152 for ; Mon, 6 Jan 1997 17:33:18 -0800 (PST) Received: from icarus.kfu.com (icarus.3do.com [198.211.30.57]) by quack.kfu.com (8.6.12/8.6.12) with ESMTP id RAA01262 for ; Mon, 6 Jan 1997 17:33:14 -0800 Received: by icarus.kfu.com (8.8.2//ident-1.0) id RAA00418; Mon, 6 Jan 1997 17:32:35 -0800 (PST) Message-Id: <199701070132.RAA00418@icarus.kfu.com> Date: Mon, 6 Jan 1997 17:32:35 -0800 (PST) From: nsayer@quack.kfu.com Reply-To: nsayer@quack.kfu.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: kern/2388: start unit command screws up some CDROM drives. Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >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: