Skip to content

Commit 7bb25a8

Browse files
John Garrymartinkpetersen
authored andcommitted
scsi: hisi_sas: Set protection parameters prior to adding SCSI host
Currently we set the protection parameters after calling scsi_add_host() for v3 hw. They should be set beforehand, so make this change. Appearantly this fixes our DIX issue (not mainline yet) also, but more testing required. Fixes: d6a9000 ("scsi: hisi_sas: Add support for DIF feature for v2 hw") Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent a94a257 commit 7bb25a8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/scsi/hisi_sas/hisi_sas_v3_hw.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2507,6 +2507,12 @@ hisi_sas_v3_probe(struct pci_dev *pdev, const struct pci_device_id *id)
25072507
sha->sas_port[i] = &hisi_hba->port[i].sas_port;
25082508
}
25092509

2510+
if (hisi_hba->prot_mask) {
2511+
dev_info(dev, "Registering for DIF/DIX prot_mask=0x%x\n",
2512+
prot_mask);
2513+
scsi_host_set_prot(hisi_hba->shost, prot_mask);
2514+
}
2515+
25102516
rc = scsi_add_host(shost, dev);
25112517
if (rc)
25122518
goto err_out_ha;
@@ -2519,12 +2525,6 @@ hisi_sas_v3_probe(struct pci_dev *pdev, const struct pci_device_id *id)
25192525
if (rc)
25202526
goto err_out_register_ha;
25212527

2522-
if (hisi_hba->prot_mask) {
2523-
dev_info(dev, "Registering for DIF/DIX prot_mask=0x%x\n",
2524-
prot_mask);
2525-
scsi_host_set_prot(hisi_hba->shost, prot_mask);
2526-
}
2527-
25282528
scsi_scan_host(shost);
25292529

25302530
return 0;

0 commit comments

Comments
 (0)