From 7027ad72a689797475973c6feb5f0b673382f779 Mon Sep 17 00:00:00 2001 From: "Martin K. Petersen" Date: Thu, 17 Jul 2008 17:08:48 -0400 Subject: [SCSI] Support devices with protection information Implement support for DMA of protection information for devices that are data integrity capable. - Add support for mapping an extra scatter-gather list containing the protection information. - Allocate protection scsi_data_buffer if host is DIX (integrity DMA) capable. - Accessor function for checking whether a device has protection enabled. Signed-off-by: Martin K. Petersen Signed-off-by: James Bottomley --- include/scsi/scsi_device.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/scsi/scsi_device.h') diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 4deb9349eeb..9cecc409f0f 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -423,6 +423,11 @@ static inline int scsi_device_enclosure(struct scsi_device *sdev) return sdev->inquiry[6] & (1<<6); } +static inline int scsi_device_protection(struct scsi_device *sdev) +{ + return sdev->inquiry[5] & (1<<0); +} + #define MODULE_ALIAS_SCSI_DEVICE(type) \ MODULE_ALIAS("scsi:t-" __stringify(type) "*") #define SCSI_DEVICE_MODALIAS_FMT "scsi:t-0x%02x" -- cgit v1.2.3