Skip to content

Commit

Permalink
[SCSI] scsi.h: add macro for enclosure bit of inquiry data
Browse files Browse the repository at this point in the history
The macro tells us whether the device is (or contains) an enclosure device.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
  • Loading branch information
James Bottomley authored and James Bottomley committed Jan 23, 2008
1 parent a0899d4 commit b30c2fc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/scsi/scsi_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) "*")
Expand Down

0 comments on commit b30c2fc

Please sign in to comment.