public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: Tom Rini <trini@ti.com>
Cc: linux-scsi@vger.kernel.org,
	James Bottomley <JBottomley@parallels.com>,
	Xiangliang Yu <yuxiangl@marvell.com>
Subject: Re: Commit a692b0e broke my mvsas card
Date: Mon, 16 Apr 2012 20:25:57 -0700	[thread overview]
Message-ID: <1334633159.13899.4.camel@dwillia2-mobl> (raw)
In-Reply-To: <4F8CCD0C.5060900@ti.com>

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@intel.com>

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>
---
 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;
 		}
 	}
 





  reply	other threads:[~2012-04-17  3:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-16 22:42 Commit a692b0e broke my mvsas card Tom Rini
2012-04-16 23:12 ` Dan Williams
2012-04-16 23:34   ` Tom Rini
2012-04-16 23:59     ` Dan Williams
2012-04-17  1:53       ` Tom Rini
2012-04-17  3:25         ` Dan Williams [this message]
2012-04-17 14:44           ` Tom Rini
2012-04-17 16:50             ` Dan Williams
2012-04-17 17:21               ` Tom Rini
2012-04-17 15:47           ` James Bottomley
2012-04-17 17:17             ` Dan Williams
2012-04-18  5:11               ` Dan Williams
2012-04-18  5:37                 ` James Bottomley
2012-04-18 15:23                 ` Tom Rini
2012-04-18 15:46                   ` Dan Williams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1334633159.13899.4.camel@dwillia2-mobl \
    --to=dan.j.williams@intel.com \
    --cc=JBottomley@parallels.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=trini@ti.com \
    --cc=yuxiangl@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox