All of lore.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dougg@torque.net>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>,
	SCSI Mailing List <linux-scsi@vger.kernel.org>,
	linux1394-devel@lists.sourceforge.net
Subject: Re: TYPE_RBC cache fixes (sbp2.c affected)
Date: Sun, 22 May 2005 20:15:39 +1000	[thread overview]
Message-ID: <42905BCB.4070809@torque.net> (raw)
In-Reply-To: <1116689077.4999.9.camel@mulgrave>

[-- Attachment #1: Type: text/plain, Size: 1391 bytes --]

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

[-- Attachment #2: scsi_2612rc4i1.diff --]
[-- Type: text/x-patch, Size: 1899 bytes --]

--- 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);
 

  reply	other threads:[~2005-05-22 10:15 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-16  1:59 TYPE_RBC cache fixes (sbp2.c affected) Al Viro
2005-05-16  3:26 ` Douglas Gilbert
2005-05-16  4:18   ` Al Viro
2005-05-21  5:03 ` Douglas Gilbert
2005-05-21 15:01 ` James Bottomley
2005-05-21 15:38   ` Jeff Garzik
2005-05-21 16:00     ` James Bottomley
2005-05-21 16:22       ` Al Viro
2005-05-21 18:12         ` James Bottomley
2005-05-21 22:06           ` Douglas Gilbert
2005-05-22  5:08             ` Douglas Gilbert
2005-05-21 15:24 ` James Bottomley
2005-05-22 10:15   ` Douglas Gilbert [this message]
2005-05-22  6:31 ` Douglas Gilbert
2005-05-22 14:06   ` James Bottomley
2005-05-23 15:14     ` Douglas Gilbert
2006-02-08 23:39 ` Stefan Richter
2006-02-08 23:54   ` Al Viro
2006-02-11  9:50     ` Stefan Richter
2006-02-11 13:05       ` Al Viro
2006-02-13 20:40       ` Stefan Richter
2006-02-20  6:08       ` Al Viro
2006-02-21 19:56         ` Stefan Richter
2006-02-21 21:51           ` Al Viro
2006-02-21 22:41             ` Stefan Richter
2006-02-22  7:08             ` Stefan Richter
2006-02-22  7:16               ` Al Viro
2006-02-22  7:35                 ` Stefan Richter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42905BCB.4070809@torque.net \
    --to=dougg@torque.net \
    --cc=James.Bottomley@SteelEye.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.