]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[SCSI] scsi.h: add macro for enclosure bit of inquiry data
authorJames Bottomley <James.Bottomley@HansenPartnership.com>
Sun, 20 Jan 2008 15:09:40 +0000 (09:09 -0600)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Wed, 23 Jan 2008 17:29:35 +0000 (11:29 -0600)
The macro tells us whether the device is (or contains) an enclosure device.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
include/scsi/scsi_device.h

index 3c8f898b160e068fc8ee5baf92f386db1fd2ef4b..ab7acbe809602b94e693da7fac9bc12a8ad47a89 100644 (file)
@@ -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) "*")