* [PATCH 09/20] tg3: 5785: Set port mode to MII when link down
@ 2009-11-03 0:27 Matt Carlson
0 siblings, 0 replies; only message in thread
From: Matt Carlson @ 2009-11-03 0:27 UTC (permalink / raw)
To: davem; +Cc: netdev, andy
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>
---
drivers/net/tg3.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
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;
--
1.6.4.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-11-03 1:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-03 0:27 [PATCH 09/20] tg3: 5785: Set port mode to MII when link down Matt Carlson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).