]> git.baikalelectronics.ru Git - kernel.git/commit
gianfar: Fix Tx flow control deactivation
authorClaudiu Manoil <claudiu.manoil@nxp.com>
Mon, 4 Sep 2017 07:45:28 +0000 (10:45 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Sep 2017 21:34:45 +0000 (14:34 -0700)
commitef0e1988655a1847629da856b51182a8bf7e1137
tree22e23d01839dc650354d1196e303fca56f057e42
parent7f573720bd39078adcca46b2de6498509bfd0fd4
gianfar: Fix Tx flow control deactivation

The wrong register is checked for the Tx flow control bit,
it should have been maccfg1 not maccfg2.
This went unnoticed for so long probably because the impact is
hardly visible, not to mention the tangled code from adjust_link().
First, link flow control (i.e. handling of Rx/Tx link level pause frames)
is disabled by default (needs to be enabled via 'ethtool -A').
Secondly, maccfg2 always returns 0 for tx_flow_oldval (except for a few
old boards), which results in Tx flow control remaining always on
once activated.

Fixes: dc63a8647519910d95e5ec6b913aaadbf86083b2 ("gianfar: Implement PAUSE frame generation support")
Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/gianfar.c