Skip to content

Commit

Permalink
tg3: 5785: Set port mode to MII when link down
Browse files Browse the repository at this point in the history
This patch sets the port mode to MII when the link is down for the 5785.
Setting the port mode to MII instead of GMII saves power.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Matt Carlson authored and David S. Miller committed Nov 3, 2009
1 parent 0e5f784 commit c3df074
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -1363,8 +1363,11 @@ static void tg3_adjust_link(struct net_device *dev)

if (phydev->speed == SPEED_100 || phydev->speed == SPEED_10)
mac_mode |= MAC_MODE_PORT_MODE_MII;
else
else if (phydev->speed == SPEED_1000 ||
GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5785)
mac_mode |= MAC_MODE_PORT_MODE_GMII;
else
mac_mode |= MAC_MODE_PORT_MODE_MII;

if (phydev->duplex == DUPLEX_HALF)
mac_mode |= MAC_MODE_HALF_DUPLEX;
Expand Down

0 comments on commit c3df074

Please sign in to comment.