aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/scsi_device.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/scsi/scsi_device.h')
-rw-r--r--include/scsi/scsi_device.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index 4deb9349eebf..9cecc409f0f8 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -423,6 +423,11 @@ static inline int scsi_device_enclosure(struct scsi_device *sdev)
423 return sdev->inquiry[6] & (1<<6); 423 return sdev->inquiry[6] & (1<<6);
424} 424}
425 425
426static inline int scsi_device_protection(struct scsi_device *sdev)
427{
428 return sdev->inquiry[5] & (1<<0);
429}
430
426#define MODULE_ALIAS_SCSI_DEVICE(type) \ 431#define MODULE_ALIAS_SCSI_DEVICE(type) \
427 MODULE_ALIAS("scsi:t-" __stringify(type) "*") 432 MODULE_ALIAS("scsi:t-" __stringify(type) "*")
428#define SCSI_DEVICE_MODALIAS_FMT "scsi:t-0x%02x" 433#define SCSI_DEVICE_MODALIAS_FMT "scsi:t-0x%02x"