Re: TYPE_RBC cache fixes (sbp2.c affected)

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

 



James Bottomley wrote:
Here's a tiny update that means we print the correct ASCII type
information

James

--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -111,6 +111,7 @@ const char *const scsi_device_types[MAX_
"Unknown ",
"RAID ",
"Enclosure ",
+ "Direct-Access-RBC",
};
EXPORT_SYMBOL(scsi_device_types);
--- a/include/scsi/scsi.h
+++ b/include/scsi/scsi.h
@@ -28,7 +28,7 @@ extern const unsigned char scsi_command_
* SCSI device types
*/
-#define MAX_SCSI_DEVICE_CODE 14
+#define MAX_SCSI_DEVICE_CODE 15
extern const char *const scsi_device_types[MAX_SCSI_DEVICE_CODE];
/*
@@ -211,8 +211,8 @@ static inline int scsi_status_is_good(in
* - treated as TYPE_DISK */
#define TYPE_MEDIUM_CHANGER 0x08
#define TYPE_COMM 0x09 /* Communications device */
-#define TYPE_ENCLOSURE 0x0d /* Enclosure Services Device */
#define TYPE_RAID 0x0c
+#define TYPE_ENCLOSURE 0x0d /* Enclosure Services Device */
#define TYPE_RBC 0x0e
#define TYPE_NO_LUN 0x7f



-

James, Here is my take which goes a bit further. One thing my patch does is change "CD-ROM" to "CD/DVD" which might hurt any program that parsers 'cat /proc/scsi/scsi". The comments are taken from spc3r23 section 6.4.2 table 83.

Doug Gilbert
--- linux/include/scsi/scsi.h	2005-05-21 13:08:06.000000000 +1000
+++ linux/include/scsi/scsi.h2612rc4i1	2005-05-22 17:51:50.000000000 +1000
@@ -28,7 +28,7 @@
  *	SCSI device types
  */
 
-#define MAX_SCSI_DEVICE_CODE 14
+#define MAX_SCSI_DEVICE_CODE 32
 extern const char *const scsi_device_types[MAX_SCSI_DEVICE_CODE];
 
 /*
--- linux/drivers/scsi/scsi.c	2005-05-08 15:12:20.000000000 +1000
+++ linux/drivers/scsi/scsi.c2612rc4i1	2005-05-22 17:50:24.000000000 +1000
@@ -97,20 +97,38 @@
 #endif
 
 const char *const scsi_device_types[MAX_SCSI_DEVICE_CODE] = {
-	"Direct-Access    ",
-	"Sequential-Access",
-	"Printer          ",
-	"Processor        ",
-	"WORM             ",
-	"CD-ROM           ",
-	"Scanner          ",
-	"Optical Device   ",
-	"Medium Changer   ",
-	"Communications   ",
-	"Unknown          ",
-	"Unknown          ",
-	"RAID             ",
-	"Enclosure        ",
+	"Direct-Access    ",	/* SBC-2 */
+	"Sequential-Access",	/* SSC-2 */
+	"Printer          ",	/* SSC */
+	"Processor        ",	/* SPC-2 */
+	"WORM             ",	/* SBC */
+	"CD/DVD           ",	/* MMC-4,5 */
+	"Scanner          ",	/* SCSI-2 */
+	"Optical Device   ",	/* SBC */
+	"Medium Changer   ",	/* SMC-2 */
+	"Communications   ",	/* SCSI-2 */
+	"Graphics(0xa)    ",
+	"Graphics(0xb)    ",
+	"RAID             ",	/* SCC-2 */
+	"Enclosure        ",	/* SES-2 */
+	"Simplified D-A   ",	/* RBC */
+	"Optical card rw  ",	/* OCRW */
+	"Bridge controller",	/* BCC */	/* 0x10 */
+	"Object storage   ",	/* OSD */
+	"Automation drv   ",	/* ADT */
+	"Unknown(0x13)    ",
+	"Unknown(0x14)    ",
+	"Unknown(0x15)    ",
+	"Unknown(0x16)    ",
+	"Unknown(0x17)    ",
+	"Unknown(0x18)    ",
+	"Unknown(0x19)    ",
+	"Unknown(0x1a)    ",
+	"Unknown(0x1b)    ",
+	"Unknown(0x1c)    ",
+	"Unknown(0x1e)    ",
+	"Well known lu    ",	/* SPC-3 */
+	"no dev on this lu",	/* SPC-3 */	/* 0x1f */
 };
 EXPORT_SYMBOL(scsi_device_types);
 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux