]> xenbits.xensource.com Git - people/pauldu/linux.git/commitdiff
scsi: pm80xx: Use phy-specific SAS address when sending PHY_START command
authorMichal Grzedzicki <mge@meta.com>
Wed, 13 Sep 2023 15:56:10 +0000 (08:56 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 14 Sep 2023 00:04:22 +0000 (20:04 -0400)
Some cards have more than one SAS address. Using an incorrect address
causes communication issues with some devices like expanders.

Closes: https://lore.kernel.org/linux-kernel/A57AEA84-5CA0-403E-8053-106033C73C70@fb.com/
Signed-off-by: Michal Grzedzicki <mge@meta.com>
Link: https://lore.kernel.org/r/20230913155611.3183612-1-mge@meta.com
Acked-by: Jack Wang <jinpu.wang@ionos.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/pm8001/pm8001_hwi.c
drivers/scsi/pm8001/pm80xx_hwi.c

index 33053db5a7134c4ed230ed8fb901956e5a96ab30..90069c7b164256bb98ee745e8a8da8244ae05ef1 100644 (file)
@@ -4180,7 +4180,7 @@ pm8001_chip_phy_start_req(struct pm8001_hba_info *pm8001_ha, u8 phy_id)
        payload.sas_identify.dev_type = SAS_END_DEVICE;
        payload.sas_identify.initiator_bits = SAS_PROTOCOL_ALL;
        memcpy(payload.sas_identify.sas_addr,
-               pm8001_ha->sas_addr, SAS_ADDR_SIZE);
+               &pm8001_ha->phy[phy_id].dev_sas_addr, SAS_ADDR_SIZE);
        payload.sas_identify.phy_id = phy_id;
 
        return pm8001_mpi_build_cmd(pm8001_ha, 0, opcode, &payload,
index f6857632dc7cd70d6cb3682fb43603b40d798632..1b2c40b1381c9f066be4486ded0628e0cb056209 100644 (file)
@@ -4671,7 +4671,7 @@ pm80xx_chip_phy_start_req(struct pm8001_hba_info *pm8001_ha, u8 phy_id)
        payload.sas_identify.dev_type = SAS_END_DEVICE;
        payload.sas_identify.initiator_bits = SAS_PROTOCOL_ALL;
        memcpy(payload.sas_identify.sas_addr,
-         &pm8001_ha->sas_addr, SAS_ADDR_SIZE);
+               &pm8001_ha->phy[phy_id].dev_sas_addr, SAS_ADDR_SIZE);
        payload.sas_identify.phy_id = phy_id;
 
        return pm8001_mpi_build_cmd(pm8001_ha, 0, opcode, &payload,