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 02/11] lpfc: Fix configuration of BB credit recovery in service parameters
Date: Mon,  4 Nov 2019 16:56:59 -0800	[thread overview]
Message-ID: <20191105005708.7399-3-jsmart2021@gmail.com> (raw)
In-Reply-To: <20191105005708.7399-1-jsmart2021@gmail.com>

The driver today is reading service parameters from the firmware and
then overwriting the firmware-provided values with values of its own.
There are some switch features that require preliminary FLOGI's that
are switch-specific and done prior to the actual fabric FLOGI for traffic.
The fw will perform those FLOGIs and will revise the service parameters
for the features configured. As the driver later overwrites those values
with its own values, it misconfigures things like BBSCN use by doing so.

Correct by eliminating the driver-overwrite of firmware values. The driver
correctly re-reads the service parameters after each link up to obtain the
latest values from firmware.

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

diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 40075b391546..88507aa4e920 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -1138,7 +1138,6 @@ void
 lpfc_mbx_cmpl_local_config_link(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
 {
 	struct lpfc_vport *vport = pmb->vport;
-	uint8_t bbscn = 0;
 
 	if (pmb->u.mb.mbxStatus)
 		goto out;
@@ -1165,17 +1164,11 @@ lpfc_mbx_cmpl_local_config_link(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
 	/* Start discovery by sending a FLOGI. port_state is identically
 	 * LPFC_FLOGI while waiting for FLOGI cmpl
 	 */
-	if (vport->port_state != LPFC_FLOGI) {
-		if (phba->bbcredit_support && phba->cfg_enable_bbcr) {
-			bbscn = bf_get(lpfc_bbscn_def,
-				       &phba->sli4_hba.bbscn_params);
-			vport->fc_sparam.cmn.bbRcvSizeMsb &= 0xf;
-			vport->fc_sparam.cmn.bbRcvSizeMsb |= (bbscn << 4);
-		}
+	if (vport->port_state != LPFC_FLOGI)
 		lpfc_initial_flogi(vport);
-	} else if (vport->fc_flag & FC_PT2PT) {
+	else if (vport->fc_flag & FC_PT2PT)
 		lpfc_disc_start(vport);
-	}
+
 	return;
 
 out:
-- 
2.13.7


  parent reply	other threads:[~2019-11-05  0:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-05  0:56 [PATCH 00/11] lpfc: Update lpfc to revision 12.6.0.1 James Smart
2019-11-05  0:56 ` [PATCH 01/11] lpfc: Fix duplicate unreg_rpi error in port offline flow James Smart
2019-11-05  0:56 ` James Smart [this message]
2019-11-05  0:57 ` [PATCH 03/11] lpfc: Fix kernel crash at lpfc_nvme_info_show during remote port bounce James Smart
2019-11-05  0:57 ` [PATCH 04/11] lpfc: Fix unexpected error messages during RSCN handling James Smart
2019-11-05  0:57 ` [PATCH 05/11] lpfc: Fix dynamic fw log enablement check James Smart
2019-11-05  0:57 ` [PATCH 06/11] lpfc: Sync with FC-NVMe-2 SLER change to require Conf with SLER James Smart
2019-11-05  0:57 ` [PATCH 07/11] lpfc: Clarify FAWNN error message James Smart
2019-11-05  0:57 ` [PATCH 08/11] lpfc: Add registration for CPU Offline/Online events James Smart
2019-11-05  0:57 ` [PATCH 09/11] lpfc: Change default IRQ model on AMD architectures James Smart
2019-11-05  0:57 ` [PATCH 10/11] lpfc: Add enablement of multiple adapter dumps James Smart
2019-11-05  0:57 ` [PATCH 11/11] lpfc: Update lpfc version to 12.6.0.1 James Smart
2019-11-06  4:45 ` [PATCH 00/11] lpfc: Update lpfc to revision 12.6.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=20191105005708.7399-3-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.