Skip to content

Commit 05908d7

Browse files
mansrdavem330
authored andcommitted
net: ethernet: dwmac-sun8i: show message only when switching to promisc
Printing the info message every time more than the max number of mac addresses are requested generates unnecessary log spam. Showing it only when the hw is not already in promiscous mode is equally informative without being annoying. Signed-off-by: Mans Rullgard <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 3d00cf2 commit 05908d7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,8 @@ static void sun8i_dwmac_set_filter(struct mac_device_info *hw,
651651
}
652652
}
653653
} else {
654-
netdev_info(dev, "Too many address, switching to promiscuous\n");
654+
if (!(readl(ioaddr + EMAC_RX_FRM_FLT) & EMAC_FRM_FLT_RXALL))
655+
netdev_info(dev, "Too many address, switching to promiscuous\n");
655656
v = EMAC_FRM_FLT_RXALL;
656657
}
657658

0 commit comments

Comments
 (0)