Commit 9bc3711c authored by Stephen M. Cameron's avatar Stephen M. Cameron Committed by James Bottomley

[SCSI] hpsa: Fix problem with MSA2xxx devices

Upgraded firmware on Smart Array P7xx (and some others) made them show up as
SCSI revision 5 devices and this caused the driver to fail to map MSA2xxx
logical drives to the correct bus/target/lun.  A symptom of this would be that
the target ID of the logical drives as presented by the external storage array
is ignored, and all such logical drives are assigned to target zero,
differentiated only by LUN.  Some multipath software reportedly does not deal
well with this behavior, failing to recognize different paths to the same
device as such.
Signed-off-by: default avatarStephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: default avatarScott Teel <scott.teel@hp.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent f79cfec6
...@@ -1637,30 +1637,26 @@ static void figure_bus_target_lun(struct ctlr_info *h, ...@@ -1637,30 +1637,26 @@ static void figure_bus_target_lun(struct ctlr_info *h,
if (is_logical_dev_addr_mode(lunaddrbytes)) { if (is_logical_dev_addr_mode(lunaddrbytes)) {
/* logical device */ /* logical device */
if (unlikely(is_scsi_rev_5(h))) { lunid = le32_to_cpu(*((__le32 *) lunaddrbytes));
/* p1210m, logical drives lun assignments if (is_msa2xxx(h, device)) {
* match SCSI REPORT LUNS data. /* msa2xxx way, put logicals on bus 1
* and match target/lun numbers box
* reports.
*/ */
lunid = le32_to_cpu(*((__le32 *) lunaddrbytes)); *bus = 1;
*bus = 0; *target = (lunid >> 16) & 0x3fff;
*target = 0; *lun = lunid & 0x00ff;
*lun = (lunid & 0x3fff) + 1;
} else { } else {
/* not p1210m... */ if (likely(is_scsi_rev_5(h))) {
lunid = le32_to_cpu(*((__le32 *) lunaddrbytes)); /* All current smart arrays (circa 2011) */
if (is_msa2xxx(h, device)) { *bus = 0;
/* msa2xxx way, put logicals on bus 1 *target = 0;
* and match target/lun numbers box *lun = (lunid & 0x3fff) + 1;
* reports.
*/
*bus = 1;
*target = (lunid >> 16) & 0x3fff;
*lun = lunid & 0x00ff;
} else { } else {
/* Traditional smart array way. */ /* Traditional old smart array way. */
*bus = 0; *bus = 0;
*lun = 0;
*target = lunid & 0x3fff; *target = lunid & 0x3fff;
*lun = 0;
} }
} }
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment