Skip to content

Commit 3b2aef9

Browse files
dangowrtkuba-moo
authored andcommitted
net: ethernet: mediatek: Allow gaps in MAC allocation
Some devices with MediaTek SoCs don't use the first but only the second MAC in the chip. Especially with MT7981 which got a built-in 1GE PHY connected to the second MAC this is quite common. Make sure to reset and enable PSE also in those cases by skipping gaps using 'continue' instead of aborting the loop using 'break'. Fixes: dee4dd1 ("net: ethernet: mtk_eth_soc: ppe: add support for multiple PPEs") Suggested-by: Elad Yifee <[email protected]> Signed-off-by: Daniel Golle <[email protected]> Reviewed-by: Przemek Kitszel <[email protected]> Link: https://patch.msgid.link/379ae584cea112db60f4ada79c7e5ba4f3364a64.1719862038.git.daniel@makrotopia.org Signed-off-by: Jakub Kicinski <[email protected]>
1 parent c7f79f2 commit 3b2aef9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/mediatek/mtk_eth_soc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3396,7 +3396,7 @@ static int mtk_open(struct net_device *dev)
33963396

33973397
for (i = 0; i < MTK_MAX_DEVS; i++) {
33983398
if (!eth->netdev[i])
3399-
break;
3399+
continue;
34003400

34013401
target_mac = netdev_priv(eth->netdev[i]);
34023402
if (!soc->offload_version) {

0 commit comments

Comments
 (0)