WSL2-Linux-Kernel/drivers/scsi/lpfc
James Smart 21d65b3516 scsi: lpfc: Rework MIB Rx Monitor debug info logic
[ Upstream commit bd269188ea ]

The kernel test robot reported the following sparse warning:

arch/arm64/include/asm/cmpxchg.h:88:1: sparse: sparse: cast truncates
   bits from constant value (369 becomes 69)

On arm64, atomic_xchg only works on 8-bit byte fields.  Thus, the macro
usage of LPFC_RXMONITOR_TABLE_IN_USE can be unintentionally truncated
leading to all logic involving the LPFC_RXMONITOR_TABLE_IN_USE macro to not
work properly.

Replace the Rx Table atomic_t indexing logic with a new
lpfc_rx_info_monitor structure that holds a circular ring buffer.  For
locking semantics, a spinlock_t is used.

Link: https://lore.kernel.org/r/20220819011736.14141-4-jsmart2021@gmail.com
Fixes: 17b27ac592 ("scsi: lpfc: Add rx monitoring statistics")
Cc: <stable@vger.kernel.org> # v5.15+
Co-developed-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-11-10 18:15:24 +01:00
..
Makefile
lpfc.h scsi: lpfc: Rework MIB Rx Monitor debug info logic 2022-11-10 18:15:24 +01:00
lpfc_attr.c scsi: lpfc: Fix pt2pt NVMe PRLI reject LOGO loop 2022-02-23 12:03:20 +01:00
lpfc_attr.h
lpfc_bsg.c Revert "scsi: lpfc: SLI path split: Refactor lpfc_iocbq" 2022-11-03 23:59:14 +09:00
lpfc_bsg.h scsi: lpfc: Copyright updates for 14.0.0.1 patches 2021-08-24 22:56:34 -04:00
lpfc_compat.h
lpfc_crtn.h scsi: lpfc: Rework MIB Rx Monitor debug info logic 2022-11-10 18:15:24 +01:00
lpfc_ct.c Revert "scsi: lpfc: SLI path split: Refactor lpfc_iocbq" 2022-11-03 23:59:14 +09:00
lpfc_debugfs.c scsi: lpfc: Rework MIB Rx Monitor debug info logic 2022-11-10 18:15:24 +01:00
lpfc_debugfs.h scsi: lpfc: Rework MIB Rx Monitor debug info logic 2022-11-10 18:15:24 +01:00
lpfc_disc.h scsi: lpfc: Allow fabric node recovery if recovery is in progress before devloss 2021-11-25 09:48:29 +01:00
lpfc_els.c Revert "scsi: lpfc: SLI path split: Refactor lpfc_iocbq" 2022-11-03 23:59:14 +09:00
lpfc_hbadisc.c scsi: lpfc: Fix EEH support for NVMe I/O 2022-08-17 14:24:20 +02:00
lpfc_hw.h scsi: lpfc: Add EDC ELS support 2021-08-24 22:56:33 -04:00
lpfc_hw4.h Revert "scsi: lpfc: SLI path split: Refactor fast and slow paths to native SLI4" 2022-11-03 23:59:14 +09:00
lpfc_ids.h scsi: lpfc: Copyright updates for 14.0.0.0 patches 2021-07-27 00:06:41 -04:00
lpfc_init.c scsi: lpfc: Rework MIB Rx Monitor debug info logic 2022-11-10 18:15:24 +01:00
lpfc_logmsg.h scsi: lpfc: Move cfg_log_verbose check before calling lpfc_dmp_dbg() 2022-06-09 10:22:32 +02:00
lpfc_mbox.c scsi: lpfc: Revise Topology and RAS support checks for new adapters 2021-07-27 00:06:41 -04:00
lpfc_mem.c scsi: lpfc: Rework MIB Rx Monitor debug info logic 2022-11-10 18:15:24 +01:00
lpfc_nl.h
lpfc_nportdisc.c Revert "scsi: lpfc: SLI path split: Refactor lpfc_iocbq" 2022-11-03 23:59:14 +09:00
lpfc_nvme.c Revert "scsi: lpfc: SLI path split: Refactor lpfc_iocbq" 2022-11-03 23:59:14 +09:00
lpfc_nvme.h Revert "scsi: lpfc: SLI path split: Refactor lpfc_iocbq" 2022-11-03 23:59:14 +09:00
lpfc_nvmet.c Revert "scsi: lpfc: SLI path split: Refactor lpfc_iocbq" 2022-11-03 23:59:14 +09:00
lpfc_scsi.c Revert "scsi: lpfc: SLI path split: Refactor lpfc_iocbq" 2022-11-03 23:59:14 +09:00
lpfc_scsi.h scsi: lpfc: Copyright updates for 14.0.0.0 patches 2021-07-27 00:06:41 -04:00
lpfc_sli.c scsi: lpfc: Rework MIB Rx Monitor debug info logic 2022-11-10 18:15:24 +01:00
lpfc_sli.h Revert "scsi: lpfc: SLI path split: Refactor lpfc_iocbq" 2022-11-03 23:59:14 +09:00
lpfc_sli4.h scsi: lpfc: Fix EEH support for NVMe I/O 2022-08-17 14:24:20 +02:00
lpfc_version.h scsi: lpfc: Update lpfc version to 14.0.0.1 2021-08-24 22:56:34 -04:00
lpfc_vport.c scsi: lpfc: Update copyrights for 12.8.0.7 and 12.8.0.8 changes 2021-03-04 17:37:06 -05:00
lpfc_vport.h