scsi: pm80xx: Restore support for expanders
Commit0f630c58e3("scsi: pm80xx: Do not use libsas port ID") broke support for expanders. After the commit, devices behind an expander are no longer detected. Simply reverting the commit restores support for devices behind an expander. Instead of reverting the commit (and reintroducing a helper to get the port), get the port directly from the lldd_port pointer in struct asd_sas_port. Fixes:0f630c58e3("scsi: pm80xx: Do not use libsas port ID") Suggested-by: Igor Pylypiv <ipylypiv@google.com> Reviewed-by: Igor Pylypiv <ipylypiv@google.com> Signed-off-by: Niklas Cassel <cassel@kernel.org> Link: https://lore.kernel.org/r/20250814173215.1765055-13-cassel@kernel.org Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Tested-by: Damien Le Moal <dlemoal@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
committed by
Martin K. Petersen
parent
8f5ae30d69
commit
eeee108607
@@ -477,7 +477,7 @@ int pm8001_queue_command(struct sas_task *task, gfp_t gfp_flags)
|
||||
struct pm8001_device *pm8001_dev = dev->lldd_dev;
|
||||
bool internal_abort = sas_is_internal_abort(task);
|
||||
struct pm8001_hba_info *pm8001_ha;
|
||||
struct pm8001_port *port = NULL;
|
||||
struct pm8001_port *port;
|
||||
struct pm8001_ccb_info *ccb;
|
||||
unsigned long flags;
|
||||
u32 n_elem = 0;
|
||||
@@ -502,8 +502,7 @@ int pm8001_queue_command(struct sas_task *task, gfp_t gfp_flags)
|
||||
|
||||
spin_lock_irqsave(&pm8001_ha->lock, flags);
|
||||
|
||||
pm8001_dev = dev->lldd_dev;
|
||||
port = pm8001_ha->phy[pm8001_dev->attached_phy].port;
|
||||
port = dev->port->lldd_port;
|
||||
|
||||
if (!internal_abort &&
|
||||
(DEV_IS_GONE(pm8001_dev) || !port || !port->port_attached)) {
|
||||
|
||||
Reference in New Issue
Block a user