hpsa: propagate the error code in hpsa_kdump_soft_reset

If hpsa_wait_for_board_state fails, hpsa_kdump_soft_reset
should propagate its return value (e.g., -ENODEV) rather
than just returning -1.

Reviewed-by: Scott Teel <scott.teel@pmcs.com>
Reviewed-by: Kevin Barnett <kevin.barnett@pmcs.com>
Reviewed-by: Hannes Reinecke <hare@Suse.de>
Signed-off-by: Robert Elliott <elliott@hp.com>
Signed-off-by: Don Brace <don.brace@pmcs.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
This commit is contained in:
Robert Elliott 2015-04-23 09:35:14 -05:00 committed by James Bottomley
parent 2946e82bdd
commit 39c53f55a9
1 changed files with 7 additions and 4 deletions

View File

@ -7438,19 +7438,22 @@ static int hpsa_request_irqs(struct ctlr_info *h,
static int hpsa_kdump_soft_reset(struct ctlr_info *h)
{
int rc;
hpsa_send_host_reset(h, RAID_CTLR_LUNID, HPSA_RESET_TYPE_CONTROLLER);
dev_info(&h->pdev->dev, "Waiting for board to soft reset.\n");
if (hpsa_wait_for_board_state(h->pdev, h->vaddr, BOARD_NOT_READY)) {
rc = hpsa_wait_for_board_state(h->pdev, h->vaddr, BOARD_NOT_READY);
if (rc) {
dev_warn(&h->pdev->dev, "Soft reset had no effect.\n");
return -1;
return rc;
}
dev_info(&h->pdev->dev, "Board reset, awaiting READY status.\n");
if (hpsa_wait_for_board_state(h->pdev, h->vaddr, BOARD_READY)) {
rc = hpsa_wait_for_board_state(h->pdev, h->vaddr, BOARD_READY);
if (rc) {
dev_warn(&h->pdev->dev, "Board failed to become ready "
"after soft reset.\n");
return -1;
return rc;
}
return 0;