[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>
This commit is contained in:
committed by
James Bottomley
parent
008cd5bbfb
commit
4ff36718ed
@@ -24,13 +24,6 @@
|
||||
extern const unsigned char scsi_command_size[8];
|
||||
#define COMMAND_SIZE(opcode) scsi_command_size[((opcode) >> 5) & 7]
|
||||
|
||||
/*
|
||||
* SCSI device types
|
||||
*/
|
||||
|
||||
#define MAX_SCSI_DEVICE_CODE 15
|
||||
extern const char *const scsi_device_types[MAX_SCSI_DEVICE_CODE];
|
||||
|
||||
/*
|
||||
* Special value for scanning to specify scanning or rescanning of all
|
||||
* possible channels, (target) ids, or luns on a given shost.
|
||||
@@ -225,6 +218,9 @@ static inline int scsi_status_is_good(int status)
|
||||
#define TYPE_RBC 0x0e
|
||||
#define TYPE_NO_LUN 0x7f
|
||||
|
||||
/* Returns a human-readable name for the device */
|
||||
extern const char * scsi_device_type(unsigned type);
|
||||
|
||||
/*
|
||||
* standard mode-select header prepended to all mode-select commands
|
||||
*/
|
||||
|
Reference in New Issue
Block a user