aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Mortensen <[email protected]>2023-10-05 22:37:06 -0700
committerPaolo Abeni <[email protected]>2023-10-10 15:22:25 +0200
commitda6192ca72d5ad913d109d43dc896290ad05d98f (patch)
treebd25569d43994b87fd14a26f97ce782a79e70419
parenta72178cfe855c283224f393d94a1332b90d1483e (diff)
net/mlx5e: Again mutually exclude RX-FCS and RX-port-timestamp
Commit 1e66220948df8 ("net/mlx5e: Update rx ring hw mtu upon each rx-fcs flag change") seems to have accidentally inverted the logic added in commit 0bc73ad46a76 ("net/mlx5e: Mutually exclude RX-FCS and RX-port-timestamp"). The impact of this is a little unclear since it seems the FCS scattered with RX-FCS is (usually?) correct regardless. Fixes: 1e66220948df8 ("net/mlx5e: Update rx ring hw mtu upon each rx-fcs flag change") Tested-by: Charlotte Tan <[email protected]> Reviewed-by: Charlotte Tan <[email protected]> Cc: Adham Faris <[email protected]> Cc: Aya Levin <[email protected]> Cc: Tariq Toukan <[email protected]> Cc: Moshe Shemesh <[email protected]> Cc: Saeed Mahameed <[email protected]> Signed-off-by: Will Mortensen <[email protected]> Reviewed-by: Tariq Toukan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index a2ae791538ed..acb40770cf0c 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -3952,13 +3952,14 @@ static int set_feature_rx_fcs(struct net_device *netdev, bool enable)
struct mlx5e_channels *chs = &priv->channels;
struct mlx5e_params new_params;
int err;
+ bool rx_ts_over_crc = !enable;
mutex_lock(&priv->state_lock);
new_params = chs->params;
new_params.scatter_fcs_en = enable;
err = mlx5e_safe_switch_params(priv, &new_params, mlx5e_set_rx_port_ts_wrap,
- &new_params.scatter_fcs_en, true);
+ &rx_ts_over_crc, true);
mutex_unlock(&priv->state_lock);
return err;
}