Skip to content

Commit

Permalink
net: ethernet: xilinx_emaclite: set protocol selector bits when writi…
Browse files Browse the repository at this point in the history
…ng ANAR

This patch sets the protocol selector bits (4:0) of the PHY's MII_ADVERTISE
register (ANAR) when writing ADVERTISE_ALL. The protocol selector bits are
indicating IEEE 803.3u support and are fixed / read-only on some PHYs. Not
setting them correctly on others (like TI DP83630) makes the PHY fall back
to 10M HDX mode which should be avoided.

Tested for TI DP83630 PHY on Microblaze platform.

Signed-off-by: Jens Renner <renner@efe-gmbh.de>
Tested-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jens Renner \(EFE\) authored and David S. Miller committed Jun 5, 2013
1 parent 44dbc78 commit 3a5395b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/xilinx/xilinx_emaclite.c
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,8 @@ static int xemaclite_open(struct net_device *dev)
phy_write(lp->phy_dev, MII_CTRL1000, 0);

/* Advertise only 10 and 100mbps full/half duplex speeds */
phy_write(lp->phy_dev, MII_ADVERTISE, ADVERTISE_ALL);
phy_write(lp->phy_dev, MII_ADVERTISE, ADVERTISE_ALL |
ADVERTISE_CSMA);

/* Restart auto negotiation */
bmcr = phy_read(lp->phy_dev, MII_BMCR);
Expand Down

0 comments on commit 3a5395b

Please sign in to comment.