summaryrefslogtreecommitdiff
path: root/drivers/scsi/isci/init.c
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2012-02-10 13:18:34 +0400
committerJames Bottomley <JBottomley@Parallels.com>2012-02-19 19:14:24 +0400
commit3d2d752549150c2706f6bf8d8a2cceb89ef9f42e (patch)
treeb50821eef1f21902c5d22263001e202b65c3d680 /drivers/scsi/isci/init.c
parenta6fe35c052c4fdd1e8e21251f14eea0bd4bbd25b (diff)
downloadlinux-3d2d752549150c2706f6bf8d8a2cceb89ef9f42e.tar.xz
[SCSI] isci: T10 DIF support
This allows the controller to do WRITE_INSERT and READ_STRIP for SAS disks that support protection information. SAS disks must be formatted with protection information to use this feature via sg_format. sg3_utils-1.32 -- sg_format version 1.19 20110730 sg_format usage: sg_format --format --verbose --pinfo /dev/sda Acked-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/isci/init.c')
-rw-r--r--drivers/scsi/isci/init.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c
index 17c4c2c89c2e..6b911e0aea3f 100644
--- a/drivers/scsi/isci/init.c
+++ b/drivers/scsi/isci/init.c
@@ -528,6 +528,13 @@ static int __devinit isci_pci_probe(struct pci_dev *pdev, const struct pci_devic
goto err_host_alloc;
}
pci_info->hosts[i] = h;
+
+ /* turn on DIF support */
+ scsi_host_set_prot(h->shost,
+ SHOST_DIF_TYPE1_PROTECTION |
+ SHOST_DIF_TYPE2_PROTECTION |
+ SHOST_DIF_TYPE3_PROTECTION);
+ scsi_host_set_guard(h->shost, SHOST_DIX_GUARD_CRC);
}
err = isci_setup_interrupts(pdev);