Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: lpfc: Update congestion warning notification period

The CMF_SYNC_WQE command is updated to use an 8-bit field sync period. All
related variables used to calculate congestion warning notifications are
updated to 8-bit fields accordingly.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20230417191558.83100-5-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Justin Tee and committed by
Martin K. Petersen
779d61df 78e9e350

+6 -6
+2 -2
drivers/scsi/lpfc/lpfc_attr.c
··· 5858 5858 module_param(lpfc_fabric_cgn_frequency, int, 0444); 5859 5859 MODULE_PARM_DESC(lpfc_fabric_cgn_frequency, "Congestion signaling fabric freq"); 5860 5860 5861 - int lpfc_acqe_cgn_frequency = 10; /* 10 sec default */ 5862 - module_param(lpfc_acqe_cgn_frequency, int, 0444); 5861 + unsigned char lpfc_acqe_cgn_frequency = 10; /* 10 sec default */ 5862 + module_param(lpfc_acqe_cgn_frequency, byte, 0444); 5863 5863 MODULE_PARM_DESC(lpfc_acqe_cgn_frequency, "Congestion signaling ACQE freq"); 5864 5864 5865 5865 int lpfc_use_cgn_signal = 1; /* 0 - only use FPINs, 1 - Use signals if avail */
+1 -1
drivers/scsi/lpfc/lpfc_crtn.h
··· 663 663 extern unsigned long long lpfc_enable_nvmet[]; 664 664 extern int lpfc_no_hba_reset_cnt; 665 665 extern unsigned long lpfc_no_hba_reset[]; 666 - extern int lpfc_acqe_cgn_frequency; 666 + extern unsigned char lpfc_acqe_cgn_frequency; 667 667 extern int lpfc_fabric_cgn_frequency; 668 668 extern int lpfc_use_cgn_signal; 669 669
+2 -2
drivers/scsi/lpfc/lpfc_hw4.h
··· 4813 4813 #define cmf_sync_cqid_WORD word11 4814 4814 uint32_t read_bytes; 4815 4815 uint32_t word13; 4816 - #define cmf_sync_period_SHIFT 16 4817 - #define cmf_sync_period_MASK 0x0000ffff 4816 + #define cmf_sync_period_SHIFT 24 4817 + #define cmf_sync_period_MASK 0x000000ff 4818 4818 #define cmf_sync_period_WORD word13 4819 4819 uint32_t word14; 4820 4820 uint32_t word15;
+1 -1
drivers/scsi/lpfc/lpfc_sli.c
··· 1931 1931 unsigned long iflags; 1932 1932 u32 ret_val; 1933 1933 u32 atot, wtot, max; 1934 - u16 warn_sync_period = 0; 1934 + u8 warn_sync_period = 0; 1935 1935 1936 1936 /* First address any alarm / warning activity */ 1937 1937 atot = atomic_xchg(&phba->cgn_sync_alarm_cnt, 0);