]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
scsi: lpfc: Correct topology type reporting on G7 adapters
authorJames Smart <jsmart2021@gmail.com>
Fri, 30 Nov 2018 00:09:38 +0000 (16:09 -0800)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:23:04 +0000 (14:23 -0300)
BugLink: https://bugs.launchpad.net/bugs/1857158
[ Upstream commit 76558b25733140a0c6bd53ea8af04b2811c92ec3 ]

Driver missed classifying the chip type for G7 when reporting supported
topologies. This resulted in loop being shown as supported on FC links that
are not supported per the standard.

Add the chip classifications to the topology checks in the driver.

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/scsi/lpfc/lpfc_attr.c
drivers/scsi/lpfc/lpfc_mbox.c

index d1051868f4a39cefae2209cc5f2a3cf1a4f79ee0..d2f088492b42b02bbbcc1d920850f6eb2f289205 100644 (file)
@@ -3680,8 +3680,9 @@ lpfc_topology_store(struct device *dev, struct device_attribute *attr,
                                val);
                        return -EINVAL;
                }
-               if (phba->pcidev->device == PCI_DEVICE_ID_LANCER_G6_FC &&
-                       val == 4) {
+               if ((phba->pcidev->device == PCI_DEVICE_ID_LANCER_G6_FC ||
+                    phba->pcidev->device == PCI_DEVICE_ID_LANCER_G7_FC) &&
+                   val == 4) {
                        lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
                                "3114 Loop mode not supported\n");
                        return -EINVAL;
index 47c02da11f015f49d51fdd6471b7aa61d8bf3be1..5444f3ca2871537e6d61da1115c9571da44a8cfc 100644 (file)
@@ -513,9 +513,9 @@ lpfc_init_link(struct lpfc_hba * phba,
                break;
        }
 
-       if (phba->pcidev->device == PCI_DEVICE_ID_LANCER_G6_FC &&
-               mb->un.varInitLnk.link_flags & FLAGS_TOPOLOGY_MODE_LOOP) {
-               /* Failover is not tried for Lancer G6 */
+       if ((phba->pcidev->device == PCI_DEVICE_ID_LANCER_G6_FC ||
+            phba->pcidev->device == PCI_DEVICE_ID_LANCER_G7_FC) &&
+           mb->un.varInitLnk.link_flags & FLAGS_TOPOLOGY_MODE_LOOP) {
                mb->un.varInitLnk.link_flags = FLAGS_TOPOLOGY_MODE_PT_PT;
                phba->cfg_topology = FLAGS_TOPOLOGY_MODE_PT_PT;
        }