sfc: Remove configurable FIFO thresholds for pause frame generation
In Falcon we can configure the fill levels of the RX data FIFO which trigger the generation of pause frames (if enabled), and we have module parameters for this. Siena does not allow the levels to be configured (or, if it does, this is done by the MC firmware and is not configurable by drivers). So far as I can tell, the module parameters are not used by our internal scripts and have not been documented (with the exception of the short parameter descriptions). Therefore, remove them and always initialise Falcon with the default values. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
This commit is contained in:
@@ -1478,36 +1478,26 @@ static void falcon_init_rx_cfg(struct efx_nic *efx)
|
||||
/* RX control FIFO thresholds (32 entries) */
|
||||
const unsigned ctrl_xon_thr = 20;
|
||||
const unsigned ctrl_xoff_thr = 25;
|
||||
/* RX data FIFO thresholds (256-byte units; size varies) */
|
||||
int data_xon_thr = efx_nic_rx_xon_thresh >> 8;
|
||||
int data_xoff_thr = efx_nic_rx_xoff_thresh >> 8;
|
||||
efx_oword_t reg;
|
||||
|
||||
efx_reado(efx, ®, FR_AZ_RX_CFG);
|
||||
if (efx_nic_rev(efx) <= EFX_REV_FALCON_A1) {
|
||||
/* Data FIFO size is 5.5K */
|
||||
if (data_xon_thr < 0)
|
||||
data_xon_thr = 512 >> 8;
|
||||
if (data_xoff_thr < 0)
|
||||
data_xoff_thr = 2048 >> 8;
|
||||
EFX_SET_OWORD_FIELD(reg, FRF_AA_RX_DESC_PUSH_EN, 0);
|
||||
EFX_SET_OWORD_FIELD(reg, FRF_AA_RX_USR_BUF_SIZE,
|
||||
huge_buf_size);
|
||||
EFX_SET_OWORD_FIELD(reg, FRF_AA_RX_XON_MAC_TH, data_xon_thr);
|
||||
EFX_SET_OWORD_FIELD(reg, FRF_AA_RX_XOFF_MAC_TH, data_xoff_thr);
|
||||
EFX_SET_OWORD_FIELD(reg, FRF_AA_RX_XON_MAC_TH, 512 >> 8);
|
||||
EFX_SET_OWORD_FIELD(reg, FRF_AA_RX_XOFF_MAC_TH, 2048 >> 8);
|
||||
EFX_SET_OWORD_FIELD(reg, FRF_AA_RX_XON_TX_TH, ctrl_xon_thr);
|
||||
EFX_SET_OWORD_FIELD(reg, FRF_AA_RX_XOFF_TX_TH, ctrl_xoff_thr);
|
||||
} else {
|
||||
/* Data FIFO size is 80K; register fields moved */
|
||||
if (data_xon_thr < 0)
|
||||
data_xon_thr = 27648 >> 8; /* ~3*max MTU */
|
||||
if (data_xoff_thr < 0)
|
||||
data_xoff_thr = 54272 >> 8; /* ~80Kb - 3*max MTU */
|
||||
EFX_SET_OWORD_FIELD(reg, FRF_BZ_RX_DESC_PUSH_EN, 0);
|
||||
EFX_SET_OWORD_FIELD(reg, FRF_BZ_RX_USR_BUF_SIZE,
|
||||
huge_buf_size);
|
||||
EFX_SET_OWORD_FIELD(reg, FRF_BZ_RX_XON_MAC_TH, data_xon_thr);
|
||||
EFX_SET_OWORD_FIELD(reg, FRF_BZ_RX_XOFF_MAC_TH, data_xoff_thr);
|
||||
/* Send XON and XOFF at ~3 * max MTU away from empty/full */
|
||||
EFX_SET_OWORD_FIELD(reg, FRF_BZ_RX_XON_MAC_TH, 27648 >> 8);
|
||||
EFX_SET_OWORD_FIELD(reg, FRF_BZ_RX_XOFF_MAC_TH, 54272 >> 8);
|
||||
EFX_SET_OWORD_FIELD(reg, FRF_BZ_RX_XON_TX_TH, ctrl_xon_thr);
|
||||
EFX_SET_OWORD_FIELD(reg, FRF_BZ_RX_XOFF_TX_TH, ctrl_xoff_thr);
|
||||
EFX_SET_OWORD_FIELD(reg, FRF_BZ_RX_INGR_EN, 1);
|
||||
|
Reference in New Issue
Block a user