netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 7/13] tg3: Disable GPHY autopowerdown
@ 2007-11-10  0:38 Matt Carlson
  2007-11-13  5:16 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Matt Carlson @ 2007-11-10  0:38 UTC (permalink / raw)
  To: davem; +Cc: netdev, andy, Michael Chan

New CPMU devices contend with the GPHY for power management.  The GPHY
autopowerdown feature is enabled by default in the PHY and thus needs to
be disabled after every PHY reset.

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

diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 25e57d8..b5c4799 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -1117,6 +1117,12 @@ static int tg3_phy_reset(struct tg3 *tp)
 			udelay(40);
 			tw32_f(TG3_CPMU_LSPD_1000MB_CLK, val);
 		}
+
+		/* Disable GPHY autopowerdown. */
+		tg3_writephy(tp, MII_TG3_MISC_SHDW,
+			     MII_TG3_MISC_SHDW_WREN |
+			     MII_TG3_MISC_SHDW_APD_SEL |
+			     MII_TG3_MISC_SHDW_APD_WKTM_84MS);
 	}
 
 out:
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h
index f715b35..5b799ff 100644
--- a/drivers/net/tg3.h
+++ b/drivers/net/tg3.h
@@ -1715,6 +1715,12 @@
 #define MII_TG3_ISTAT			0x1a /* IRQ status register */
 #define MII_TG3_IMASK			0x1b /* IRQ mask register */
 
+#define MII_TG3_MISC_SHDW		0x1c
+#define MII_TG3_MISC_SHDW_WREN		0x8000
+#define MII_TG3_MISC_SHDW_APD_SEL	0x2800
+
+#define MII_TG3_MISC_SHDW_APD_WKTM_84MS	0x0001
+
 /* ISTAT/IMASK event bits */
 #define MII_TG3_INT_LINKCHG		0x0002
 #define MII_TG3_INT_SPEEDCHG		0x0004



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

* Re: [PATCH 7/13] tg3: Disable GPHY autopowerdown
  2007-11-10  0:38 [PATCH 7/13] tg3: Disable GPHY autopowerdown Matt Carlson
@ 2007-11-13  5:16 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2007-11-13  5:16 UTC (permalink / raw)
  To: mcarlson; +Cc: netdev, andy, mchan

From: "Matt Carlson" <mcarlson@broadcom.com>
Date: Fri, 09 Nov 2007 16:38:54 -0800

> New CPMU devices contend with the GPHY for power management.  The GPHY
> autopowerdown feature is enabled by default in the PHY and thus needs to
> be disabled after every PHY reset.
> 
> Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
> Signed-off-by: Michael Chan <mchan@broadcom.com>

Patch applied, thanks.

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

end of thread, other threads:[~2007-11-13  5:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-10  0:38 [PATCH 7/13] tg3: Disable GPHY autopowerdown Matt Carlson
2007-11-13  5:16 ` David Miller

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).