All of lore.kernel.org
 help / color / mirror / Atom feed
* [TG3 5/8]: Power down 5704 serdes transceiver when shutting down.
@ 2007-02-13 20:14 Michael Chan
  2007-02-13 20:19 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Chan @ 2007-02-13 20:14 UTC (permalink / raw)
  To: davem, netdev

[TG3]: Power down 5704 serdes transceiver when shutting down.

Signed-off-by: Michael Chan <mchan@broadcom.com>

diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index b6615f1..604f308 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -1175,8 +1175,18 @@ static void tg3_nvram_unlock(struct tg3
 
 static void tg3_power_down_phy(struct tg3 *tp)
 {
-	if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES)
+	if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) {
+		if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) {
+			u32 sg_dig_ctrl = tr32(SG_DIG_CTRL);
+			u32 serdes_cfg = tr32(MAC_SERDES_CFG);
+
+			sg_dig_ctrl |=
+				SG_DIG_USING_HW_AUTONEG | SG_DIG_SOFT_RESET;
+			tw32(SG_DIG_CTRL, sg_dig_ctrl);
+			tw32(MAC_SERDES_CFG, serdes_cfg | (1 << 15));
+		}
 		return;
+	}
 
 	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906) {
 		u32 val;



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [TG3 5/8]: Power down 5704 serdes transceiver when shutting down.
  2007-02-13 20:14 [TG3 5/8]: Power down 5704 serdes transceiver when shutting down Michael Chan
@ 2007-02-13 20:19 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2007-02-13 20:19 UTC (permalink / raw)
  To: mchan; +Cc: netdev

From: "Michael Chan" <mchan@broadcom.com>
Date: Tue, 13 Feb 2007 12:14:32 -0800

> [TG3]: Power down 5704 serdes transceiver when shutting down.
> 
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-02-13 20:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-13 20:14 [TG3 5/8]: Power down 5704 serdes transceiver when shutting down Michael Chan
2007-02-13 20:19 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.