Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/scsipi Add few peripheral device type



details:   https://anonhg.NetBSD.org/src/rev/b346fbf4ed3d
branches:  trunk
changeset: 486217:b346fbf4ed3d
user:      dante <dante%NetBSD.org@localhost>
date:      Mon May 15 16:35:49 2000 +0000

description:
Add few peripheral device type
Remove "???" from T_IT8_1/2. They actually are pre-press devices for graphic arts as described by ASC IT8
Zeros and blanks scsipi_inquiry_data from byte 58 to byte 74 if additional_length is less than 58

diffstat:

 sys/dev/scsipi/scsiconf.c   |   9 ++++++++-
 sys/dev/scsipi/scsipi_all.h |  25 ++++++++++++++-----------
 sys/dev/scsipi/scsipiconf.c |  13 +++++++++++--
 3 files changed, 33 insertions(+), 14 deletions(-)

diffs (125 lines):

diff -r f726c559513d -r b346fbf4ed3d sys/dev/scsipi/scsiconf.c
--- a/sys/dev/scsipi/scsiconf.c Mon May 15 16:26:16 2000 +0000
+++ b/sys/dev/scsipi/scsiconf.c Mon May 15 16:35:49 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsiconf.c,v 1.141 2000/05/14 18:20:11 dante Exp $     */
+/*     $NetBSD: scsiconf.c,v 1.142 2000/05/15 16:35:49 dante Exp $     */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -728,6 +728,10 @@
                        extension[len++] = '\0';
                while (len < 3 + 28 + 20 + 1)
                        extension[len++] = '\0';
+               while (len < 3 + 28 + 20 + 1 + 1)
+                       extension[len++] = '\0';
+               while (len < 3 + 28 + 20 + 1 + 1 + (8*2))
+                       extension[len++] = ' ';
        }
 
        sa.sa_sc_link = sc_link;
@@ -811,6 +815,9 @@
                case T_IT8_2:
                case T_STORARRAY:
                case T_ENCLOSURE:
+               case T_SIMPLE_DIRECT:
+               case T_OPTIC_CARD_RW:
+               case T_OBJECT_STORED:
                default:
                        break;
                case T_NODEVICE:
diff -r f726c559513d -r b346fbf4ed3d sys/dev/scsipi/scsipi_all.h
--- a/sys/dev/scsipi/scsipi_all.h       Mon May 15 16:26:16 2000 +0000
+++ b/sys/dev/scsipi/scsipi_all.h       Mon May 15 16:35:49 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsipi_all.h,v 1.14 2000/05/14 19:52:34 dante Exp $    */
+/*     $NetBSD: scsipi_all.h,v 1.15 2000/05/15 16:35:49 dante Exp $    */
 
 /*
  * SCSI and SCSI-like general interface description
@@ -160,10 +160,13 @@
 #define        T_OPTICAL       0x07    /* optical memory device */
 #define        T_CHANGER       0x08    /* medium changer device */
 #define        T_COMM          0x09    /* communication device */
-#define        T_IT8_1         0x0a    /* ??? */
-#define        T_IT8_2         0x0b    /* ??? */
+#define        T_IT8_1         0x0a    /* Defined by ASC IT8... */
+#define        T_IT8_2         0x0b    /* ...(Graphic arts pre-press devices) */
 #define        T_STORARRAY     0x0c    /* storage array device */
 #define        T_ENCLOSURE     0x0d    /* enclosure services device */
+#define        T_SIMPLE_DIRECT 0x0E    /* Simplified direct-access device */
+#define        T_OPTIC_CARD_RW 0x0F    /* Optical card reader/writer device */
+#define        T_OBJECT_STORED 0x11    /* Object-based Storage Device */
 #define        T_NODEVICE      0x1F
 
 #define        T_REMOV         1       /* device is removable */
@@ -171,17 +174,17 @@
 
 /*
  * According to SPC-2r16, in order to know if a U3W device support PPR,
- * Inquiry Data structure should be at least 58 Bytes.
+ * Inquiry Data structure should be at least 57 Bytes.
  */
 
 struct scsipi_inquiry_data {
 /* 1*/ u_int8_t device;
 #define        SID_TYPE        0x1F
 #define        SID_QUAL        0xE0
-#define        SID_QUAL_LU_OK  0x00
-#define        SID_QUAL_LU_OFFLINE     0x20
-#define        SID_QUAL_RSVD   0x40
-#define        SID_QUAL_BAD_LU 0x60
+#define         SID_QUAL_LU_OK         0x00
+#define         SID_QUAL_LU_OFFLINE    0x20
+#define         SID_QUAL_RSVD          0x40
+#define         SID_QUAL_BAD_LU        0x60
 /* 2*/ u_int8_t dev_qual2;
 #define        SID_QUAL2       0x7F
 #define        SID_REMOVABLE   0x80
@@ -216,9 +219,9 @@
 #define        SID_IUS         0x01
 #define        SID_QAS         0x02
 #define        SID_Clocking    0x0C
-#define  SIDV_CLOCKING_ST_ONLY 0x00
-#define  SIDV_CLOCKING_DT_ONLY 0x04
-#define  SIDV_CLOCKING_SD_DT   0x0C
+#define  SID_CLOCKING_ST_ONLY  0x00
+#define  SID_CLOCKING_DT_ONLY  0x04
+#define  SID_CLOCKING_SD_DT    0x0C
 /*58*/ u_int8_t reserved;
 /*59*/ char    version_descriptor[8][2];
 }; /* 74 Bytes */
diff -r f726c559513d -r b346fbf4ed3d sys/dev/scsipi/scsipiconf.c
--- a/sys/dev/scsipi/scsipiconf.c       Mon May 15 16:26:16 2000 +0000
+++ b/sys/dev/scsipi/scsipiconf.c       Mon May 15 16:35:49 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsipiconf.c,v 1.8 1998/11/17 14:38:43 bouyer Exp $    */
+/*     $NetBSD: scsipiconf.c,v 1.9 2000/05/15 16:35:49 dante Exp $     */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -154,7 +154,7 @@
                break;
        case T_IT8_1:
        case T_IT8_2:
-               dtype = "it8";          /* ??? */
+               dtype = "graphic arts pre-press";
                break;
        case T_STORARRAY:
                dtype = "storage array";
@@ -162,6 +162,15 @@
        case T_ENCLOSURE:
                dtype = "enclosure services";
                break;
+       case T_SIMPLE_DIRECT:
+               dtype = "simplified direct";
+               break;
+       case T_OPTIC_CARD_RW:
+               dtype = "optical card r/w";
+               break;
+       case T_OBJECT_STORED:
+               dtype = "object-based storage";
+               break;
        case T_NODEVICE:
                panic("scsipi_dtype: impossible device type");
        default:



Home | Main Index | Thread Index | Old Index