From: Eugenia Emantayev Date: Wed, 21 Aug 2013 07:08:56 +0000 (+0300) Subject: net/mlx4_en: Disable global flow control when PFC enabled X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0e316f1b9bd86261fb3283b3ac2eeebd5ef56f1b;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git net/mlx4_en: Disable global flow control when PFC enabled Fix a bug when FC and PFC are enabled/disabled at the same time. According to ConnectX-3 Programmer Manual these two features are mutial exclusive. So make sure when enabling PFC to turn off global FC and vise versa. Otherwise it hurts the performance. Signed-off-by: Eugenia Emantayev Signed-off-by: Amir Vadai Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c b/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c index f71fba97d786..b4881b686159 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c @@ -170,8 +170,8 @@ static int mlx4_en_dcbnl_ieee_setpfc(struct net_device *dev, pfc->mbc, pfc->delay); - prof->rx_pause = !!pfc->pfc_en; - prof->tx_pause = !!pfc->pfc_en; + prof->rx_pause = !pfc->pfc_en; + prof->tx_pause = !pfc->pfc_en; prof->rx_ppp = pfc->pfc_en; prof->tx_ppp = pfc->pfc_en;