From: Matt Carlson Date: Mon, 2 Nov 2009 14:27:02 +0000 (+0000) Subject: tg3: 5785: Set port mode to MII when link down X-Git-Tag: v2.6.33-rc1~388^2~547 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c3df0748ee43101dfc5c94d1f61ddfca0ff5baa4;p=platform%2Fupstream%2Fkernel-adaptation-pc.git 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 Reviewed-by: Michael Chan Signed-off-by: David S. Miller --- diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 003ab53..d726da8 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;