]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
net/mlx4_en: Disable global flow control when PFC enabled
authorEugenia Emantayev <eugenia@mellanox.com>
Wed, 21 Aug 2013 07:08:56 +0000 (10:08 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 21 Aug 2013 19:19:26 +0000 (12:19 -0700)
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 <eugenia@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_dcb_nl.c

index f71fba97d78646ee5c5b1b347bb54b0f4bc66b5c..b4881b6861590c16c55644fd2752abfcf569ad8e 100644 (file)
@@ -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;