Kaynağa Gözat

[TG3]: Fix APE induced regression

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

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson 17 yıl önce
ebeveyn
işleme
9ce768ead8
1 değiştirilmiş dosya ile 4 ekleme ve 3 silme
  1. 4 3
      drivers/net/tg3.c

+ 4 - 3
drivers/net/tg3.c

@@ -6985,9 +6985,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);