public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Smart <jsmart2021@gmail.com>
To: linux-scsi@vger.kernel.org
Cc: Dick Kennedy <dick.kennedy@broadcom.com>,
	James Smart <james.smart@broadcom.com>
Subject: [PATCH v3 03/20] lpfc: Fix rediscovery on switch blade pull
Date: Wed, 23 Aug 2017 16:55:32 -0700	[thread overview]
Message-ID: <20170823235549.2883-4-jsmart2021@gmail.com> (raw)
In-Reply-To: <20170823235549.2883-1-jsmart2021@gmail.com>

From: Dick Kennedy <dick.kennedy@broadcom.com>

When the switch blade is pulled out then plugged back in, the driver
does not issue a PLOGI to the target

When the switch blade is pulled out, it does not reset the link. The
driver ends up issuing a LOGO to the target, and finally sees devloss.
Since the driver believes that a LOGO is outstanding, it does not
issue a PLOGI to the target upon link up

Correct by placing the ndlp in UNUSED state When devloss happens in
LOGO_ISSUE state.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
---
 drivers/scsi/lpfc/lpfc_nportdisc.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c
index 95b2b43ac37d..a4488d6339c1 100644
--- a/drivers/scsi/lpfc/lpfc_nportdisc.c
+++ b/drivers/scsi/lpfc/lpfc_nportdisc.c
@@ -2192,12 +2192,15 @@ lpfc_device_rm_logo_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
 			  void *arg, uint32_t evt)
 {
 	/*
-	 * Take no action.  If a LOGO is outstanding, then possibly DevLoss has
-	 * timed out and is calling for Device Remove.  In this case, the LOGO
-	 * must be allowed to complete in state LOGO_ISSUE so that the rpi
-	 * and other NLP flags are correctly cleaned up.
+	 * DevLoss has timed out and is calling for Device Remove.
+	 * In this case, abort the LOGO and cleanup the ndlp
 	 */
-	return ndlp->nlp_state;
+
+	lpfc_unreg_rpi(vport, ndlp);
+	/* software abort outstanding PLOGI */
+	lpfc_els_abort(vport->phba, ndlp);
+	lpfc_drop_node(vport, ndlp);
+	return NLP_STE_FREED_NODE;
 }
 
 static uint32_t
-- 
2.13.1

  parent reply	other threads:[~2017-08-23 23:56 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-23 23:55 [PATCH v3 00/20] lpfc updates for 11.4.0.3 James Smart
2017-08-23 23:55 ` [PATCH v3 01/20] lpfc: Fix plogi collision that causes illegal state transition James Smart
2017-08-23 23:55 ` [PATCH v3 02/20] lpfc: Fix loop mode target discovery James Smart
2017-08-23 23:55 ` James Smart [this message]
2017-08-23 23:55 ` [PATCH v3 04/20] lpfc: Fix oops when NVME Target is discovered in a nonNVME environment James Smart
2017-08-28 10:10   ` Johannes Thumshirn
2017-08-23 23:55 ` [PATCH v3 05/20] lpfc: convert info messages to standard messages James Smart
2017-08-23 23:55 ` [PATCH v3 06/20] lpfc: Correct return error codes to align with nvme_fc transport James Smart
2017-08-23 23:55 ` [PATCH v3 07/20] lpfc: Fix handling of FCP and NVME FC4 types in Pt2Pt topology James Smart
2017-08-28 10:10   ` Johannes Thumshirn
2017-08-23 23:55 ` [PATCH v3 08/20] lpfc: Fix duplicate NVME rport entries and namespaces James Smart
2017-08-23 23:55 ` [PATCH v3 09/20] lpfc: Fix crash in lpfc nvmet when fc port is reset James Smart
2017-08-23 23:55 ` [PATCH v3 10/20] lpfc: Fix NVME PRLI handling during RSCN James Smart
2017-08-23 23:55 ` [PATCH v3 11/20] lpfc: Correct issues with FAWWN and FDISCs James Smart
2017-08-28 10:11   ` Johannes Thumshirn
2017-08-23 23:55 ` [PATCH v3 12/20] lpfc: Limit amount of work processed in IRQ James Smart
2017-08-28 10:11   ` Johannes Thumshirn
2017-08-23 23:55 ` [PATCH v3 13/20] lpfc: Fix MRQ > 1 context list handling James Smart
2017-08-28 10:11   ` Johannes Thumshirn
2017-08-23 23:55 ` [PATCH v3 14/20] lpfc: Fix relative offset error on large nvmet target ios James Smart
2017-08-23 23:55 ` [PATCH v3 15/20] lpfc: Fix nvme target failure after 2nd adapter reset James Smart
2017-08-28 10:12   ` Johannes Thumshirn
2017-08-23 23:55 ` [PATCH v3 16/20] lpfc: Fix bad sgl reposting " James Smart
2017-08-23 23:55 ` [PATCH v3 17/20] lpfc: remove console log clutter James Smart
2017-08-23 23:55 ` [PATCH v3 18/20] lpfc: Add Buffer to Buffer credit recovery support James Smart
2017-08-23 23:55 ` [PATCH v3 19/20] scsi: lpfc: fix "integer constant too large" error on 32bit archs James Smart
2017-08-23 23:55 ` [PATCH v3 20/20] lpfc: lpfc version bump 11.4.0.3 James Smart
2017-08-24  3:20 ` [PATCH v3 00/20] lpfc updates for 11.4.0.3 Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170823235549.2883-4-jsmart2021@gmail.com \
    --to=jsmart2021@gmail.com \
    --cc=dick.kennedy@broadcom.com \
    --cc=james.smart@broadcom.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox