Subject: kern/10207: ADEV_CDROM does nothing
To: None <gnats-bugs@gnats.netbsd.org>
From: Gregory McGarry <g.mcgarry@ieee.org>
List: netbsd-bugs
Date: 05/27/2000 23:45:11
>Number: 10207
>Category: kern
>Synopsis: ADEV_CDROM in sys/dev/scsipi/scsiconf.c does nothing
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat May 27 23:46:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Gregory McGarry
>Release: <NetBSD-current source date> 1.4Y
>Organization:
>Environment:
System: NetBSD candel 1.4Y NetBSD 1.4Y (CANDEL) #5: Fri May 26 10:01:01 EST 2000 gmcgarry@candel:/storage/CANDEL i386
>Description:
ADEV_CDROM in sys/dev/scsipi/scsiconf.c is used in the quirks table
to specific CD-ROM drives which identify themselves as fixed.
It is used for a few entries, but doesn't seem to do anything.
>How-To-Repeat:
Find one of the toshiba cd-roms in the quirk table and boot.
>Fix:
Here is an entry for a different toshiba cd-rom. It also modifies the
identify response to be more appropriate.
Index: scsiconf.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/scsipi/scsiconf.c,v
retrieving revision 1.142
diff -c -r1.142 scsiconf.c
*** scsiconf.c 2000/05/15 16:35:49 1.142
--- scsiconf.c 2000/05/28 06:33:33
***************
*** 509,514 ****
--- 509,516 ----
{{T_DIRECT, T_FIXED,
"TOSHIBA ", "CD-ROM XM-3401TA", "0283"}, ADEV_CDROM|SDEV_NOLUNS},
{{T_DIRECT, T_FIXED,
+ "TOSHIBA ", "CD-ROM DRIVE:XM", "1971"}, ADEV_CDROM|SDEV_NOLUNS},
+ {{T_DIRECT, T_FIXED,
"ADAPTEC ", "AEC-4412BD", "1.2A"}, SDEV_NOMODESENSE},
{{T_DIRECT, T_FIXED,
"DEC ", "RZ55 (C) DEC", ""}, SDEV_AUTOSAVE},
***************
*** 770,775 ****
--- 772,785 ----
(sc_link->quirks & SDEV_FORCELUNS) == 0)
sc_link->quirks |= SDEV_NOLUNS;
sc_link->scsipi_scsi.scsi_version = inqbuf.version;
+
+ if (sc_link->quirks & ADEV_CDROM) {
+ sc_link->quirks ^= ADEV_CDROM;
+ inqbuf.dev_qual2 |= SID_REMOVABLE;
+ sa.sa_inqbuf.type = inqbuf.device = ((inqbuf.device & ~SID_REMOV
ABLE) | T_CDROM);
+ sa.sa_inqbuf.removable = T_REMOV;
+
+ }
if ((sc_link->quirks & SDEV_NOLUNS) == 0)
docontinue = 1;
>Release-Note:
>Audit-Trail:
>Unformatted: