Skip to content

Commit b383b54

Browse files
Gal PressmanSaeed Mahameed
authored andcommitted
net/mlx5e: Use the correct pause values for ethtool advertising
Query the operational pause from firmware (PFCC register) instead of always passing zeros. Fixes: 665bc53 ("net/mlx5e: Use new ethtool get/set link ksettings API") Signed-off-by: Gal Pressman <[email protected]> Cc: [email protected] Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 1c4d5f5 commit b383b54

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,8 @@ static int mlx5e_get_link_ksettings(struct net_device *netdev,
849849
struct mlx5e_priv *priv = netdev_priv(netdev);
850850
struct mlx5_core_dev *mdev = priv->mdev;
851851
u32 out[MLX5_ST_SZ_DW(ptys_reg)] = {0};
852+
u32 rx_pause = 0;
853+
u32 tx_pause = 0;
852854
u32 eth_proto_cap;
853855
u32 eth_proto_admin;
854856
u32 eth_proto_lp;
@@ -871,11 +873,13 @@ static int mlx5e_get_link_ksettings(struct net_device *netdev,
871873
an_disable_admin = MLX5_GET(ptys_reg, out, an_disable_admin);
872874
an_status = MLX5_GET(ptys_reg, out, an_status);
873875

876+
mlx5_query_port_pause(mdev, &rx_pause, &tx_pause);
877+
874878
ethtool_link_ksettings_zero_link_mode(link_ksettings, supported);
875879
ethtool_link_ksettings_zero_link_mode(link_ksettings, advertising);
876880

877881
get_supported(eth_proto_cap, link_ksettings);
878-
get_advertising(eth_proto_admin, 0, 0, link_ksettings);
882+
get_advertising(eth_proto_admin, tx_pause, rx_pause, link_ksettings);
879883
get_speed_duplex(netdev, eth_proto_oper, link_ksettings);
880884

881885
eth_proto_oper = eth_proto_oper ? eth_proto_oper : eth_proto_cap;

0 commit comments

Comments
 (0)