]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
scsi: hisi_sas: fix port form bug in hisi_sas_port_notify_formed()
authorXiang Chen <chenxiang66@hisilicon.com>
Mon, 7 Nov 2016 12:48:33 +0000 (20:48 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 25 Nov 2016 14:54:39 +0000 (09:54 -0500)
When we form a wideport, we should use hardware PHY port_id instead
of sas_phy->id.

Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Reviewed-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hisi_sas/hisi_sas_main.c

index 9f5ccc59075aad80b9b6ffab8b5c90e90d60c386..486aa927f92e78ccb0649873e9d3b5640d3f094d 100644 (file)
@@ -537,7 +537,7 @@ static void hisi_sas_port_notify_formed(struct asd_sas_phy *sas_phy)
        struct hisi_hba *hisi_hba = sas_ha->lldd_ha;
        struct hisi_sas_phy *phy = sas_phy->lldd_phy;
        struct asd_sas_port *sas_port = sas_phy->port;
-       struct hisi_sas_port *port = &hisi_hba->port[sas_phy->id];
+       struct hisi_sas_port *port = &hisi_hba->port[phy->port_id];
        unsigned long flags;
 
        if (!sas_port)