[PATCH 06 of 16] Detect devices with protection information turned on in INQUIRY

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2 files changed, 4 insertions(+)
drivers/scsi/scsi_scan.c   |    3 +++
include/scsi/scsi_device.h |    1 +


Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>

---

diff -r 26ccaf2ccdc5 -r bfbea544d342 drivers/scsi/scsi_scan.c
--- a/drivers/scsi/scsi_scan.c	Fri Apr 25 17:39:29 2008 -0400
+++ b/drivers/scsi/scsi_scan.c	Fri Apr 25 17:39:29 2008 -0400
@@ -877,6 +877,9 @@
 
 	if (*bflags & BLIST_USE_10_BYTE_MS)
 		sdev->use_10_for_ms = 1;
+
+	if (inq_result[5] & 0x1)
+		sdev->protection = 1;
 
 	/* set the device running here so that slave configure
 	 * may do I/O */
diff -r 26ccaf2ccdc5 -r bfbea544d342 include/scsi/scsi_device.h
--- a/include/scsi/scsi_device.h	Fri Apr 25 17:39:29 2008 -0400
+++ b/include/scsi/scsi_device.h	Fri Apr 25 17:39:29 2008 -0400
@@ -140,6 +140,7 @@
 	unsigned guess_capacity:1;	/* READ_CAPACITY might be too high by 1 */
 	unsigned retry_hwerror:1;	/* Retry HARDWARE_ERROR */
 	unsigned last_sector_bug:1;	/* Always read last sector in a 1 sector read */
+	unsigned protection:1;		/* Data Integrity Field */
 
 	DECLARE_BITMAP(supported_events, SDEV_EVT_MAXBITS); /* supported events */
 	struct list_head event_list;	/* asserted events */


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux