Skip to contentSkip to conversation

tg3: Manage gphy power for CPMU-less devs only

PATCH In review Matt Carlson 1 participant 1 message Aug 2, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 5/14 tg3: Manage gphy power for CPMU-less devs only

This patch changes the code to only manage the PCIe gphy power for CPMU-less devices only. The CPMU takes over management for newer chips.

---
 drivers/net/tg3.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
drivers/net/tg3.c +4 -1
index 5d155c5..38979f2 100644
@@ -6948,8 +6948,11 @@ static int tg3_chip_reset(struct tg3 *tp)
 		     tr32(GRC_VCPU_EXT_CTRL) & ~GRC_VCPU_EXT_CTRL_HALT_CPU);
 	}
 
-	if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS)
+	/* Manage gphy power for all CPMU absent PCIe devices. */
+	if ((tp->tg3_flags2 & TG3_FLG2_5705_PLUS) &&
+	    !(tp->tg3_flags & TG3_FLAG_CPMU_PRESENT))
 		val |= GRC_MISC_CFG_KEEP_GPHY_POWER;
+
 	tw32(GRC_MISC_CFG, val);
 
 	/* restore 5701 hardware bug workaround write method */
Signature · 1 line
1.7.1