From b30c2fc1113edfb2371427c10503ff942b0a0370 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Sun, 20 Jan 2008 09:09:40 -0600 Subject: [SCSI] scsi.h: add macro for enclosure bit of inquiry data The macro tells us whether the device is (or contains) an enclosure device. Signed-off-by: James Bottomley --- include/scsi/scsi_device.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/scsi/scsi_device.h') diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 3c8f898b160..ab7acbe8096 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -387,6 +387,10 @@ static inline int scsi_device_qas(struct scsi_device *sdev) return 0; return sdev->inquiry[56] & 0x02; } +static inline int scsi_device_enclosure(struct scsi_device *sdev) +{ + return sdev->inquiry[6] & (1<<6); +} #define MODULE_ALIAS_SCSI_DEVICE(type) \ MODULE_ALIAS("scsi:t-" __stringify(type) "*") -- cgit v1.2.3