]>
Commit | Line | Data |
---|---|---|
00e5a55c BS |
1 | From: Kleber S. Souza <klebers@linux.vnet.ibm.com> |
2 | Date: Mon, 4 May 2009 13:41:02 +0000 (-0300) | |
3 | Subject: [SCSI] ipr: fix PCI permanent error handler | |
4 | Patch-mainline: 2.6.31, expected | |
5 | References: bnc#505925 | |
6 | ||
7 | [SCSI] ipr: fix PCI permanent error handler | |
8 | ||
9 | The ipr driver can hang if it encounters enough PCI errors | |
10 | to trigger the permanent error handler. The driver will attempt | |
11 | to initiate a "bringdown" of the adapter and fail all pending | |
12 | ops back. However, this bringdown is unlike any other bringdown | |
13 | of the adapter in the code as the driver. In this code path we | |
14 | end up failing back ops with allow_cmds still set to 1. This results | |
15 | in some commands, the HCAM commands in particular, getting immediately | |
16 | re-issued to the adapter on the done call, which results in | |
17 | an infinite loop in ipr_fail_all_ops. Fix this by setting allow_cmds | |
18 | to zero in this path. | |
19 | ||
20 | Signed-off-by: Kleber S. Souza <klebers@linux.vnet.ibm.com> | |
21 | [brking@linux.vnet.ibm.com: alternate patch substituted] | |
22 | Signed-off-by: Brian King <brking@linux.vnet.ibm.com> | |
23 | Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> | |
24 | Acked-by: Jeff Mahoney <jeffm@suse.com> | |
25 | --- | |
26 | ||
27 | drivers/scsi/ipr.c | 1 + | |
28 | 1 file changed, 1 insertion(+) | |
29 | ||
30 | --- a/drivers/scsi/ipr.c | |
31 | +++ b/drivers/scsi/ipr.c | |
32 | @@ -7007,6 +7007,7 @@ static void ipr_pci_perm_failure(struct | |
33 | ioa_cfg->sdt_state = ABORT_DUMP; | |
34 | ioa_cfg->reset_retries = IPR_NUM_RESET_RELOAD_RETRIES; | |
35 | ioa_cfg->in_ioa_bringdown = 1; | |
36 | + ioa_cfg->allow_cmds = 0; | |
37 | ipr_initiate_ioa_reset(ioa_cfg, IPR_SHUTDOWN_NONE); | |
38 | spin_unlock_irqrestore(ioa_cfg->host->host_lock, flags); | |
39 | } |