aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi.c')
-rw-r--r--drivers/scsi/scsi.c36
1 files changed, 26 insertions, 10 deletions
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index b332caddd5b..94df671d776 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -96,24 +96,40 @@ unsigned int scsi_logging_level;
96EXPORT_SYMBOL(scsi_logging_level); 96EXPORT_SYMBOL(scsi_logging_level);
97#endif 97#endif
98 98
99const char *const scsi_device_types[MAX_SCSI_DEVICE_CODE] = { 99static const char *const scsi_device_types[] = {
100 "Direct-Access ", 100 "Direct access ",
101 "Sequential-Access", 101 "Sequential access",
102 "Printer ", 102 "Printer ",
103 "Processor ", 103 "Processor ",
104 "WORM ", 104 "WORM ",
105 "CD-ROM ", 105 "CD/DVD ",
106 "Scanner ", 106 "Scanner ",
107 "Optical Device ", 107 "Optical memory ",
108 "Medium Changer ", 108 "Media changer ",
109 "Communications ", 109 "Communications ",
110 "Unknown ", 110 "ASC IT8 ",
111 "Unknown ", 111 "ASC IT8 ",
112 "RAID ", 112 "RAID ",
113 "Enclosure ", 113 "Enclosure ",
114 "Direct-Access-RBC", 114 "Direct access RBC",
115 "Optical card ",
116 "Bridge controller",
117 "Object storage ",
118 "Automation/Drive ",
115}; 119};
116EXPORT_SYMBOL(scsi_device_types); 120
121const char * scsi_device_type(unsigned type)
122{
123 if (type == 0x1e)
124 return "Well-known LUN ";
125 if (type == 0x1f)
126 return "No Device ";
127 if (type > ARRAY_SIZE(scsi_device_types))
128 return "Unknown ";
129 return scsi_device_types[type];
130}
131
132EXPORT_SYMBOL(scsi_device_type);
117 133
118struct scsi_host_cmd_pool { 134struct scsi_host_cmd_pool {
119 kmem_cache_t *slab; 135 kmem_cache_t *slab;