Skip to contentSkip to conversation

net: broadcom: bcm4908_enet: enable RX after processing packets

PATCH Applied Rafał Miłecki 3 participants 3 messages Feb 26, 2021 – Feb 28, 2021

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

PATCH 1/1 net: broadcom: bcm4908_enet: enable RX after processing packets

From: Rafał Miłecki <[email protected]>

When receiving a lot of packets hardware may run out of free descriptiors and stop RX ring. Enable it every time after handling received packets.

Fixes 4feffeadbcb2 ("net: broadcom: bcm4908enet: add BCM4908 controller driver")
---
 drivers/net/ethernet/broadcom/bcm4908_enet.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/ethernet/broadcom/bcm4908_enet.c +3 -0
index 0b70e9e0ddad..98cf82dea3e4 100644
@@ -592,6 +592,9 @@ static int bcm4908_enet_poll(struct napi_struct *napi, int weight)
 		bcm4908_enet_intrs_on(enet);
 	}
 
+	/* Hardware could disable ring if it run out of descriptors */
+	bcm4908_enet_dma_rx_ring_enable(enet, &enet->rx_ring);
+
 	return handled;
 }
 
Signature · 1 line
2.26.2
maintainer Applied
#2 lore raw
Quoted 11 lines · On Sat, 27 Feb 2021 08:38:24 -0800 Florian Fainelli wrote:
Quoted 8 lines · Rafał Miłecki

From: Rafał Miłecki <[email protected]>

When receiving a lot of packets hardware may run out of free descriptiors and stop RX ring. Enable it every time after handling received packets.

Fixes 4feffeadbcb2 ("net: broadcom: bcm4908enet: add BCM4908 controller driver")

Applied, thanks!

Out of curiosity - is the performance not impacted by this change? bcm4908_enet_dma_rx_ring_enable() does an RMW, the read could possibly removed by caching the expected value.