Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/scsipi Handle ADEV_CDROM in quirks table.



details:   https://anonhg.NetBSD.org/src/rev/8fca30882fb2
branches:  trunk
changeset: 486756:8fca30882fb2
user:      gmcgarry <gmcgarry%NetBSD.org@localhost>
date:      Sun May 28 07:03:59 2000 +0000

description:
Handle ADEV_CDROM in quirks table.
Quirk entry for another Toshiba cdrom.

diffstat:

 sys/dev/scsipi/scsiconf.c |  12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diffs (33 lines):

diff -r 8a6d7ddefb06 -r 8fca30882fb2 sys/dev/scsipi/scsiconf.c
--- a/sys/dev/scsipi/scsiconf.c Sun May 28 07:01:09 2000 +0000
+++ b/sys/dev/scsipi/scsiconf.c Sun May 28 07:03:59 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsiconf.c,v 1.142 2000/05/15 16:35:49 dante Exp $     */
+/*     $NetBSD: scsiconf.c,v 1.143 2000/05/28 07:03:59 gmcgarry Exp $  */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -509,6 +509,8 @@
        {{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},
@@ -771,6 +773,14 @@
                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_REMOVABLE) | T_CDROM);
+               sa.sa_inqbuf.removable = T_REMOV;
+       
+       }
+
        if ((sc_link->quirks & SDEV_NOLUNS) == 0)
                docontinue = 1;
 



Home | Main Index | Thread Index | Old Index