Thank you for your contribution! Sashiko AI review found more severe issue(s) in other patches of this series. This mail is only an FYI, in case you want to address the nit picks below when you respin. Low priority / nit picks for your consideration: - [Low] Not a bug in the final state of the series; kept only because requires_validation=true. - [Low] Not a bug in the final state of the series; kept only because requires_validation=true. -- net: bcmgenet: keep FCS forwarding when exiting Wake-on-LAN Before this change, bcmgenet_wol_power_up_cfg() always cleared priv->crc_fwd_en. It now sets it from NETIF_F_RXFCS in dev->features and clears CMD_CRC_FWD in UMAC_CMD only when the FCS is not wanted. This prepares for a later change that adds NETIF_F_RXFCS support.
> diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet_wol.c b/drivers/net/ethernet/broadcom/genet/bcmgenet_wol.c > index 984432952963a..ff34c4df4f4ab 100644 > --- a/drivers/net/ethernet/broadcom/genet/bcmgenet_wol.c > +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet_wol.c > @@ -223,7 +223,8 @@ int bcmgenet_wol_power_up_cfg(struct bcmgenet_priv *priv, > } > > clk_disable_unprepare(priv->clk_wol); > - priv->crc_fwd_en = 0; > + /* Keep forwarding the FCS if the user asked for it */ > + priv->crc_fwd_en = !!(dev->features & NETIF_F_RXFCS);
[Severity: Low] In bcmgenet_wol_power_up_cfg(), this assignment runs before the two "already reset" early returns: reg = bcmgenet_umac_readl(priv, UMAC_MPD_CTRL); if (!(reg & MPD_EN)) return -EPERM; /* already reset so skip the rest */ ... reg = bcmgenet_hfb_reg_readl(priv, HFB_CTRL); if (!(reg & RBUF_ACPI_EN)) return -EPERM; /* already reset so skip the rest */ If either return is taken, bcmgenet_resume_noirq() falls through to bcmgenet_umac_reset(). bcmgenet_resume() then takes the "MAC was reset" path and calls init_umac(). In init_umac(), reset_umac() clears CMD_CRC_FWD. RBUF_SKIP_FCS, though, is set from crc_fwd_en: if (priv->crc_fwd_en) reg |= RBUF_SKIP_FCS; else reg &= ~RBUF_SKIP_FCS; Once RXFCS can be turned on, could RBUF_SKIP_FCS end up set while CMD_CRC_FWD is clear? At this commit, crc_fwd_en is always 0 on this path, because NETIF_F_RXFCS is not in hw_features. The follow-up patch "net: bcmgenet: add support for NETIF_F_RXFCS" covers this. bcmgenet_resume() calls bcmgenet_set_features(dev, dev->features) after init_umac() and before bcmgenet_netif_start() enables RX. After that patch, this call writes CMD_CRC_FWD, crc_fwd_en and RBUF_SKIP_FCS together. So by the end of the series, received frames should never see the mismatch. [ ... ]
> @@ -248,10 +249,11 @@ int bcmgenet_wol_power_up_cfg(struct bcmgenet_priv *priv, > reg &= ~RBUF_ACPI_EN; > bcmgenet_hfb_reg_writel(priv, reg, HFB_CTRL); > > - /* Disable CRC Forward */ > + /* Disable CRC Forward unless NETIF_F_RXFCS needs it */ > spin_lock_bh(&priv->reg_lock); > reg = bcmgenet_umac_readl(priv, UMAC_CMD); > - reg &= ~CMD_CRC_FWD; > + if (!priv->crc_fwd_en) > + reg &= ~CMD_CRC_FWD; > bcmgenet_umac_writel(priv, reg, UMAC_CMD);
[Severity: Low] With this change, priv->crc_fwd_en is set from two different sources. bcmgenet_wol_power_up_cfg() sets it from the user's NETIF_F_RXFCS setting. bcmgenet_set_features() still reads it back from the hardware and never writes CMD_CRC_FWD: /* Make sure we reflect the value of CRC_CMD_FWD */ reg = bcmgenet_umac_readl(priv, UMAC_CMD); priv->crc_fwd_en = !!(reg & CMD_CRC_FWD); bcmgenet_desc_rx() also strips the FCS whenever crc_fwd_en is set: if (priv->crc_fwd_en) { skb_trim(skb, skb->len - ETH_FCS_LEN); } Looking at this commit alone, wouldn't bcmgenet_desc_rx() trim the FCS that the new comment says the user asked to keep? As the commit message says, this has no runtime effect at this commit. NETIF_F_RXFCS is not in hw_features, so the expression always evaluates to 0. The follow-up patch "net: bcmgenet: add support for NETIF_F_RXFCS" resolves this by the end of the series. It makes bcmgenet_set_features() program CMD_CRC_FWD from NETIF_F_RXFCS. It also changes bcmgenet_desc_rx() to trim only when crc_fwd_en is set and NETIF_F_RXFCS is not. [ ... ]
-- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/2026…%40broadcom.com