mbox series

[00/17] lpfc: Update lpfc to revision 14.2.0.0

Message ID 20220225022308.16486-1-jsmart2021@gmail.com (mailing list archive)
Headers show
Series lpfc: Update lpfc to revision 14.2.0.0 | expand

Message

James Smart Feb. 25, 2022, 2:22 a.m. UTC
Update lpfc to revision 14.2.0.0

This patch set is a refactoring of the lpfc driver.

The lpfc driver was first implemented for sli-3 then had sli-4 added
to it. The addition of sli-4 was done in a manner where the sli-3 paths
were left in place with sli-3 structures converted to sli-4 when written
to the adapter. Similar behavior for responses. Over time we've been hit
with subtle sli3 vs sli4 structure formats issues, bits defined on sli3
that aren't on sli4 or vice versa, that the driver wasn't careful about.
The subtleties caused bogus settings to be passed when the eventually
overlapped, or expected values that never we set by the hw.

Given that all sli-3 hardware is now end of life (last sli3 adapter is 
~10 yrs old) we'd like to move the implementation of the driver such that
it uses sli-4 as its native path and kills the "translation" layer. Sli-3
is still supported, but we're trying to move away from the sli-3 data
structures that dominated the implementation and instead move to a more
generic structure, and hopefully do so without huge amounts of code change
for what in some respects would be naming deltas.

This patch refactors the driver to make the fast and slow paths now work
on native sli-4 datastructures. Common areas or items change their names
to make it clear they aren't sli-3 centric. Generic access functions to
get/set common fields were created abstract the structure deltas. The
different code paths were then reworked to use the generic names/routines
and where rev-specific data was to be set, add explicit sections to set
the items based on the revision. In this way, no translation occurs and
any rev-spec delta is very clear.  In performing this, some of the
checking or case logic varied a little, and some code cleanups were
performed.

The patches were cut against Martin's 5.17/scsi-fixes tree


James Smart (17):
  lpfc: SLI path split: refactor lpfc_iocbq
  lpfc: SLI path split: refactor fast and slow paths to native sli4
  lpfc: SLI path split: introduce lpfc_prep_wqe
  lpfc: SLI path split: refactor base els paths and the FLOGI path
  lpfc: SLI path split: refactor PLOGI/PRLI/ADISC/LOGO paths
  lpfc: SLI path split: refactor the RSCN/SCR/RDF/EDC/FARPR paths
  lpfc: SLI path split: refactor LS_ACC paths
  lpfc: SLI path split: refactor LS_RJT paths
  lpfc: SLI path split: refactor FDISC paths
  lpfc: SLI path split: refactor VMID paths
  lpfc: SLI path split: refactor misc ELS paths
  lpfc: SLI path split: refactor CT paths
  lpfc: SLI path split: refactor SCSI paths
  lpfc: SLI path split: refactor Abort paths
  lpfc: SLI path split: refactor BSG paths
  lpfc: Update lpfc version to 14.2.0.0
  lpfc: Copyright updates for 14.2.0.0 patches

 drivers/scsi/lpfc/lpfc.h           |   98 +-
 drivers/scsi/lpfc/lpfc_bsg.c       |  349 ++--
 drivers/scsi/lpfc/lpfc_crtn.h      |   22 +-
 drivers/scsi/lpfc/lpfc_ct.c        |  346 ++--
 drivers/scsi/lpfc/lpfc_els.c       | 1513 +++++++++------
 drivers/scsi/lpfc/lpfc_hbadisc.c   |   46 +-
 drivers/scsi/lpfc/lpfc_hw.h        |   16 +-
 drivers/scsi/lpfc/lpfc_hw4.h       |   38 +-
 drivers/scsi/lpfc/lpfc_init.c      |   13 +-
 drivers/scsi/lpfc/lpfc_nportdisc.c |  104 +-
 drivers/scsi/lpfc/lpfc_nvme.c      |   41 +-
 drivers/scsi/lpfc/lpfc_nvme.h      |    8 +-
 drivers/scsi/lpfc/lpfc_nvmet.c     |   85 +-
 drivers/scsi/lpfc/lpfc_scsi.c      |  457 ++---
 drivers/scsi/lpfc/lpfc_sli.c       | 2831 +++++++++++++---------------
 drivers/scsi/lpfc/lpfc_sli.h       |   31 +-
 drivers/scsi/lpfc/lpfc_sli4.h      |    2 +-
 drivers/scsi/lpfc/lpfc_version.h   |    6 +-
 18 files changed, 3146 insertions(+), 2860 deletions(-)

Comments

Martin K. Petersen Feb. 28, 2022, 3:16 a.m. UTC | #1
James,

> Update lpfc to revision 14.2.0.0

Applied to 5.18/scsi-staging, thanks!
Martin K. Petersen March 19, 2022, 3:56 a.m. UTC | #2
On Thu, 24 Feb 2022 18:22:51 -0800, James Smart wrote:

> Update lpfc to revision 14.2.0.0
> 
> This patch set is a refactoring of the lpfc driver.
> 
> The lpfc driver was first implemented for sli-3 then had sli-4 added
> to it. The addition of sli-4 was done in a manner where the sli-3 paths
> were left in place with sli-3 structures converted to sli-4 when written
> to the adapter. Similar behavior for responses. Over time we've been hit
> with subtle sli3 vs sli4 structure formats issues, bits defined on sli3
> that aren't on sli4 or vice versa, that the driver wasn't careful about.
> The subtleties caused bogus settings to be passed when the eventually
> overlapped, or expected values that never we set by the hw.
> 
> [...]

Applied to 5.18/scsi-queue, thanks!

[01/17] lpfc: SLI path split: refactor lpfc_iocbq
        https://git.kernel.org/mkp/scsi/c/a680a9298e7b
[02/17] lpfc: SLI path split: refactor fast and slow paths to native sli4
        https://git.kernel.org/mkp/scsi/c/1b64aa9eae28
[03/17] lpfc: SLI path split: introduce lpfc_prep_wqe
        https://git.kernel.org/mkp/scsi/c/561341425bcc
[04/17] lpfc: SLI path split: refactor base els paths and the FLOGI path
        https://git.kernel.org/mkp/scsi/c/6831ce129f19
[05/17] lpfc: SLI path split: refactor PLOGI/PRLI/ADISC/LOGO paths
        https://git.kernel.org/mkp/scsi/c/cad93a089031
[06/17] lpfc: SLI path split: refactor the RSCN/SCR/RDF/EDC/FARPR paths
        https://git.kernel.org/mkp/scsi/c/3bea83b68d54
[07/17] lpfc: SLI path split: refactor LS_ACC paths
        https://git.kernel.org/mkp/scsi/c/3f607dcb43f1
[08/17] lpfc: SLI path split: refactor LS_RJT paths
        https://git.kernel.org/mkp/scsi/c/e0367dfe90d6
[09/17] lpfc: SLI path split: refactor FDISC paths
        https://git.kernel.org/mkp/scsi/c/9d41f08aa2eb
[10/17] lpfc: SLI path split: refactor VMID paths
        https://git.kernel.org/mkp/scsi/c/351849800157
[11/17] lpfc: SLI path split: refactor misc ELS paths
        https://git.kernel.org/mkp/scsi/c/2d1928c57df6
[12/17] lpfc: SLI path split: refactor CT paths
        https://git.kernel.org/mkp/scsi/c/61910d6a5243
[13/17] lpfc: SLI path split: refactor SCSI paths
        https://git.kernel.org/mkp/scsi/c/3512ac094293
[14/17] lpfc: SLI path split: refactor Abort paths
        https://git.kernel.org/mkp/scsi/c/31a59f75702f
[15/17] lpfc: SLI path split: refactor BSG paths
        https://git.kernel.org/mkp/scsi/c/0e082d926f59
[16/17] lpfc: Update lpfc version to 14.2.0.0
        https://git.kernel.org/mkp/scsi/c/64de6108f410
[17/17] lpfc: Copyright updates for 14.2.0.0 patches
        https://git.kernel.org/mkp/scsi/c/f45775bf562a