diff options
author | Ido Schimmel <idosch@mellanox.com> | 2016-07-15 11:15:00 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-07-15 14:49:51 -0700 |
commit | 7347180dcaed9c5582732f9372ac940b9b1a907d (patch) | |
tree | 0f1007ec0ac1123b790f9f8c8bfc6629821ccc06 /drivers/net | |
parent | c3f1576810affced47684e04a08c1ffa845144c9 (diff) | |
download | linux-stable-7347180dcaed9c5582732f9372ac940b9b1a907d.tar.gz linux-stable-7347180dcaed9c5582732f9372ac940b9b1a907d.tar.bz2 linux-stable-7347180dcaed9c5582732f9372ac940b9b1a907d.zip |
mlxsw: spectrum: Don't emit errors when PFC is disabled
We can't have PAUSE frames and PFC both enabled on the same port, but
the fact that ieee_setpfc() was called doesn't necessarily mean PFC is
enabled.
Only emit errors when PAUSE frames and PFC are enabled simultaneously.
Fixes: d81a6bdb87ce ("mlxsw: spectrum: Add IEEE 802.1Qbb PFC support")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c index 0b323661c0b6..5d4b1e7f59f9 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c @@ -351,7 +351,8 @@ static int mlxsw_sp_dcbnl_ieee_setpfc(struct net_device *dev, struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev); int err; - if (mlxsw_sp_port->link.tx_pause || mlxsw_sp_port->link.rx_pause) { + if ((mlxsw_sp_port->link.tx_pause || mlxsw_sp_port->link.rx_pause) && + pfc->pfc_en) { netdev_err(dev, "PAUSE frames already enabled on port\n"); return -EINVAL; } |