Re: Commit a692b0e broke my mvsas card

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2012-04-16 at 18:53 -0700, Tom Rini wrote:
> > Thanks, yes it looks like a new regression.  Can you tell me if the
> > following fixes it?
> 
> No joy, oopses.  http://alnk.org/43youngkirby for the dmesg and oops.
> 

Agh, sorry, I rushed that one.  The phy array is initialized later, here
is another run at it:

----
mvsas: fix local port name regression

From: Dan Williams <dan.j.williams@xxxxxxxxx>

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@xxxxxx>
Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx>
---
 drivers/scsi/mvsas/mv_init.c |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

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 @@ static void  __devinit mvs_post_sas_ha_init(struct Scsi_Host *shost,
 	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;
 		}
 	}
 




--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux