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/megaraid.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/megaraid.c')
-rw-r--r-- | drivers/scsi/megaraid.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index 76edbb639d37..ccb0055ac73a 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c | |||
@@ -2822,9 +2822,7 @@ mega_print_inquiry(char *page, char *scsi_inq) | |||
2822 | 2822 | ||
2823 | i = scsi_inq[0] & 0x1f; | 2823 | i = scsi_inq[0] & 0x1f; |
2824 | 2824 | ||
2825 | len += sprintf(page+len, " Type: %s ", | 2825 | len += sprintf(page+len, " Type: %s ", scsi_device_type(i)); |
2826 | i < MAX_SCSI_DEVICE_CODE ? scsi_device_types[i] : | ||
2827 | "Unknown "); | ||
2828 | 2826 | ||
2829 | len += sprintf(page+len, | 2827 | len += sprintf(page+len, |
2830 | " ANSI SCSI revision: %02x", scsi_inq[2] & 0x07); | 2828 | " ANSI SCSI revision: %02x", scsi_inq[2] & 0x07); |