]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
scsi: pm80xx: Apply byte mask for phy ID in mpi_phy_start_resp()
authorIgor Pylypiv <ipylypiv@google.com>
Mon, 1 Nov 2021 23:28:22 +0000 (16:28 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 19 Nov 2021 03:26:58 +0000 (22:26 -0500)
Phy ID is located in the least significant byte of the 4-byte field.
mpi_phy_stop_resp() already applies such mask.

Link: https://lore.kernel.org/r/20211101232825.2350233-2-ipylypiv@google.com
Reviewed-by: Vishakha Channapattan <vishakhavc@google.com>
Acked-by: Jack Wang <jinpu.wang@ionos.com>
Signed-off-by: Igor Pylypiv <ipylypiv@google.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/pm8001/pm80xx_hwi.c

index b9f6d83ff380c872bba3d5e40f65043d2a892d7f..88541ca2a629e970637c18f93e7329b8cf9d6d67 100644 (file)
@@ -3519,7 +3519,7 @@ static int mpi_phy_start_resp(struct pm8001_hba_info *pm8001_ha, void *piomb)
        u32 status =
                le32_to_cpu(pPayload->status);
        u32 phy_id =
-               le32_to_cpu(pPayload->phyid);
+               le32_to_cpu(pPayload->phyid) & 0xFF;
        struct pm8001_phy *phy = &pm8001_ha->phy[phy_id];
 
        pm8001_dbg(pm8001_ha, INIT,