* [PATCH] lpfc: correct device removal deadlock after link bounce
@ 2014-12-30 17:08 James Smart
2014-12-30 17:15 ` Laurence Oberman
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: James Smart @ 2014-12-30 17:08 UTC (permalink / raw)
To: linux-scsi
This patch, applicable to 8G/4G/2G adapters, adds a call that
resumes transmit operations after a link bounce. Without it, targets
that tried to suspend exchanges after a link bounce (such as tape devices
using sequence level error recovery) would never resume io operation,
causing scan failures, and eventually deadlocks if a device removal
request is made.
The patches were cut against Christoph's scsi-queue.git,
branch "drivers-for-3.18". The driver rev cut against is 10.4.8000.0
-- james s
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com>
---
lpfc_els.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff -upNr a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
--- a/drivers/scsi/lpfc/lpfc_els.c 2014-12-29 12:48:08.000000000 -0500
+++ b/drivers/scsi/lpfc/lpfc_els.c 2014-12-30 11:23:04.344426606 -0500
@@ -2225,6 +2225,15 @@ lpfc_adisc_done(struct lpfc_vport *vport
if ((phba->sli3_options & LPFC_SLI3_NPIV_ENABLED) &&
!(vport->fc_flag & FC_RSCN_MODE) &&
(phba->sli_rev < LPFC_SLI_REV4)) {
+ /* The ADISCs are complete. Doesn't matter if they
+ * succeeded or failed because the ADISC completion
+ * routine guarantees to call the state machine and
+ * the RPI is either unregistered (failed ADISC response)
+ * or the RPI is still valid and the node is marked
+ * mapped for a target. The exchanges should be in the
+ * correct state. This code is specific to SLI3.
+ */
+ lpfc_issue_clear_la(phba, vport);
lpfc_issue_reg_vpi(phba, vport);
return;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] lpfc: correct device removal deadlock after link bounce
2014-12-30 17:08 [PATCH] lpfc: correct device removal deadlock after link bounce James Smart
@ 2014-12-30 17:15 ` Laurence Oberman
2015-01-02 16:22 ` Ewan Milne
2015-01-05 19:26 ` Christoph Hellwig
2 siblings, 0 replies; 4+ messages in thread
From: Laurence Oberman @ 2014-12-30 17:15 UTC (permalink / raw)
To: james.smart, loberman@redhat.com; +Cc: linux-scsi@vger.kernel.org
This patch was tested in house at Red Hat and is running in test
kernels at a couple of Red Hat customers.
James, thanks for sending it upstream.
Laurence
On Tue, Dec 30, 2014 at 12:08 PM, James Smart <james.smart@emulex.com> wrote:
> This patch, applicable to 8G/4G/2G adapters, adds a call that
> resumes transmit operations after a link bounce. Without it, targets
> that tried to suspend exchanges after a link bounce (such as tape devices
> using sequence level error recovery) would never resume io operation,
> causing scan failures, and eventually deadlocks if a device removal
> request is made.
>
> The patches were cut against Christoph's scsi-queue.git,
> branch "drivers-for-3.18". The driver rev cut against is 10.4.8000.0
>
> -- james s
>
>
> Signed-off-by: James Smart <james.smart@emulex.com>
> Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com>
> ---
> lpfc_els.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff -upNr a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
> --- a/drivers/scsi/lpfc/lpfc_els.c 2014-12-29 12:48:08.000000000 -0500
> +++ b/drivers/scsi/lpfc/lpfc_els.c 2014-12-30 11:23:04.344426606 -0500
> @@ -2225,6 +2225,15 @@ lpfc_adisc_done(struct lpfc_vport *vport
> if ((phba->sli3_options & LPFC_SLI3_NPIV_ENABLED) &&
> !(vport->fc_flag & FC_RSCN_MODE) &&
> (phba->sli_rev < LPFC_SLI_REV4)) {
> + /* The ADISCs are complete. Doesn't matter if they
> + * succeeded or failed because the ADISC completion
> + * routine guarantees to call the state machine and
> + * the RPI is either unregistered (failed ADISC response)
> + * or the RPI is still valid and the node is marked
> + * mapped for a target. The exchanges should be in the
> + * correct state. This code is specific to SLI3.
> + */
> + lpfc_issue_clear_la(phba, vport);
> lpfc_issue_reg_vpi(phba, vport);
> return;
> }
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] lpfc: correct device removal deadlock after link bounce
2014-12-30 17:08 [PATCH] lpfc: correct device removal deadlock after link bounce James Smart
2014-12-30 17:15 ` Laurence Oberman
@ 2015-01-02 16:22 ` Ewan Milne
2015-01-05 19:26 ` Christoph Hellwig
2 siblings, 0 replies; 4+ messages in thread
From: Ewan Milne @ 2015-01-02 16:22 UTC (permalink / raw)
To: james.smart; +Cc: linux-scsi
On Tue, 2014-12-30 at 12:08 -0500, James Smart wrote:
> This patch, applicable to 8G/4G/2G adapters, adds a call that
> resumes transmit operations after a link bounce. Without it, targets
> that tried to suspend exchanges after a link bounce (such as tape devices
> using sequence level error recovery) would never resume io operation,
> causing scan failures, and eventually deadlocks if a device removal
> request is made.
>
> The patches were cut against Christoph's scsi-queue.git,
> branch "drivers-for-3.18". The driver rev cut against is 10.4.8000.0
>
> -- james s
>
>
> Signed-off-by: James Smart <james.smart@emulex.com>
> Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com>
> ---
> lpfc_els.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff -upNr a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
> --- a/drivers/scsi/lpfc/lpfc_els.c 2014-12-29 12:48:08.000000000 -0500
> +++ b/drivers/scsi/lpfc/lpfc_els.c 2014-12-30 11:23:04.344426606 -0500
> @@ -2225,6 +2225,15 @@ lpfc_adisc_done(struct lpfc_vport *vport
> if ((phba->sli3_options & LPFC_SLI3_NPIV_ENABLED) &&
> !(vport->fc_flag & FC_RSCN_MODE) &&
> (phba->sli_rev < LPFC_SLI_REV4)) {
> + /* The ADISCs are complete. Doesn't matter if they
> + * succeeded or failed because the ADISC completion
> + * routine guarantees to call the state machine and
> + * the RPI is either unregistered (failed ADISC response)
> + * or the RPI is still valid and the node is marked
> + * mapped for a target. The exchanges should be in the
> + * correct state. This code is specific to SLI3.
> + */
> + lpfc_issue_clear_la(phba, vport);
> lpfc_issue_reg_vpi(phba, vport);
> return;
> }
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] lpfc: correct device removal deadlock after link bounce
2014-12-30 17:08 [PATCH] lpfc: correct device removal deadlock after link bounce James Smart
2014-12-30 17:15 ` Laurence Oberman
2015-01-02 16:22 ` Ewan Milne
@ 2015-01-05 19:26 ` Christoph Hellwig
2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2015-01-05 19:26 UTC (permalink / raw)
To: James Smart; +Cc: linux-scsi
Thanks, applied to scsi-for-3.20.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-01-05 19:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-30 17:08 [PATCH] lpfc: correct device removal deadlock after link bounce James Smart
2014-12-30 17:15 ` Laurence Oberman
2015-01-02 16:22 ` Ewan Milne
2015-01-05 19:26 ` Christoph Hellwig
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).