Skip to content

Commit 9b5e5d8

Browse files
claudiu-mgregkh
authored andcommitted
gianfar: Fix Tx flow control deactivation
[ Upstream commit 5d621672bc1a1e5090c1ac5432a18c79e0e13e03 ] 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: 45b679c ("gianfar: Implement PAUSE frame generation support") Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 5f529e0 commit 9b5e5d8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/net/ethernet/freescale/gianfar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3676,7 +3676,7 @@ static noinline void gfar_update_link_state(struct gfar_private *priv)
36763676
u32 tempval1 = gfar_read(&regs->maccfg1);
36773677
u32 tempval = gfar_read(&regs->maccfg2);
36783678
u32 ecntrl = gfar_read(&regs->ecntrl);
3679-
u32 tx_flow_oldval = (tempval & MACCFG1_TX_FLOW);
3679+
u32 tx_flow_oldval = (tempval1 & MACCFG1_TX_FLOW);
36803680

36813681
if (phydev->duplex != priv->oldduplex) {
36823682
if (!(phydev->duplex))

0 commit comments

Comments
 (0)