Commit 779d61df authored by Justin Tee's avatar Justin Tee Committed by Martin K. Petersen

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: default avatarJustin Tee <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20230417191558.83100-5-justintee8345@gmail.comSigned-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 78e9e350
...@@ -5858,8 +5858,8 @@ int lpfc_fabric_cgn_frequency = 100; /* 100 ms default */ ...@@ -5858,8 +5858,8 @@ int lpfc_fabric_cgn_frequency = 100; /* 100 ms default */
module_param(lpfc_fabric_cgn_frequency, int, 0444); module_param(lpfc_fabric_cgn_frequency, int, 0444);
MODULE_PARM_DESC(lpfc_fabric_cgn_frequency, "Congestion signaling fabric freq"); MODULE_PARM_DESC(lpfc_fabric_cgn_frequency, "Congestion signaling fabric freq");
int lpfc_acqe_cgn_frequency = 10; /* 10 sec default */ unsigned char lpfc_acqe_cgn_frequency = 10; /* 10 sec default */
module_param(lpfc_acqe_cgn_frequency, int, 0444); module_param(lpfc_acqe_cgn_frequency, byte, 0444);
MODULE_PARM_DESC(lpfc_acqe_cgn_frequency, "Congestion signaling ACQE freq"); MODULE_PARM_DESC(lpfc_acqe_cgn_frequency, "Congestion signaling ACQE freq");
int lpfc_use_cgn_signal = 1; /* 0 - only use FPINs, 1 - Use signals if avail */ int lpfc_use_cgn_signal = 1; /* 0 - only use FPINs, 1 - Use signals if avail */
......
...@@ -663,7 +663,7 @@ extern int lpfc_enable_nvmet_cnt; ...@@ -663,7 +663,7 @@ extern int lpfc_enable_nvmet_cnt;
extern unsigned long long lpfc_enable_nvmet[]; extern unsigned long long lpfc_enable_nvmet[];
extern int lpfc_no_hba_reset_cnt; extern int lpfc_no_hba_reset_cnt;
extern unsigned long lpfc_no_hba_reset[]; extern unsigned long lpfc_no_hba_reset[];
extern int lpfc_acqe_cgn_frequency; extern unsigned char lpfc_acqe_cgn_frequency;
extern int lpfc_fabric_cgn_frequency; extern int lpfc_fabric_cgn_frequency;
extern int lpfc_use_cgn_signal; extern int lpfc_use_cgn_signal;
......
...@@ -4813,8 +4813,8 @@ struct cmf_sync_wqe { ...@@ -4813,8 +4813,8 @@ struct cmf_sync_wqe {
#define cmf_sync_cqid_WORD word11 #define cmf_sync_cqid_WORD word11
uint32_t read_bytes; uint32_t read_bytes;
uint32_t word13; uint32_t word13;
#define cmf_sync_period_SHIFT 16 #define cmf_sync_period_SHIFT 24
#define cmf_sync_period_MASK 0x0000ffff #define cmf_sync_period_MASK 0x000000ff
#define cmf_sync_period_WORD word13 #define cmf_sync_period_WORD word13
uint32_t word14; uint32_t word14;
uint32_t word15; uint32_t word15;
......
...@@ -1931,7 +1931,7 @@ lpfc_issue_cmf_sync_wqe(struct lpfc_hba *phba, u32 ms, u64 total) ...@@ -1931,7 +1931,7 @@ lpfc_issue_cmf_sync_wqe(struct lpfc_hba *phba, u32 ms, u64 total)
unsigned long iflags; unsigned long iflags;
u32 ret_val; u32 ret_val;
u32 atot, wtot, max; u32 atot, wtot, max;
u16 warn_sync_period = 0; u8 warn_sync_period = 0;
/* First address any alarm / warning activity */ /* First address any alarm / warning activity */
atot = atomic_xchg(&phba->cgn_sync_alarm_cnt, 0); atot = atomic_xchg(&phba->cgn_sync_alarm_cnt, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment