瀏覽代碼

net: ethernet: prueth: fix storm prev enable for DualEMAC

The timer function for storm prevention checked that both ports are
configured before reseting the counter. In single EMAC case, only one
port may be configured so it should not check for both ports (this was
causing storm prevention to not function at all when only one port was
active). This change makes the check for both ports only applicable
to HSR/PRP case (the individual ports are still checked before
actual update).

Signed-off-by: Aaron Kramer <a-kramer@ti.com>
Aaron Kramer 6 年之前
父節點
當前提交
9d8ff393a8
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/ethernet/ti/prueth.c

+ 1 - 1
drivers/net/ethernet/ti/prueth.c

@@ -1466,7 +1466,7 @@ static enum hrtimer_restart prueth_timer(struct hrtimer *timer)
 	enum prueth_mac mac;
 
 	hrtimer_forward_now(timer, ktime_set(0, prueth->tbl_check_period));
-	if (prueth->emac_configured !=
+	if (PRUETH_HAS_RED(prueth) && prueth->emac_configured !=
 		(BIT(PRUETH_PORT_MII0) | BIT(PRUETH_PORT_MII1)))
 		return HRTIMER_RESTART;