Skip to content

Commit

Permalink
hpsa: do not ignore failure of sense controller parameters command
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Handzik <[email protected]>
Signed-off-by: Stephen M. Cameron <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
  • Loading branch information
Joe Handzik authored and Christoph Hellwig committed May 19, 2014
1 parent 6e8e808 commit 96444fb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/scsi/hpsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -2983,12 +2983,12 @@ static int hpsa_hba_mode_enabled(struct ctlr_info *h)
GFP_KERNEL);

if (!ctlr_params)
return 0;
return -ENOMEM;
rc = hpsa_bmic_ctrl_mode_sense(h, RAID_CTLR_LUNID, 0, ctlr_params,
sizeof(struct bmic_controller_parameters));
if (rc != 0) {
if (rc) {
kfree(ctlr_params);
return 0;
return rc;
}

hba_mode_enabled =
Expand Down Expand Up @@ -3035,6 +3035,8 @@ static void hpsa_update_scsi_devices(struct ctlr_info *h, int hostno)
memset(lunzerobits, 0, sizeof(lunzerobits));

rescan_hba_mode = hpsa_hba_mode_enabled(h);
if (rescan_hba_mode < 0)
goto out;

if (!h->hba_mode_enabled && rescan_hba_mode)
dev_warn(&h->pdev->dev, "HBA mode enabled\n");
Expand Down

0 comments on commit 96444fb

Please sign in to comment.