Skip to content

lpfc: Update lpfc to revision 12.8.0.6

James Smart linux-scsi 1 version Applied

Status from this message: Applied to 5.11/scsi-staging, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest17 patches 2 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/17lpfc: Rework remote port ref counting and node freeingdrivers/scsi/lpfc/lpfc_attr.c drivers/scsi/lpfc/lpfc_bsg.c drivers/scsi/lpfc/lpfc_crtn.h +12 more+170 -6300 replies
2/17lpfc: Rework locations of ndlp reference takingdrivers/scsi/lpfc/lpfc_bsg.c drivers/scsi/lpfc/lpfc_ct.c drivers/scsi/lpfc/lpfc_disc.h +5 more+569 -3160 replies
3/17lpfc: Fix removal of scsi transport device get and put on dev structuredrivers/scsi/lpfc/lpfc_els.c drivers/scsi/lpfc/lpfc_hbadisc.c drivers/scsi/lpfc/lpfc_init.c +1 more+15 -210 replies
4/17lpfc: Fix refcounting around scsi and nvme transport apisdrivers/scsi/lpfc/lpfc_disc.h drivers/scsi/lpfc/lpfc_els.c drivers/scsi/lpfc/lpfc_init.c +4 more+130 -1640 replies
5/17lpfc: Rework remote port lock handlingdrivers/scsi/lpfc/lpfc.h drivers/scsi/lpfc/lpfc_attr.c drivers/scsi/lpfc/lpfc_ct.c +9 more+345 -4650 replies
6/17lpfc: Remove ndlp when a PLOGI/ADISC/PRLI/REG_RPI ultimately failsdrivers/scsi/lpfc/lpfc_els.c drivers/scsi/lpfc/lpfc_hbadisc.c+85 -200 replies
7/17lpfc: Unsolicited ELS leaves node in incorrect state while dropping itdrivers/scsi/lpfc/lpfc_els.c+22 -110 replies
8/17lpfc: Fix NPIV discovery and Fabric Node detectiondrivers/scsi/lpfc/lpfc_els.c drivers/scsi/lpfc/lpfc_hbadisc.c+9 -60 replies
9/17lpfc: Fix NPIV Fabric Node reference countingdrivers/scsi/lpfc/lpfc_els.c drivers/scsi/lpfc/lpfc_hbadisc.c drivers/scsi/lpfc/lpfc_init.c +1 more+46 -460 replies
10/17lpfc: Refactor wqe structure definitions for common usedrivers/scsi/lpfc/lpfc_hw4.h drivers/scsi/lpfc/lpfc_nvme.c drivers/scsi/lpfc/lpfc_nvmet.c+21 -150 replies
11/17lpfc: Enable common wqe_template support for both scsi and nvmedrivers/scsi/lpfc/lpfc_crtn.h drivers/scsi/lpfc/lpfc_init.c drivers/scsi/lpfc/lpfc_nvme.c +1 more+134 -1320 replies
12/17lpfc: Enable common send_io interface for SCSI and NVMEdrivers/scsi/lpfc/lpfc.h drivers/scsi/lpfc/lpfc_crtn.h drivers/scsi/lpfc/lpfc_scsi.c +1 more+96 -20 replies
13/17lpfc: convert scsi path to use common io submission pathdrivers/scsi/lpfc/lpfc.h drivers/scsi/lpfc/lpfc_scsi.c drivers/scsi/lpfc/lpfc_sli.c+365 -1490 replies
14/17lpfc: convert scsi io completions to sli-3 and sli-4 handlersdrivers/scsi/lpfc/lpfc_scsi.c drivers/scsi/lpfc/lpfc_sli.c+481 -140 replies
15/17lpfc: Convert abort handling to sli-3 and sli-4 handlersdrivers/scsi/lpfc/lpfc_bsg.c drivers/scsi/lpfc/lpfc_crtn.h drivers/scsi/lpfc/lpfc_els.c +7 more+253 -2790 replies
16/17lpfc: Update lpfc version to 12.8.0.6drivers/scsi/lpfc/lpfc_version.h+2 -20 replies
17/17lpfc: Update changed file copyrights for 2020drivers/scsi/lpfc/lpfc_bsg.c drivers/scsi/lpfc/lpfc_crtn.h drivers/scsi/lpfc/lpfc_debugfs.c +8 more+11 -110 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/17] lpfc: Update lpfc to revision 12.8.0.6

Update lpfc to revision 12.8.0.6

This patch set contains several sets of recoding and refactoring.

A close look was taken at the driver to identify what was causing continual small state machine errors as well other repeatitive issues. Code review showed several things and this is the first set of changes to address the deficiencies.

This set of changes addresses the following items:

Remote Port (node/ndlp) handling in the discovery engine:
It was rather clear that the implementation of refcounting on the remote port node was improper. A refcount going to zero didn't simply release the node. Instead other logic kicked into play. This then caused other code to be placed within the discovery engine to for node removal, ... if it was actually removed. What happened in many cases was the node structure continued to exist beyond the existence of the remote port. It was stored in a node list that could then be matched by re-discovery events. And it also caused multiple structures to exist on the node list for the same device.

So this area has been significantly reworked to go back to a standard ref counting scheme, which of course meant that the base model for when and how to take references had to be re-addressed in the different code flows.

And of course, once one thing starts working right, new issues were seen. This brought out inconsistencies on when the node is "freed" around transport devloss callbacks which led to stale pointer accesses which had to be addressed. Another example was NPIV, where it brought out a different handling for nodes on an NPIV vport vs the same nodes on a standard physical port. So this was corrected as well.

While working on the above, it was rather clear that global host locks were taken for node-specific structure changes and the locking was too coarse. Discovery code was reworked to support a node-level lock.

Native SLI-4 WQE use:
The other area that was rather ugly was sli-4 handling. Discovery and SCSI io paths were implemented as iocb's, which is a SLI-3 construct. The code then, when on SLI-4 hardware, converted to SLI-4 WQEs to then talk to the hardware. However, the nvme path, which is only supported on SLI-4, was only implemnted with WQEs. What it meant was: there were very subtle bugs creeping in as SLI-4 data structures didn't fully overlay on the SLI-3 structures; there was a lot of duplication of code in different areas; and with the duplication came differences and confusion.

This patch set reorganizes the IO paths, which includes abort paths, into a formal division between SLI-3 and SLI-4. The basic style is a common routine is called by a code path, which identifies the hw type, and then vectors into SLI-type specific routines which deal specifically with iocbs or WQEs. With different command types also comes different completion handlers. Although these changes look like a lot of change it is mostly a large refactoring. Old common layers that performed iocb-specific work was moved to SLI-3-specific routines, and routines were created for SLI-4. For SLI-4, a lot of code came from the nvme routines.

The end result is the common routines, with SLI-4 being natively supported for ELS and SCSI & NVME initiator io paths.

The patches were cut against Martin's 5.11/scsi-queue tree

James Smart (17):
lpfc: Rework remote port ref counting and node freeing
lpfc: Rework locations of ndlp reference taking
lpfc: Fix removal of scsi transport device get and put on dev
structure
lpfc: Fix refcounting around scsi and nvme transport apis
lpfc: Rework remote port lock handling
lpfc: Remove ndlp when a PLOGI/ADISC/PRLI/REG_RPI ultimately fails
lpfc: Unsolicited ELS leaves node in incorrect state while dropping it
lpfc: Fix NPIV discovery and Fabric Node detection
lpfc: Fix NPIV Fabric Node reference counting
lpfc: Refactor wqe structure definitions for common use
lpfc: Enable common wqe_template support for both scsi and nvme
lpfc: Enable common send_io interface for SCSI and NVME
lpfc: convert scsi path to use common io submission path
lpfc: convert scsi io completions to sli-3 and sli-4 handlers
lpfc: Convert abort handling to sli-3 and sli-4 handlers
lpfc: Update lpfc version to 12.8.0.6
lpfc: Update changed file copyrights for 2020

 drivers/scsi/lpfc/lpfc.h           |    9 +-
 drivers/scsi/lpfc/lpfc_attr.c      |   19 +-
 drivers/scsi/lpfc/lpfc_bsg.c       |   79 +-
 drivers/scsi/lpfc/lpfc_crtn.h      |   18 +-
 drivers/scsi/lpfc/lpfc_ct.c        |   81 +-
 drivers/scsi/lpfc/lpfc_debugfs.c   |    8 +-
 drivers/scsi/lpfc/lpfc_disc.h      |   45 +-
 drivers/scsi/lpfc/lpfc_els.c       | 1285 +++++++++++++++-------------
 drivers/scsi/lpfc/lpfc_hbadisc.c   |  754 +++++-----------
 drivers/scsi/lpfc/lpfc_hw4.h       |   12 +-
 drivers/scsi/lpfc/lpfc_init.c      |  121 ++-
 drivers/scsi/lpfc/lpfc_nportdisc.c |  215 ++---
 drivers/scsi/lpfc/lpfc_nvme.c      |  326 ++-----
 drivers/scsi/lpfc/lpfc_nvme.h      |    4 +-
 drivers/scsi/lpfc/lpfc_nvmet.c     |   60 +-
 drivers/scsi/lpfc/lpfc_scsi.c      | 1133 ++++++++++++++++++------
 drivers/scsi/lpfc/lpfc_sli.c       |  659 +++++++++-----
 drivers/scsi/lpfc/lpfc_sli.h       |    7 +-
 drivers/scsi/lpfc/lpfc_version.h   |    4 +-
 drivers/scsi/lpfc/lpfc_vport.c     |  128 +--
 20 files changed, 2719 insertions(+), 2248 deletions(-)
Signature · 1 line
2.26.2