History

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.

Mans Rullgard committed 7 years ago

Commit 05908d71 parent 3d00cf21 file · +2 −1Browse files

Unified · Split

drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c+2−1
@@ -651,7 +651,8 @@ static void sun8i_dwmac_set_filter(struct mac_device_info *hw, · 650 unmodified lines
651 }651 }
652 }652 }
653 } else {653 } 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");
655 v = EMAC_FRM_FLT_RXALL;656 v = EMAC_FRM_FLT_RXALL;
656 }657 }
657 658