Commit ad70c6bc authored by Niklas Cassel's avatar Niklas Cassel Committed by Martin K. Petersen
Browse files

scsi: pm80xx: Fix pm8001_abort_task() for chip_8006 when using an expander



For a direct attached device, attached_phy contains the local phy id.
For a device behind an expander, attached_phy contains the remote phy
id, not the local phy id.

The pm8001_ha->phy array only contains the phys of the HBA.  It does not
contain the phys of the expander.

Thus, you cannot use attached_phy to index the pm8001_ha->phy array,
without first verifying that the device is directly attached.

Use the pm80xx_get_local_phy_id() helper to make sure that we use the
local phy id to index the array, regardless if the device is directly
attached or not.

Fixes: 869ddbdc ("scsi: pm80xx: corrected SATA abort handling sequence.")
Reviewed-by: default avatarIgor Pylypiv <ipylypiv@google.com>
Signed-off-by: default avatarNiklas Cassel <cassel@kernel.org>
Link: https://lore.kernel.org/r/20250814173215.1765055-21-cassel@kernel.org


Reviewed-by: default avatarDamien Le Moal <dlemoal@kernel.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent b4ec9830
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment