From: Florian Fainelli <florian.fainelli@broadcom.com>
To: netdev@vger.kernel.org
Cc: Florian Fainelli <florian.fainelli@broadcom.com>,
Doug Berger <opendmb@gmail.com>,
Nicolai Buchwitz <nb@tipi-net.de>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Subject: [PATCH net-next 1/2] net: bcmgenet: keep FCS forwarding when exiting Wake-on-LAN
Date: Fri, 4 Dec 2026 15:00:47 -0800 [thread overview]
Message-ID: <20261204230048.3554713-2-florian.fainelli@broadcom.com> (raw)
In-Reply-To: <20261204230048.3554713-1-florian.fainelli@broadcom.com>
bcmgenet_wol_power_down_cfg() forces CMD_CRC_FWD on so that the
UniMAC can match magic packets, and bcmgenet_wol_power_up_cfg()
unconditionally turns it back off and clears priv->crc_fwd_en.
That is fine as long as the driver never forwards the FCS on its own,
but a following change makes this depend on NETIF_F_RXFCS. On a
successful WoL exit bcmgenet_resume() does not re-apply the features,
so clearing the state here would silently drop the user's setting.
Derive priv->crc_fwd_en from dev->features when leaving WoL and only
clear CMD_CRC_FWD when the FCS is not wanted. Since NETIF_F_RXFCS is
not advertised yet, there is no functional change.
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
drivers/net/ethernet/broadcom/genet/bcmgenet_wol.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet_wol.c b/drivers/net/ethernet/broadcom/genet/bcmgenet_wol.c
index 984432952963..ff34c4df4f4a 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);
bcmgenet_intrl2_0_writel(priv, UMAC_IRQ_WAKE_EVENT,
INTRL2_CPU_MASK_SET);
@@ -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);
/*
--
2.56.1
next prev parent reply other threads:[~2026-12-04 23:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 23:00 [PATCH net-next 0/2] net: bcmgenet: Support for NETIF_F_RXFCS Florian Fainelli
2026-12-04 23:00 ` Florian Fainelli [this message]
2026-12-04 23:00 ` [PATCH net-next 2/2] net: bcmgenet: add support " Florian Fainelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261204230048.3554713-2-florian.fainelli@broadcom.com \
--to=florian.fainelli@broadcom.com \
--cc=andrew+netdev@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=kuba@kernel.org \
--cc=nb@tipi-net.de \
--cc=netdev@vger.kernel.org \
--cc=opendmb@gmail.com \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox