~bladernr/ubuntu/+source/linux/+git/focal:1855353-lpfc-updates

Last commit made on 2020-03-30
Get this branch:
git clone -b 1855353-lpfc-updates https://git.launchpad.net/~bladernr/ubuntu/+source/linux/+git/focal
Only Jeff Lane  can upload to this branch. If you are Jeff Lane  please log in for upload directions.

Branch merges

Branch information

Name:
1855353-lpfc-updates
Repository:
lp:~bladernr/ubuntu/+source/linux/+git/focal

Recent commits

ec8645c... by James Smart <email address hidden>

scsi: lpfc: add RDF registration and Link Integrity FPIN logging

BugLink: https://bugs.launchpad.net/bugs/1855303

This patch modifies lpfc to register for Link Integrity events via the use
of an RDF ELS and to perform Link Integrity FPIN logging.

Specifically, the driver was modified to:

 - Format and issue the RDF ELS immediately following SCR registration.
   This registers the ability of the driver to receive FPIN ELS.

 - Adds decoding of the FPIN els into the received descriptors, with
   logging of the Link Integrity event information. After decoding, the ELS
   is delivered to the scsi fc transport to be delivered to any user-space
   applications.

 - To aid in logging, simple helpers were added to create enum to name
   string lookup functions that utilize the initialization helpers from the
   fc_els.h header.

 - Note: base header definitions for the ELS's don't populate the
   descriptor payloads. As such, lpfc creates it's own version of the
   structures, using the base definitions (mostly headers) and additionally
   declaring the descriptors that will complete the population of the ELS.

Link: https://<email address hidden>
Signed-off-by: Dick Kennedy <email address hidden>
Signed-off-by: James Smart <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit df3fe76658ed47617741819a501e2bd2ae446962)
Signed-off-by: Vignesh Gunasekaran <email address hidden>
Signed-off-by: Jeff Lane <email address hidden>

73125b5... by James Smart <email address hidden>

scsi: fc: Update Descriptor definition and add RDF and Link Integrity FPINs

BugLink: https://bugs.launchpad.net/bugs/1855303

Update the FC headers for the RDF ELS and populate out the FPIN ELS and the
Link integrity FPIN payload.

RDF is used to register for diagnostic events.
FPIN is how the fabric reports a diagnostic event.

Specifically, this patch:

 - Adds the formal definition of TLV descriptors that are now used in a lot
   of the FC spec. The simplistic fc_fn_desc structure, basically no more
   than the tlv definition, is removed.

 - Small tlv helper functions are added as defines.

 - The list of known Descriptor tags (identifying the TLV) is expanded and
   a name initializer introduced.

 - The LSRI descriptor, returned in many new ELS response payloads is
   added.

 - The RDF ELS code is added, and the RDF request response structures
   added.

 - The FPIN els definition is corrected.

 - A full definition of a Link Integrity Notification descriptor is added,

[mkp: rolled in kbuild warning fix]

Link: https://<email address hidden>
Reported-by: kbuild test robot <email address hidden>
Signed-off-by: James Smart <email address hidden>
Reviewed-by: Hannes Reinecke <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit 73ec6d2748dc35db2b32cf3c182a27c4a0837b9b)
Signed-off-by: Vignesh Gunasekaran <email address hidden>
Signed-off-by: Jeff Lane <email address hidden>

9d58b72... by James Smart <email address hidden>

scsi: lpfc: Copyright updates for 12.6.0.4 patches

BugLink: https://bugs.launchpad.net/bugs/1855303

Update copyrights to 2020 for files modified in the 12.6.0.4 patch set.

Link: https://<email address hidden>
Signed-off-by: Dick Kennedy <email address hidden>
Signed-off-by: James Smart <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit 145e5a8a5cbd0c608dfe653c92edb70a580bdbf6)
Signed-off-by: Vignesh Gunasekaran <email address hidden>
Signed-off-by: Jeff Lane <email address hidden>

c21449d... by James Smart <email address hidden>

scsi: lpfc: Update lpfc version to 12.6.0.4

BugLink: https://bugs.launchpad.net/bugs/1855303

Update lpfc version to 12.6.0.4

Link: https://<email address hidden>
Signed-off-by: Dick Kennedy <email address hidden>
Signed-off-by: James Smart <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit ad6203f975263752e9738a33eacbc92f5bb6f636)
Signed-off-by: Vignesh Gunasekaran <email address hidden>
Signed-off-by: Jeff Lane <email address hidden>

4a2601e... by James Smart <email address hidden>

scsi: lpfc: Clean up hba max_lun_queue_depth checks

BugLink: https://bugs.launchpad.net/bugs/1855303

The current code does some odd +1 over maximum xri count checks and
requires that the lun_queue_count can't be bigger than maximum xri count
divided by 8. These items are bogus.

Clean the code up to cap lun_queue_count to maximum xri count.

Link: https://<email address hidden>
Signed-off-by: Dick Kennedy <email address hidden>
Signed-off-by: James Smart <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit f6770e7d2329f0b05223fffea9eb821fd2dd038a)
Signed-off-by: Vignesh Gunasekaran <email address hidden>
Signed-off-by: Jeff Lane <email address hidden>

23b44de... by James Smart <email address hidden>

scsi: lpfc: Remove handler for obsolete ELS - Read Port Status (RPS)

BugLink: https://bugs.launchpad.net/bugs/1855303

There was report of an odd "Fix me..." log message, which was tracked down
to the lpfc_els_rcv_rps() routine. This was in handling of a very old and
obsolete ELS - Read Port Status. The RPS ELS was defined in FC-LS-1, but
deprecated in FC-LS-2, and removed from all later FC-LS revisions. It was
replaced by the Read Diagnostic Parameters (RDP) ELS and the Link Error
Status Block descriptor.

There should be no support for the RSP ELS. Remove support from driver.

Link: https://<email address hidden>
Signed-off-by: Dick Kennedy <email address hidden>
Signed-off-by: James Smart <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit 6cde2e3e2813f598a39c8e5688480b76b2f40b10)
Signed-off-by: Vignesh Gunasekaran <email address hidden>
Signed-off-by: Jeff Lane <email address hidden>

d0d30bd... by James Smart <email address hidden>

scsi: lpfc: Fix coverity errors in fmdi attribute handling

BugLink: https://bugs.launchpad.net/bugs/1855303

Coverity reported a memory corruption error for the fdmi attributes
routines:

  CID 15768 [Memory Corruption] Out-of-bounds access on FDMI

Sloppy coding of the fmdi structures. In both the lpfc_fdmi_attr_def and
lpfc_fdmi_reg_port_list structures, a field was placed at the start of
payload that may have variable content. The field was given an arbitrary
type (uint32_t). The code then uses the field name to derive an address,
which it used in things such as memset and memcpy. The memset sizes or
memcpy lengths were larger than the arbitrary type, thus coverity reported
an error.

Fix by replacing the arbitrary fields with the real field structures
describing the payload.

Link: https://<email address hidden>
Signed-off-by: Dick Kennedy <email address hidden>
Signed-off-by: James Smart <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit 4cb9e1ddaa145be9ed67b6a7de98ca705a43f998)
Signed-off-by: Vignesh Gunasekaran <email address hidden>
Signed-off-by: Jeff Lane <email address hidden>

e03b89e... by James Smart <email address hidden>

scsi: lpfc: Fix compiler warning on frame size

BugLink: https://bugs.launchpad.net/bugs/1855303

The following error is see from the compiler:

  drivers/scsi/lpfc/lpfc_init.c: In function
    ‘lpfc_cpuhp_get_eq’: drivers/scsi/lpfc/lpfc_init.c:12660:1:
      error: the frame size of 1032 bytes is larger than 1024 bytes
         [-Werror=frame-larger-than=]

The issue is due to allocating a cpumask on the stack.

Fix by converting to a dynamical allocation of the cpu mask.

Link: https://<email address hidden>
Signed-off-by: Dick Kennedy <email address hidden>
Signed-off-by: James Smart <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit a99c80742af4b58bfd2d16cada8ee73cb9618649)
Signed-off-by: Vignesh Gunasekaran <email address hidden>
Signed-off-by: Jeff Lane <email address hidden>

91d884f... by James Smart <email address hidden>

scsi: lpfc: Fix release of hwq to clear the eq relationship

BugLink: https://bugs.launchpad.net/bugs/1855303

When performing reset testing, the eq's list for related hwqs was getting
corrupted. In cases where there is not a 1:1 eq to hwq, the eq is
shared. The eq maintains a list of hwqs utilizing it in case of cpu
offlining and polling. During the reset, the hwqs are being torn down so
they can be recreated. The recreation was getting confused by seeing a
non-null eq assignment on the eq and the eq list became corrupt.

Correct by clearing the hdwq eq assignment when the hwq is cleaned up.

Link: https://<email address hidden>
Signed-off-by: Dick Kennedy <email address hidden>
Signed-off-by: James Smart <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit 821bc882accaaaf1bbecf5c0ecef659443e3e8cb)
Signed-off-by: Vignesh Gunasekaran <email address hidden>
Signed-off-by: Jeff Lane <email address hidden>

b118a0d... by James Smart <email address hidden>

scsi: lpfc: Fix registration of ELS type support in fdmi

BugLink: https://bugs.launchpad.net/bugs/1855303

Adjust FC4 Types in FDMI settings

The driver sets FDMI information registring ELS as a FC4 type. ELS is a
fc3 type and should not be registered.

Fix by removing ELS type bit when we register for FDMI Port attributes.

Link: https://<email address hidden>
Signed-off-by: Dick Kennedy <email address hidden>
Signed-off-by: James Smart <email address hidden>
Signed-off-by: Martin K. Petersen <email address hidden>
(cherry picked from commit 792f3b90be2aeedf5e076bbe6c5808e693f51c23)
Signed-off-by: Vignesh Gunasekaran <email address hidden>
Signed-off-by: Jeff Lane <email address hidden>