linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ipr: fix PCI permanent error handler
@ 2009-04-16 21:41 Kleber Sacilotto de Souza
  2009-04-18  2:06 ` James Bottomley
  0 siblings, 1 reply; 3+ messages in thread
From: Kleber Sacilotto de Souza @ 2009-04-16 21:41 UTC (permalink / raw)
  To: linux-scsi@vger.kernel.org

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: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
---

 drivers/scsi/ipr.c |    1 +
 1 file changed, 1 insertion(+)

diff -puN drivers/scsi/ipr.c~ipr_pci_perm_failure_hang
drivers/scsi/ipr.c
--- linux-2.6/drivers/scsi/ipr.c~ipr_pci_perm_failure_hang
2009-04-15 09:25:21.000000000 -0500
+++ linux-2.6-bjking1/drivers/scsi/ipr.c        2009-04-15
09:25:39.000000000 -0500
@@ -6998,6 +6998,7 @@ static void ipr_pci_perm_failure(struct 
                ioa_cfg->sdt_state = ABORT_DUMP;
        ioa_cfg->reset_retries = IPR_NUM_RESET_RELOAD_RETRIES;
        ioa_cfg->in_ioa_bringdown = 1;
+       ioa_cfg->allow_cmds = 0;
        ipr_initiate_ioa_reset(ioa_cfg, IPR_SHUTDOWN_NONE);
        spin_unlock_irqrestore(ioa_cfg->host->host_lock, flags);
 }
_
--



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ipr: fix PCI permanent error handler
  2009-04-16 21:41 [PATCH] ipr: fix PCI permanent error handler Kleber Sacilotto de Souza
@ 2009-04-18  2:06 ` James Bottomley
  2009-04-20 14:35   ` Brian King
  0 siblings, 1 reply; 3+ messages in thread
From: James Bottomley @ 2009-04-18  2:06 UTC (permalink / raw)
  To: Kleber Sacilotto de Souza; +Cc: linux-scsi@vger.kernel.org

On Thu, 2009-04-16 at 18:41 -0300, Kleber Sacilotto de Souza wrote:
> 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: Brian King <brking@linux.vnet.ibm.com>
> Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>

This signoff chain isn't right ... signoffs are supposed to document the
hands through which this patch has patched.  I take it this should be
acked-by Brian King instead?

James



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ipr: fix PCI permanent error handler
  2009-04-18  2:06 ` James Bottomley
@ 2009-04-20 14:35   ` Brian King
  0 siblings, 0 replies; 3+ messages in thread
From: Brian King @ 2009-04-20 14:35 UTC (permalink / raw)
  To: James Bottomley; +Cc: Kleber Sacilotto de Souza, linux-scsi@vger.kernel.org

James Bottomley wrote:
> On Thu, 2009-04-16 at 18:41 -0300, Kleber Sacilotto de Souza wrote:
>> 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: Brian King <brking@linux.vnet.ibm.com>
>> Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
> 
> This signoff chain isn't right ... signoffs are supposed to document the
> hands through which this patch has patched.  I take it this should be
> acked-by Brian King instead?

Correct.


-- 
Brian King
Linux on Power Virtualization
IBM Linux Technology Center



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-04-20 14:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-16 21:41 [PATCH] ipr: fix PCI permanent error handler Kleber Sacilotto de Souza
2009-04-18  2:06 ` James Bottomley
2009-04-20 14:35   ` Brian King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).