From: James Bottomley Date: Sun, 20 Jan 2008 15:09:40 +0000 (-0600) Subject: [SCSI] scsi.h: add macro for enclosure bit of inquiry data X-Git-Tag: v2.6.25-rc1~1230^2~13 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b30c2fc1113edfb2371427c10503ff942b0a0370;p=linux-2.6 [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 --- diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 3c8f898b16..ab7acbe809 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) "*")