summaryrefslogtreecommitdiffstats
path: root/drivers/net/tg3.c
diff options
context:
space:
mode:
authorMatt Carlson <mcarlson@broadcom.com>2009-11-02 15:27:02 +0100
committerDavid S. Miller <davem@davemloft.net>2009-11-03 08:39:07 +0100
commitc3df0748ee43101dfc5c94d1f61ddfca0ff5baa4 (patch)
tree4359acf03c51dd18ff512ee4b44674c3ca885ec5 /drivers/net/tg3.c
parenttg3: Add AC131 power down support (diff)
downloadlinux-c3df0748ee43101dfc5c94d1f61ddfca0ff5baa4.tar.xz
linux-c3df0748ee43101dfc5c94d1f61ddfca0ff5baa4.zip
tg3: 5785: Set port mode to MII when link down
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>
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r--drivers/net/tg3.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 003ab53cf613..d726da8c5930 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -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;