Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 292893
b: refs/heads/master
c: 9bc3711
h: refs/heads/master
i:
  292891: 10df253
v: v3
  • Loading branch information
Stephen M. Cameron authored and James Bottomley committed Feb 19, 2012
1 parent 744667f commit 7be7805
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f79cfec6b1906ab10ef70dccd601db25c97bae17
refs/heads/master: 9bc3711cbb67ac620bf09b4a147cbab45b2c36c0
34 changes: 15 additions & 19 deletions trunk/drivers/scsi/hpsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -1637,30 +1637,26 @@ static void figure_bus_target_lun(struct ctlr_info *h,

if (is_logical_dev_addr_mode(lunaddrbytes)) {
/* logical device */
if (unlikely(is_scsi_rev_5(h))) {
/* p1210m, logical drives lun assignments
* match SCSI REPORT LUNS data.
lunid = le32_to_cpu(*((__le32 *) lunaddrbytes));
if (is_msa2xxx(h, device)) {
/* msa2xxx way, put logicals on bus 1
* and match target/lun numbers box
* reports.
*/
lunid = le32_to_cpu(*((__le32 *) lunaddrbytes));
*bus = 0;
*target = 0;
*lun = (lunid & 0x3fff) + 1;
*bus = 1;
*target = (lunid >> 16) & 0x3fff;
*lun = lunid & 0x00ff;
} else {
/* not p1210m... */
lunid = le32_to_cpu(*((__le32 *) lunaddrbytes));
if (is_msa2xxx(h, device)) {
/* msa2xxx way, put logicals on bus 1
* and match target/lun numbers box
* reports.
*/
*bus = 1;
*target = (lunid >> 16) & 0x3fff;
*lun = lunid & 0x00ff;
if (likely(is_scsi_rev_5(h))) {
/* All current smart arrays (circa 2011) */
*bus = 0;
*target = 0;
*lun = (lunid & 0x3fff) + 1;
} else {
/* Traditional smart array way. */
/* Traditional old smart array way. */
*bus = 0;
*lun = 0;
*target = lunid & 0x3fff;
*lun = 0;
}
}
} else {
Expand Down

0 comments on commit 7be7805

Please sign in to comment.