Skip to contentSkip to conversation

isci: T10 DIF support

PATCH In review Dan Williams 1 participant 2 messages Jan 27, 2012 – Jan 28, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 isci: T10 DIF support

From: Dave Jiang <[email protected]>

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

---

for scsi-misc / 3.4

 drivers/scsi/isci/init.c             |    7 ++
 drivers/scsi/isci/request.c          |  148 ++++++++++++++++++++++++++++++++++
 drivers/scsi/isci/scu_task_context.h |   55 +++++++++----
 3 files changed, 194 insertions(+), 16 deletions(-)
drivers/scsi/isci/init.c +7 -0
index 437f76b..2a63027 100644
@@ -506,6 +506,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);
drivers/scsi/isci/request.c +148 -0

172 lines not on this page · raw message

drivers/scsi/isci/scu_task_context.h +39 -16

87 lines not on this page · raw message

#1 lore raw
Quoted 6 lines · Dan Williams

From: Dave Jiang <[email protected]>

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.

Quoted 8 lines

 sg3_utils-1.32 -- sg_format version 1.19 20110730 sg_format usage:
 sg_format --format --verbose --pinfo /dev/sda

---

Sorry, some checkpatch escapes in this one... will resend. --
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html