Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b30c2fc1113edfb2371427c10503ff942b0a0370 Commit: b30c2fc1113edfb2371427c10503ff942b0a0370 Parent: a0899d4df534d2bcf671b0f647b809842309a9ae Author: James Bottomley <[EMAIL PROTECTED]> AuthorDate: Sun Jan 20 09:09:40 2008 -0600 Committer: James Bottomley <[EMAIL PROTECTED]> CommitDate: Wed Jan 23 11:29:35 2008 -0600
[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 <[EMAIL PROTECTED]> --- include/scsi/scsi_device.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 3c8f898..ab7acbe 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) "*") - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html