소스 검색

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;