All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Smart <jsmart2021@gmail.com>
To: linux-scsi@vger.kernel.org
Cc: James Smart <jsmart2021@gmail.com>,
	Dick Kennedy <dick.kennedy@broadcom.com>
Subject: [PATCH 3/9] lpfc: Remove re-binding of nvme rport during registration
Date: Fri,  1 May 2020 14:43:04 -0700	[thread overview]
Message-ID: <20200501214310.91713-4-jsmart2021@gmail.com> (raw)
In-Reply-To: <20200501214310.91713-1-jsmart2021@gmail.com>

The lldd rebinds the ndlp with rport during a nvme rport registration
(va nvme_fc_register_remoteport). If rport & ndlp pointers are same as
the previous one, the lldd will re-use the ndlp and rport association
without re-iniitalization. This assumption is incorrect. The lldd should
be ignorant of whether the returned rport pointer is new or not, and
should always assume it is new.

Remove the re-binding code, always assumes that rport pointer received
from transport is a new pointer.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
---
 drivers/scsi/lpfc/lpfc_nvme.c | 32 --------------------------------
 1 file changed, 32 deletions(-)

diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
index 43df08aeecf1..3121cf37a572 100644
--- a/drivers/scsi/lpfc/lpfc_nvme.c
+++ b/drivers/scsi/lpfc/lpfc_nvme.c
@@ -2322,38 +2322,6 @@ lpfc_nvme_register_port(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)
 		spin_unlock_irq(&vport->phba->hbalock);
 		rport = remote_port->private;
 		if (oldrport) {
-			/* New remoteport record does not guarantee valid
-			 * host private memory area.
-			 */
-			if (oldrport == remote_port->private) {
-				/* Same remoteport - ndlp should match.
-				 * Just reuse.
-				 */
-				lpfc_printf_vlog(ndlp->vport, KERN_INFO,
-						 LOG_NVME_DISC,
-						 "6014 Rebind lport to current "
-						 "remoteport x%px wwpn 0x%llx, "
-						 "Data: x%x x%x x%px x%px x%x "
-						 " x%06x\n",
-						 remote_port,
-						 remote_port->port_name,
-						 remote_port->port_id,
-						 remote_port->port_role,
-						 oldrport->ndlp,
-						 ndlp,
-						 ndlp->nlp_type,
-						 ndlp->nlp_DID);
-
-				/* It's a complete rebind only if the driver
-				 * is registering with the same ndlp. Otherwise
-				 * the driver likely executed a node swap
-				 * prior to this registration and the ndlp to
-				 * remoteport binding needs to be redone.
-				 */
-				if (prev_ndlp == ndlp)
-					return 0;
-
-			}
 
 			/* Sever the ndlp<->rport association
 			 * before dropping the ndlp ref from
-- 
2.26.1


  parent reply	other threads:[~2020-05-01 21:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-01 21:43 [PATCH 0/9] lpfc: Update lpfc to revision 12.8.0.1 James Smart
2020-05-01 21:43 ` [PATCH 1/9] lpfc: Synchronize NVME transport and lpfc driver devloss_tmo James Smart
2020-05-03 14:42   ` James Smart
2020-05-07  9:11   ` Hannes Reinecke
2020-05-01 21:43 ` [PATCH 2/9] lpfc: Maintain atomic consistency of queue_claimed flag James Smart
2020-05-07  9:12   ` Hannes Reinecke
2020-05-01 21:43 ` James Smart [this message]
2020-05-07  9:13   ` [PATCH 3/9] lpfc: Remove re-binding of nvme rport during registration Hannes Reinecke
2020-05-01 21:43 ` [PATCH 4/9] lpfc: Fix negation of else clause in lpfc_prep_node_fc4type James Smart
2020-05-07  9:14   ` Hannes Reinecke
2020-05-01 21:43 ` [PATCH 5/9] lpfc: Change default queue allocation for reduced memory consumption James Smart
2020-05-07  9:49   ` Hannes Reinecke
2020-05-01 21:43 ` [PATCH 6/9] lpfc: Remove unnecessary lockdep_assert_held calls James Smart
2020-05-07  9:50   ` Hannes Reinecke
2020-05-01 21:43 ` [PATCH 7/9] lpfc: Fix noderef and address space warnings James Smart
2020-05-07  9:50   ` Hannes Reinecke
2020-05-01 21:43 ` [PATCH 8/9] lpfc: Fix MDS Diagnostic Enablement definition James Smart
2020-05-07  9:50   ` Hannes Reinecke
2020-05-01 21:43 ` [PATCH 9/9] lpfc: Update lpfc version to 12.8.0.1 James Smart
2020-05-07  9:51   ` Hannes Reinecke
2020-05-08  2:54 ` [PATCH 0/9] lpfc: Update lpfc to revision 12.8.0.1 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=20200501214310.91713-4-jsmart2021@gmail.com \
    --to=jsmart2021@gmail.com \
    --cc=dick.kennedy@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.