Skip to contentSkip to conversation

net: ethernet: dwmac-sun8i: show message only when switching to promisc

PATCH Applied Mans Rullgard 2 participants 2 messages Oct 18, 2019 – Oct 19, 2019

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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.

---
Changed in v2:
- test only RXALL bit

---
 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c +2 -1
index 79c91526f3ec..c186de64e552 100644
@@ -646,7 +646,8 @@ static void sun8i_dwmac_set_filter(struct mac_device_info *hw,
 			}
 		}
 	} else {
-		netdev_info(dev, "Too many address, switching to promiscuous\n");
+		if (!(readl(ioaddr + EMAC_RX_FRM_FLT) & EMAC_FRM_FLT_RXALL))
+			netdev_info(dev, "Too many address, switching to promiscuous\n");
 		v = EMAC_FRM_FLT_RXALL;
 	}
 
Signature · 1 line
2.23.0
maintainer Applied
#1 lore raw

From: Mans Rullgard <[email protected]>
Date: Fri, 18 Oct 2019 17:56:58 +0100

Quoted 9 lines

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.

---
Changed in v2:
- test only RXALL bit

Applied, thanks.