NetBSD Problem Report #10207
Received: (qmail 12803 invoked from network); 28 May 2000 06:45:44 -0000
Message-Id: <200005280645.QAA07958@echo.sprc.qut.edu.au>
Date: Sun, 28 May 2000 16:45:02 +1000 (EST)
From: Gregory McGarry <g.mcgarry@ieee.org>
Reply-To: g.mcgarry@ieee.org
To: gnats-bugs@gnats.netbsd.org
Subject: ADEV_CDROM does nothing
X-Send-Pr-Version: 3.95
>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: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun May 28 06:46:00 +0000 2000
>Closed-Date: Sun May 28 07:09:33 +0000 2000
>Last-Modified: Mon May 29 08:13:00 +0000 2000
>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:
From: Jason R Thorpe <thorpej@zembu.com>
To: Gregory McGarry <g.mcgarry@ieee.org>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: kern/10207: ADEV_CDROM does nothing
Date: Sat, 27 May 2000 23:48:12 -0700
On Sun, May 28, 2000 at 04:45:02PM +1000, Gregory McGarry wrote:
> >Fix:
>
> Here is an entry for a different toshiba cd-rom. It also modifies the
> identify response to be more appropriate.
>
>
> Index: scsiconf.c
> ===================================================================
...
Please go ahead and commit this patch.
--
-- Jason R. Thorpe <thorpej@zembu.com>
State-Changed-From-To: open->closed
State-Changed-By: gmcgarry
State-Changed-When: Sun May 28 00:08:41 PDT 2000
State-Changed-Why:
patches applied
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
To: Gregory McGarry <g.mcgarry@ieee.org>
Cc: gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: kern/10207: ADEV_CDROM does nothing
Date: Sun, 28 May 2000 15:00:41 +0200
On Sun, May 28, 2000 at 04:45:02PM +1000, Gregory McGarry wrote:
>
> >Number: 10207
> >Category: kern
> >Synopsis: ADEV_CDROM in sys/dev/scsipi/scsiconf.c does nothing
Is this for a SCSI or ATAPI device ?
ADEV_CDROM was used for ATAPI, so it shoud only be used in atapiconf.c
--
Manuel Bouyer <bouyer@antioche.eu.org>
--
From: Gregory McGarry <g.mcgarry@ieee.org>
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
Cc: gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: kern/10207: ADEV_CDROM does nothing
Date: Mon, 29 May 2000 07:52:43 +1000
Manuel Bouyer wrote:
> > >Number: 10207
> > >Category: kern
> > >Synopsis: ADEV_CDROM in sys/dev/scsipi/scsiconf.c does nothing
>
> Is this for a SCSI or ATAPI device ?
> ADEV_CDROM was used for ATAPI, so it shoud only be used in atapiconf.c
It is a SCSI device. The only place ADEV_CDROM is currently being
used is in scsiconf.c. It looks like the original ADEV_CDROM entry
was introduced at:
revision 1.129
date: 1999/10/10 18:49:15; author: hwr; state: Exp; lines: +3 -1
Add a quirk to recognize a Toshiba XM-3401TA SCSI CD-ROM as
removable SCSI device. From Matthew Fredette <fredette@mit.edu> in
kern/7438.
If ADEV_CDROM should not be used, what is the correct way to handle
these quirk entries?
-- Gregory McGarry <g.mcgarry@ieee.org>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
To: Gregory McGarry <g.mcgarry@ieee.org>
Cc: gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: kern/10207: ADEV_CDROM does nothing
Date: Mon, 29 May 2000 10:12:00 +0200
On Mon, May 29, 2000 at 07:52:43AM +1000, Gregory McGarry wrote:
> It is a SCSI device. The only place ADEV_CDROM is currently being
> used is in scsiconf.c. It looks like the original ADEV_CDROM entry
> was introduced at:
>
> revision 1.129
> date: 1999/10/10 18:49:15; author: hwr; state: Exp; lines: +3 -1
> Add a quirk to recognize a Toshiba XM-3401TA SCSI CD-ROM as
> removable SCSI device. From Matthew Fredette <fredette@mit.edu> in
> kern/7438.
>
> If ADEV_CDROM should not be used, what is the correct way to handle
> these quirk entries?
Initially I added this for ATAPI devices (it's also why it was not handled for
the SCSI case). If it's also used for SCSI devices
it should be renamed to SDEV_CDROM (yes, it's mostly cosmetic :)
--
Manuel Bouyer, LIP6, Universite Paris VI. Manuel.Bouyer@lip6.fr
--
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.