diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2012-08-28 14:29:35 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-09-24 04:11:00 -0400 |
commit | d974e4265dbd35db118c318176727ecb7f469de3 (patch) | |
tree | fbec9c25dbed708722d334601ed0adcf38f210cd /include/scsi | |
parent | 8172499aae4d375334cfe6361900929c3b31a03f (diff) |
[SCSI] Disable DIF on Hitachi Ultrastar 15K300
Hitachi Ultrastar 15K300 is quirky. Disable T10 PI (DIF).
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/scsi_device.h | 4 | ||||
-rw-r--r-- | include/scsi/scsi_devinfo.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 9895f69294fc..88fae8d20154 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -156,6 +156,7 @@ struct scsi_device { | |||
156 | unsigned is_visible:1; /* is the device visible in sysfs */ | 156 | unsigned is_visible:1; /* is the device visible in sysfs */ |
157 | unsigned can_power_off:1; /* Device supports runtime power off */ | 157 | unsigned can_power_off:1; /* Device supports runtime power off */ |
158 | unsigned wce_default_on:1; /* Cache is ON by default */ | 158 | unsigned wce_default_on:1; /* Cache is ON by default */ |
159 | unsigned no_dif:1; /* T10 PI (DIF) should be disabled */ | ||
159 | 160 | ||
160 | DECLARE_BITMAP(supported_events, SDEV_EVT_MAXBITS); /* supported events */ | 161 | DECLARE_BITMAP(supported_events, SDEV_EVT_MAXBITS); /* supported events */ |
161 | struct list_head event_list; /* asserted events */ | 162 | struct list_head event_list; /* asserted events */ |
@@ -476,6 +477,9 @@ static inline int scsi_device_enclosure(struct scsi_device *sdev) | |||
476 | 477 | ||
477 | static inline int scsi_device_protection(struct scsi_device *sdev) | 478 | static inline int scsi_device_protection(struct scsi_device *sdev) |
478 | { | 479 | { |
480 | if (sdev->no_dif) | ||
481 | return 0; | ||
482 | |||
479 | return sdev->scsi_level > SCSI_2 && sdev->inquiry[5] & (1<<0); | 483 | return sdev->scsi_level > SCSI_2 && sdev->inquiry[5] & (1<<0); |
480 | } | 484 | } |
481 | 485 | ||
diff --git a/include/scsi/scsi_devinfo.h b/include/scsi/scsi_devinfo.h index b4ddd3b18b4c..cc1f3e786ad7 100644 --- a/include/scsi/scsi_devinfo.h +++ b/include/scsi/scsi_devinfo.h | |||
@@ -30,4 +30,5 @@ | |||
30 | #define BLIST_RETRY_HWERROR 0x400000 /* retry HARDWARE_ERROR */ | 30 | #define BLIST_RETRY_HWERROR 0x400000 /* retry HARDWARE_ERROR */ |
31 | #define BLIST_MAX_512 0x800000 /* maximum 512 sector cdb length */ | 31 | #define BLIST_MAX_512 0x800000 /* maximum 512 sector cdb length */ |
32 | #define BLIST_ATTACH_PQ3 0x1000000 /* Scan: Attach to PQ3 devices */ | 32 | #define BLIST_ATTACH_PQ3 0x1000000 /* Scan: Attach to PQ3 devices */ |
33 | #define BLIST_NO_DIF 0x2000000 /* Disable T10 PI (DIF) */ | ||
33 | #endif | 34 | #endif |