Skip to content

Commit

Permalink
b44: always set duplex mode why phy changes
Browse files Browse the repository at this point in the history
Without this patch b44_check_phy() was called when the phy called the
adjust callback. This method only change the mac duplex mode when the
carrier was off. When the phy changed the duplex mode after the carrier
was on the mac was not changed. This happened when an external phy was
used.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Hauke Mehrtens authored and David S. Miller committed Mar 3, 2014
1 parent 25d54fe commit 1d3f41e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/net/ethernet/broadcom/b44.c
Original file line number Diff line number Diff line change
Expand Up @@ -2229,7 +2229,12 @@ static void b44_adjust_link(struct net_device *dev)
}

if (status_changed) {
b44_check_phy(bp);
u32 val = br32(bp, B44_TX_CTRL);
if (bp->flags & B44_FLAG_FULL_DUPLEX)
val |= TX_CTRL_DUPLEX;
else
val &= ~TX_CTRL_DUPLEX;
bw32(bp, B44_TX_CTRL, val);
phy_print_status(phydev);
}
}
Expand Down

0 comments on commit 1d3f41e

Please sign in to comment.