From: Birger Koblitz Date: Sun, 5 Sep 2021 16:38:43 +0000 (+0200) Subject: realtek: Remove storm control and attack warnings X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ca04e2dfd02a711cb0b3ce401bd120bd3da3b973;p=openwrt%2Fstaging%2Frmilecki.git realtek: Remove storm control and attack warnings Remove the storm control and attack warnings from the IRQ handler of the Ethernet driver. There was no consequence to the detection and the kernel can also handle at least the attacks itself. Signed-off-by: Birger Koblitz --- diff --git a/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c index 7c3d7c544b1..f91126deb51 100644 --- a/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c +++ b/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c @@ -49,11 +49,6 @@ extern struct rtl83xx_soc_info soc_info; #define RING_BUFFER 1600 -#define RTL838X_STORM_CTRL_PORT_BC_EXCEED (0x470C) -#define RTL838X_STORM_CTRL_PORT_MC_EXCEED (0x4710) -#define RTL838X_STORM_CTRL_PORT_UC_EXCEED (0x4714) -#define RTL838X_ATK_PRVNT_STS (0x5B1C) - struct p_hdr { uint8_t *buf; uint16_t reserved; @@ -407,29 +402,9 @@ static irqreturn_t rtl83xx_net_irq(int irq, void *dev_id) struct net_device *dev = dev_id; struct rtl838x_eth_priv *priv = netdev_priv(dev); u32 status = sw_r32(priv->r->dma_if_intr_sts); - bool triggered = false; - u32 atk = sw_r32(RTL838X_ATK_PRVNT_STS); int i; - u32 storm_uc = sw_r32(RTL838X_STORM_CTRL_PORT_UC_EXCEED); - u32 storm_mc = sw_r32(RTL838X_STORM_CTRL_PORT_MC_EXCEED); - u32 storm_bc = sw_r32(RTL838X_STORM_CTRL_PORT_BC_EXCEED); pr_debug("IRQ: %08x\n", status); - if (storm_uc || storm_mc || storm_bc) { - pr_warn("Storm control UC: %08x, MC: %08x, BC: %08x\n", - storm_uc, storm_mc, storm_bc); - - sw_w32(storm_uc, RTL838X_STORM_CTRL_PORT_UC_EXCEED); - sw_w32(storm_mc, RTL838X_STORM_CTRL_PORT_MC_EXCEED); - sw_w32(storm_bc, RTL838X_STORM_CTRL_PORT_BC_EXCEED); - - triggered = true; - } - - if (atk) { - pr_debug("Attack prevention triggered: %08x\n", atk); - sw_w32(atk, RTL838X_ATK_PRVNT_STS); - } spin_lock(&priv->lock); /* Ignore TX interrupt */