mvsas: fix local port name regression Commit a692b0e "[SCSI] libsas: fix sas port naming" added a dependency on lldds filling out the id field of registered phys. Add this for mvsas. Note we do this in the lldd rather than the core to allow it the control of mappping physical phy id to the libsas phy index. Reported-by: Tom Rini <trini@ti.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c index cc59dff..0c9af72 100644 --- a/drivers/scsi/mvsas/mv_init.c +++ b/drivers/scsi/mvsas/mv_init.c
@@ -497,10 +497,12 @@ for (j = 0; j < nr_core; j++) { mvi = ((struct mvs_prv_info *)sha->lldd_ha)->mvi[j]; for (i = 0; i < chip_info->n_phy; i++) { - sha->sas_phy[j * chip_info->n_phy + i] = - &mvi->phy[i].sas_phy; - sha->sas_port[j * chip_info->n_phy + i] = - &mvi->port[i].sas_port; + struct asd_sas_phy *phy = &mvi->phy[i].sas_phy; + int id = j * chip_info->n_phy + i; + + phy->id = id; + sha->sas_phy[id] = phy; + sha->sas_port[id] = &mvi->port[i].sas_port; } }