diff options
author | Kleber S. Souza <klebers@linux.vnet.ibm.com> | 2009-05-04 09:41:02 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-05-23 16:44:07 -0400 |
commit | 6ff63896e5bd624d8563f4b67fe2fe06ce99c8dc (patch) | |
tree | 52174e359a0e8e431681cc39a4af81732bf2fc48 /drivers/scsi/ipr.c | |
parent | a3ec723a949d65bf0349cdf60958036454927729 (diff) |
[SCSI] ipr: fix PCI permanent error handler
The ipr driver can hang if it encounters enough PCI errors
to trigger the permanent error handler. The driver will attempt
to initiate a "bringdown" of the adapter and fail all pending
ops back. However, this bringdown is unlike any other bringdown
of the adapter in the code as the driver. In this code path we
end up failing back ops with allow_cmds still set to 1. This results
in some commands, the HCAM commands in particular, getting immediately
re-issued to the adapter on the done call, which results in
an infinite loop in ipr_fail_all_ops. Fix this by setting allow_cmds
to zero in this path.
Signed-off-by: Kleber S. Souza <klebers@linux.vnet.ibm.com>
[brking@linux.vnet.ibm.com: alternate patch substituted]
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/ipr.c')
-rw-r--r-- | drivers/scsi/ipr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 764cfcccec6..0f8bc772b11 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -7003,6 +7003,7 @@ static void ipr_pci_perm_failure(struct pci_dev *pdev) | |||
7003 | ioa_cfg->sdt_state = ABORT_DUMP; | 7003 | ioa_cfg->sdt_state = ABORT_DUMP; |
7004 | ioa_cfg->reset_retries = IPR_NUM_RESET_RELOAD_RETRIES; | 7004 | ioa_cfg->reset_retries = IPR_NUM_RESET_RELOAD_RETRIES; |
7005 | ioa_cfg->in_ioa_bringdown = 1; | 7005 | ioa_cfg->in_ioa_bringdown = 1; |
7006 | ioa_cfg->allow_cmds = 0; | ||
7006 | ipr_initiate_ioa_reset(ioa_cfg, IPR_SHUTDOWN_NONE); | 7007 | ipr_initiate_ioa_reset(ioa_cfg, IPR_SHUTDOWN_NONE); |
7007 | spin_unlock_irqrestore(ioa_cfg->host->host_lock, flags); | 7008 | spin_unlock_irqrestore(ioa_cfg->host->host_lock, flags); |
7008 | } | 7009 | } |