scsi: lpfc: Complete removal of FCoE T10 PI support on SLI-4 adapters
authorJames Smart <jsmart2021@gmail.com>
Sun, 22 Sep 2019 03:59:04 +0000 (20:59 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 1 Oct 2019 02:07:11 +0000 (22:07 -0400)
T10 PI support on SLI-4-based FCoE adapters is not supported.  A prior
commit in the 12.4.0.0 stream added device recognition that would prevent
T10 PI enablement. However, it didn't contain a complete device list. Thus
some SLI-4 FCoE adapters still had T10 PI enabled.

Fix by expanding the device list that identifies FCoE devices.

Link: https://lore.kernel.org/r/20190922035906.10977-19-jsmart2021@gmail.com
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_attr.c

index 79a19247975558269d6ab62336125aca42e47ae3..e4c89e56c63286387cf6e787d7207d5b395ceee6 100644 (file)
@@ -7083,11 +7083,22 @@ struct fc_function_template lpfc_vport_transport_functions = {
 static void
 lpfc_get_hba_function_mode(struct lpfc_hba *phba)
 {
-       /* If it's a SkyHawk FCoE adapter */
-       if (phba->pcidev->device == PCI_DEVICE_ID_SKYHAWK)
+       /* If the adapter supports FCoE mode */
+       switch (phba->pcidev->device) {
+       case PCI_DEVICE_ID_SKYHAWK:
+       case PCI_DEVICE_ID_SKYHAWK_VF:
+       case PCI_DEVICE_ID_LANCER_FCOE:
+       case PCI_DEVICE_ID_LANCER_FCOE_VF:
+       case PCI_DEVICE_ID_ZEPHYR_DCSP:
+       case PCI_DEVICE_ID_HORNET:
+       case PCI_DEVICE_ID_TIGERSHARK:
+       case PCI_DEVICE_ID_TOMCAT:
                phba->hba_flag |= HBA_FCOE_MODE;
-       else
+               break;
+       default:
+       /* for others, clear the flag */
                phba->hba_flag &= ~HBA_FCOE_MODE;
+       }
 }
 
 /**