From: Wayne Boyer <wayneb@linux.vnet.ibm.com>
To: James Bottomley <James.Bottomley@suse.de>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
Brian King <brking@linux.vnet.ibm.com>,
Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
Subject: [PATCH 1/2] ipr: fix lun assignment and comparison
Date: Thu, 04 Nov 2010 09:35:58 -0700 [thread overview]
Message-ID: <4CD2E0EE.5020802@linux.vnet.ibm.com> (raw)
In-Reply-To: <20101104162643.264567565@linux.vnet.ibm.com>
The lun value was not getting set up correctly for all devices attached to the
new 64 bit adapters. The fix is to move the logic to earlier in the
ipr_init_res_entry routine such that the value does get set correctly for all
devices.
Then the ipr_is_same_device comparison function was using the wrong lun value
in the logic for the new adapters. Change this to use the correct lun value.
Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
---
drivers/scsi/ipr.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
Index: b/drivers/scsi/ipr.c
===================================================================
--- a/drivers/scsi/ipr.c 2010-11-02 21:23:46.000000000 -0700
+++ b/drivers/scsi/ipr.c 2010-11-04 08:54:52.000000000 -0700
@@ -1048,6 +1048,8 @@ static void ipr_init_res_entry(struct ip
sizeof(res->res_path));
res->bus = 0;
+ memcpy(&res->dev_lun.scsi_lun, &cfgtew->u.cfgte64->lun,
+ sizeof(res->dev_lun.scsi_lun));
res->lun = scsilun_to_int(&res->dev_lun);
if (res->type == IPR_RES_TYPE_GENERIC_SCSI) {
@@ -1063,9 +1065,6 @@ static void ipr_init_res_entry(struct ip
ioa_cfg->max_devs_supported);
set_bit(res->target, ioa_cfg->target_ids);
}
-
- memcpy(&res->dev_lun.scsi_lun, &cfgtew->u.cfgte64->lun,
- sizeof(res->dev_lun.scsi_lun));
} else if (res->type == IPR_RES_TYPE_IOAFP) {
res->bus = IPR_IOAFP_VIRTUAL_BUS;
res->target = 0;
@@ -1116,7 +1115,7 @@ static int ipr_is_same_device(struct ipr
if (res->ioa_cfg->sis64) {
if (!memcmp(&res->dev_id, &cfgtew->u.cfgte64->dev_id,
sizeof(cfgtew->u.cfgte64->dev_id)) &&
- !memcmp(&res->lun, &cfgtew->u.cfgte64->lun,
+ !memcmp(&res->dev_lun.scsi_lun, &cfgtew->u.cfgte64->lun,
sizeof(cfgtew->u.cfgte64->lun))) {
return 1;
}
next parent reply other threads:[~2010-11-04 16:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20101104162643.264567565@linux.vnet.ibm.com>
2010-11-04 16:35 ` Wayne Boyer [this message]
2010-11-04 17:33 ` [PATCH 1/2] ipr: fix lun assignment and comparison Brian King
2010-11-04 16:36 ` [PATCH 2/2] ipr: fix mailbox register definition and add a delay before reading Wayne Boyer
2010-11-04 17:34 ` Brian King
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=4CD2E0EE.5020802@linux.vnet.ibm.com \
--to=wayneb@linux.vnet.ibm.com \
--cc=James.Bottomley@suse.de \
--cc=brking@linux.vnet.ibm.com \
--cc=klebers@linux.vnet.ibm.com \
--cc=linux-scsi@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).