Skip to content

Commit fbcd5a1

Browse files
nbuchwitzpopcornmix
authored andcommitted
net: bcmgenet: keep RBUF EEE/PM disabled
Setting RBUF_EEE_EN | RBUF_PM_EN in RBUF_ENERGY_CTRL breaks the RX path on GENET hardware once MAC EEE becomes active. RX traffic stops flowing while the link stays up and the usual descriptor/RX error counters remain quiet. In that state the MAC still accepts frames (rbuf_ovflow_cnt keeps climbing) but RBUF no longer forwards them to DMA, so rx_packets is no longer incremented at the netdev level. On some boards the corruption ends up as a paging fault in skb_release_data via bcmgenet_rx_poll on an LPI exit. Reproduced on Pi 4B (BCM2711 + BCM54213PE) and confirmed by Florian Fainelli on an internal Broadcom 4908-family board with the same crash signature. RBUF_PM_EN is not publicly documented. This shows up more often now that phy_support_eee() enables EEE by default, but it also affects older kernels as soon as TX LPI is turned on via ethtool, so it is not specific to recent changes. Always clear RBUF_EEE_EN | RBUF_PM_EN in bcmgenet_eee_enable_set so the bits stay off across resets. UMAC and TBUF setup is left alone so TX-side EEE keeps working. Link: #7304 Fixes: 6ef398e ("net: bcmgenet: add EEE support") Cc: stable@vger.kernel.org Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>
1 parent deb9f97 commit fbcd5a1

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

drivers/net/ethernet/broadcom/genet/bcmgenet.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,13 +1368,12 @@ void bcmgenet_eee_enable_set(struct net_device *dev, bool enable)
13681368
reg &= ~(TBUF_EEE_EN | TBUF_PM_EN);
13691369
bcmgenet_writel(reg, priv->base + off);
13701370

1371-
/* Do the same for thing for RBUF */
1371+
/* RBUF EEE/PM can break the RX path on GENET. Keep it disabled. */
13721372
reg = bcmgenet_rbuf_readl(priv, RBUF_ENERGY_CTRL);
1373-
if (enable)
1374-
reg |= RBUF_EEE_EN | RBUF_PM_EN;
1375-
else
1373+
if (reg & (RBUF_EEE_EN | RBUF_PM_EN)) {
13761374
reg &= ~(RBUF_EEE_EN | RBUF_PM_EN);
1377-
bcmgenet_rbuf_writel(priv, reg, RBUF_ENERGY_CTRL);
1375+
bcmgenet_rbuf_writel(priv, reg, RBUF_ENERGY_CTRL);
1376+
}
13781377

13791378
if (!enable && priv->clk_eee_enabled) {
13801379
clk_disable_unprepare(priv->clk_eee);

0 commit comments

Comments
 (0)