Skip to contentSkip to conversation

tg3: Fix APE induced regression

PATCH In review Matt Carlson 3 participants 3 messages Oct 12, 2007

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

PATCH 1/1 tg3: Fix APE induced regression

This patch fixes a bug caused by the recent APE support added for 5761 devices.

drivers/net/tg3.c +4 -3
index d2b30fb..e978a79 100644
@@ -6966,9 +6966,10 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
 		break;
 	};
 
-	/* Write our heartbeat update interval to APE. */
-	tg3_ape_write32(tp, TG3_APE_HOST_HEARTBEAT_INT_MS,
-			APE_HOST_HEARTBEAT_INT_DISABLE);
+	if (tp->tg3_flags3 & TG3_FLG3_ENABLE_APE)
+		/* Write our heartbeat update interval to APE. */
+		tg3_ape_write32(tp, TG3_APE_HOST_HEARTBEAT_INT_MS,
+				APE_HOST_HEARTBEAT_INT_DISABLE);
 
 	tg3_write_sig_post_reset(tp, RESET_KIND_INIT);