提交 b30c2fc1 编写于 作者: J James Bottomley

[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: NJames Bottomley <James.Bottomley@HansenPartnership.com>
上级 a0899d4d
......@@ -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) "*")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册