Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 181325
b: refs/heads/master
c: 6df1e95
h: refs/heads/master
i:
  181323: 6ede3ce
v: v3
  • Loading branch information
Stephen M. Cameron authored and James Bottomley committed Feb 17, 2010
1 parent a814015 commit d9624f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 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: a9a44cbd4b41bf4b9535c1eb7f5e942d8b2e9d54
refs/heads/master: 6df1e95496f8dfe08a520756187be59f7896f589
11 changes: 3 additions & 8 deletions trunk/drivers/scsi/hpsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -1483,14 +1483,11 @@ static void figure_bus_target_lun(struct ctlr_info *h,
u8 *lunaddrbytes, int *bus, int *target, int *lun,
struct hpsa_scsi_dev_t *device)
{

u32 lunid;

if (is_logical_dev_addr_mode(lunaddrbytes)) {
/* logical device */
memcpy(&lunid, lunaddrbytes, sizeof(lunid));
lunid = le32_to_cpu(lunid);

lunid = le32_to_cpu(*((__le32 *) lunaddrbytes));
if (is_msa2xxx(h, device)) {
*bus = 1;
*target = (lunid >> 16) & 0x3fff;
Expand Down Expand Up @@ -1578,8 +1575,7 @@ static int hpsa_gather_lun_info(struct ctlr_info *h,
dev_err(&h->pdev->dev, "report physical LUNs failed.\n");
return -1;
}
memcpy(nphysicals, &physdev->LUNListLength[0], sizeof(*nphysicals));
*nphysicals = be32_to_cpu(*nphysicals) / 8;
*nphysicals = be32_to_cpu(*((__be32 *)physdev->LUNListLength)) / 8;
if (*nphysicals > HPSA_MAX_PHYS_LUN) {
dev_warn(&h->pdev->dev, "maximum physical LUNs (%d) exceeded."
" %d LUNs ignored.\n", HPSA_MAX_PHYS_LUN,
Expand All @@ -1590,8 +1586,7 @@ static int hpsa_gather_lun_info(struct ctlr_info *h,
dev_err(&h->pdev->dev, "report logical LUNs failed.\n");
return -1;
}
memcpy(nlogicals, &logdev->LUNListLength[0], sizeof(*nlogicals));
*nlogicals = be32_to_cpu(*nlogicals) / 8;
*nlogicals = be32_to_cpu(*((__be32 *) logdev->LUNListLength)) / 8;
/* Reject Logicals in excess of our max capability. */
if (*nlogicals > HPSA_MAX_LUN) {
dev_warn(&h->pdev->dev,
Expand Down

0 comments on commit d9624f9

Please sign in to comment.