diff mbox series

[1/4] scsi: pm80xx: Apply byte mask for phy id in mpi_phy_start_resp()

Message ID 20211101232825.2350233-2-ipylypiv@google.com (mailing list archive)
State Accepted
Headers show
Series small pm80xx cleanups and fixes | expand

Commit Message

Igor Pylypiv Nov. 1, 2021, 11:28 p.m. UTC
Phy id is located in the least significant byte of the 4-byte field.
mpi_phy_stop_resp() already applies such mask.

Reviewed-by: Vishakha Channapattan <vishakhavc@google.com>
Signed-off-by: Igor Pylypiv <ipylypiv@google.com>
---
 drivers/scsi/pm8001/pm80xx_hwi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jinpu Wang Nov. 2, 2021, 7:04 a.m. UTC | #1
On Tue, Nov 2, 2021 at 12:28 AM Igor Pylypiv <ipylypiv@google.com> wrote:
>
> Phy id is located in the least significant byte of the 4-byte field.
> mpi_phy_stop_resp() already applies such mask.
>
> Reviewed-by: Vishakha Channapattan <vishakhavc@google.com>
> Signed-off-by: Igor Pylypiv <ipylypiv@google.com>
Acked-by: Jack Wang <jinpu.wang@ionos.com>
Thanks
> ---
>  drivers/scsi/pm8001/pm80xx_hwi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c
> index 6ffe17b849ae..4f887925c9d2 100644
> --- a/drivers/scsi/pm8001/pm80xx_hwi.c
> +++ b/drivers/scsi/pm8001/pm80xx_hwi.c
> @@ -3481,7 +3481,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,
> --
> 2.33.1.1089.g2158813163f-goog
>
diff mbox series

Patch

diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c
index 6ffe17b849ae..4f887925c9d2 100644
--- a/drivers/scsi/pm8001/pm80xx_hwi.c
+++ b/drivers/scsi/pm8001/pm80xx_hwi.c
@@ -3481,7 +3481,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,