aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorwenxiong@linux.vnet.ibm.com <wenxiong@linux.vnet.ibm.com>2013-04-17 10:34:06 -0400
committerJames Bottomley <JBottomley@Parallels.com>2013-05-02 15:30:01 -0400
commit96b04db9f2c16e77c31ef0e17e143da1e0cbfd78 (patch)
tree2a41457a9fb8e2d2b4e2f73ccaffddc64f4ccb56 /drivers/scsi
parent3eb59f9875a3874df94e26371dd7ab29a26efc52 (diff)
[SCSI] ipr: Need to reset adapter after the 6th EEH error
Add reset adapter after the 6th EEH errors in ipr driver. This triggers the adapter reset via the PCI config space even when the slot is frozen. Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/ipr.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 2197b57fb225..7e64546bd981 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -4777,7 +4777,7 @@ static int ipr_eh_host_reset(struct scsi_cmnd *cmd)
4777 ioa_cfg = (struct ipr_ioa_cfg *) cmd->device->host->hostdata; 4777 ioa_cfg = (struct ipr_ioa_cfg *) cmd->device->host->hostdata;
4778 spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags); 4778 spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags);
4779 4779
4780 if (!ioa_cfg->in_reset_reload) { 4780 if (!ioa_cfg->in_reset_reload && !ioa_cfg->hrrq[IPR_INIT_HRRQ].ioa_is_dead) {
4781 ipr_initiate_ioa_reset(ioa_cfg, IPR_SHUTDOWN_ABBREV); 4781 ipr_initiate_ioa_reset(ioa_cfg, IPR_SHUTDOWN_ABBREV);
4782 dev_err(&ioa_cfg->pdev->dev, 4782 dev_err(&ioa_cfg->pdev->dev,
4783 "Adapter being reset as a result of error recovery.\n"); 4783 "Adapter being reset as a result of error recovery.\n");
@@ -6739,6 +6739,7 @@ static int ipr_invalid_adapter(struct ipr_ioa_cfg *ioa_cfg)
6739static int ipr_ioa_bringdown_done(struct ipr_cmnd *ipr_cmd) 6739static int ipr_ioa_bringdown_done(struct ipr_cmnd *ipr_cmd)
6740{ 6740{
6741 struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg; 6741 struct ipr_ioa_cfg *ioa_cfg = ipr_cmd->ioa_cfg;
6742 int i;
6742 6743
6743 ENTER; 6744 ENTER;
6744 if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].removing_ioa) { 6745 if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].removing_ioa) {
@@ -6750,6 +6751,13 @@ static int ipr_ioa_bringdown_done(struct ipr_cmnd *ipr_cmd)
6750 6751
6751 ioa_cfg->in_reset_reload = 0; 6752 ioa_cfg->in_reset_reload = 0;
6752 ioa_cfg->reset_retries = 0; 6753 ioa_cfg->reset_retries = 0;
6754 for (i = 0; i < ioa_cfg->hrrq_num; i++) {
6755 spin_lock(&ioa_cfg->hrrq[i]._lock);
6756 ioa_cfg->hrrq[i].ioa_is_dead = 1;
6757 spin_unlock(&ioa_cfg->hrrq[i]._lock);
6758 }
6759 wmb();
6760
6753 list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q); 6761 list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
6754 wake_up_all(&ioa_cfg->reset_wait_q); 6762 wake_up_all(&ioa_cfg->reset_wait_q);
6755 LEAVE; 6763 LEAVE;
@@ -8651,7 +8659,7 @@ static void ipr_pci_perm_failure(struct pci_dev *pdev)
8651 spin_lock_irqsave(ioa_cfg->host->host_lock, flags); 8659 spin_lock_irqsave(ioa_cfg->host->host_lock, flags);
8652 if (ioa_cfg->sdt_state == WAIT_FOR_DUMP) 8660 if (ioa_cfg->sdt_state == WAIT_FOR_DUMP)
8653 ioa_cfg->sdt_state = ABORT_DUMP; 8661 ioa_cfg->sdt_state = ABORT_DUMP;
8654 ioa_cfg->reset_retries = IPR_NUM_RESET_RELOAD_RETRIES; 8662 ioa_cfg->reset_retries = IPR_NUM_RESET_RELOAD_RETRIES - 1;
8655 ioa_cfg->in_ioa_bringdown = 1; 8663 ioa_cfg->in_ioa_bringdown = 1;
8656 for (i = 0; i < ioa_cfg->hrrq_num; i++) { 8664 for (i = 0; i < ioa_cfg->hrrq_num; i++) {
8657 spin_lock(&ioa_cfg->hrrq[i]._lock); 8665 spin_lock(&ioa_cfg->hrrq[i]._lock);