diff options
author | Matthew Wilcox <matthew@wil.cx> | 2006-07-04 14:15:20 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-08-06 16:59:26 -0400 |
commit | 4ff36718ede26ee2da73f2dae94d71e2b06845fc (patch) | |
tree | d9188d88bb3f60427c9976ed0f3da8bf433bb757 /drivers/scsi/g_NCR5380.c | |
parent | 008cd5bbfb4763322837cd1f7c621f02ebe22fef (diff) |
[SCSI] Improve inquiry printing
- Replace scsi_device_types array API with scsi_device_type function API.
Gets rid of a lot of common code, as well as being easier to use.
- Add the new device types in SPC4 r05a, and rename some of the older ones.
- Reformat the printing of inquiry data; now fits on one line and
includes PQ.
I think I've addressed all the feedback from the previous versions. My
current test box prints:
scsi 2:0:1:0: Direct access HP 18.2G ATLAS10K3_18_SCA HP05 PQ: 0 ANSI: 2
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/g_NCR5380.c')
-rw-r--r-- | drivers/scsi/g_NCR5380.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c index 67f1100f3103..cdd893bb4e28 100644 --- a/drivers/scsi/g_NCR5380.c +++ b/drivers/scsi/g_NCR5380.c | |||
@@ -811,7 +811,6 @@ static int generic_NCR5380_proc_info(struct Scsi_Host *scsi_ptr, char *buffer, c | |||
811 | struct NCR5380_hostdata *hostdata; | 811 | struct NCR5380_hostdata *hostdata; |
812 | #ifdef NCR5380_STATS | 812 | #ifdef NCR5380_STATS |
813 | struct scsi_device *dev; | 813 | struct scsi_device *dev; |
814 | extern const char *const scsi_device_types[MAX_SCSI_DEVICE_CODE]; | ||
815 | #endif | 814 | #endif |
816 | 815 | ||
817 | NCR5380_setup(scsi_ptr); | 816 | NCR5380_setup(scsi_ptr); |
@@ -851,7 +850,7 @@ static int generic_NCR5380_proc_info(struct Scsi_Host *scsi_ptr, char *buffer, c | |||
851 | long tr = hostdata->time_read[dev->id] / HZ; | 850 | long tr = hostdata->time_read[dev->id] / HZ; |
852 | long tw = hostdata->time_write[dev->id] / HZ; | 851 | long tw = hostdata->time_write[dev->id] / HZ; |
853 | 852 | ||
854 | PRINTP(" T:%d %s " ANDP dev->id ANDP(dev->type < MAX_SCSI_DEVICE_CODE) ? scsi_device_types[(int) dev->type] : "Unknown"); | 853 | PRINTP(" T:%d %s " ANDP dev->id ANDP scsi_device_type(dev->type)); |
855 | for (i = 0; i < 8; i++) | 854 | for (i = 0; i < 8; i++) |
856 | if (dev->vendor[i] >= 0x20) | 855 | if (dev->vendor[i] >= 0x20) |
857 | *(buffer + (len++)) = dev->vendor[i]; | 856 | *(buffer + (len++)) = dev->vendor[i]; |