diff options
-rw-r--r-- | drivers/scsi/hpsa.c | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index c3db9bb1c235..2a71ab903d96 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c | |||
@@ -3785,6 +3785,13 @@ static int hpsa_controller_hard_reset(struct pci_dev *pdev, | |||
3785 | */ | 3785 | */ |
3786 | dev_info(&pdev->dev, "using doorbell to reset controller\n"); | 3786 | dev_info(&pdev->dev, "using doorbell to reset controller\n"); |
3787 | writel(use_doorbell, vaddr + SA5_DOORBELL); | 3787 | writel(use_doorbell, vaddr + SA5_DOORBELL); |
3788 | |||
3789 | /* PMC hardware guys tell us we need a 5 second delay after | ||
3790 | * doorbell reset and before any attempt to talk to the board | ||
3791 | * at all to ensure that this actually works and doesn't fall | ||
3792 | * over in some weird corner cases. | ||
3793 | */ | ||
3794 | msleep(5000); | ||
3788 | } else { /* Try to do it the PCI power state way */ | 3795 | } else { /* Try to do it the PCI power state way */ |
3789 | 3796 | ||
3790 | /* Quoting from the Open CISS Specification: "The Power | 3797 | /* Quoting from the Open CISS Specification: "The Power |
@@ -3981,15 +3988,22 @@ static int hpsa_kdump_hard_reset_controller(struct pci_dev *pdev) | |||
3981 | need a little pause here */ | 3988 | need a little pause here */ |
3982 | msleep(HPSA_POST_RESET_PAUSE_MSECS); | 3989 | msleep(HPSA_POST_RESET_PAUSE_MSECS); |
3983 | 3990 | ||
3984 | /* Wait for board to become not ready, then ready. */ | 3991 | if (!use_doorbell) { |
3985 | dev_info(&pdev->dev, "Waiting for board to reset.\n"); | 3992 | /* Wait for board to become not ready, then ready. |
3986 | rc = hpsa_wait_for_board_state(pdev, vaddr, BOARD_NOT_READY); | 3993 | * (if we used the doorbell, then we already waited 5 secs |
3987 | if (rc) { | 3994 | * so the "not ready" state is already gone by so we |
3988 | dev_warn(&pdev->dev, | 3995 | * won't catch it.) |
3989 | "failed waiting for board to reset." | 3996 | */ |
3990 | " Will try soft reset.\n"); | 3997 | dev_info(&pdev->dev, "Waiting for board to reset.\n"); |
3991 | rc = -ENOTSUPP; /* Not expected, but try soft reset later */ | 3998 | rc = hpsa_wait_for_board_state(pdev, vaddr, BOARD_NOT_READY); |
3992 | goto unmap_cfgtable; | 3999 | if (rc) { |
4000 | dev_warn(&pdev->dev, | ||
4001 | "failed waiting for board to reset." | ||
4002 | " Will try soft reset.\n"); | ||
4003 | /* Not expected, but try soft reset later */ | ||
4004 | rc = -ENOTSUPP; | ||
4005 | goto unmap_cfgtable; | ||
4006 | } | ||
3993 | } | 4007 | } |
3994 | rc = hpsa_wait_for_board_state(pdev, vaddr, BOARD_READY); | 4008 | rc = hpsa_wait_for_board_state(pdev, vaddr, BOARD_READY); |
3995 | if (rc) { | 4009 | if (rc) { |