[PATCH] net: ravb: Honor the promsicuous mode state on device re-init
From: David Oberhollenzer
Date: Mon Nov 30 2026 - 02:29:23 EST
When the device is initialized via ravb_emac_init, called from
the ndo_open implementation, the ECMR register is initialized
with a configuration that has the promiscuous mode bit cleared.
While this may be desireable for the default case, this device
(re-)initialization is also performed e.g. when changing the MTU
on a running device. An interface that has been set into
promiscuous mode (e.g because it has previously been attached to a
bridge), now silently drops out of promiscuous mode, but with the
IFF_PROMISC flag still set (leaving the bridge to no longer forward
frames correctly).
Make sure we honor the state of the IFF_PROMISC flag from the netdev
when initializing the ECMR.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@xxxxxxxxxxxxx>
---
drivers/net/ethernet/renesas/ravb_main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index 641ad4054df4..d57230492e04 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
@@ -533,6 +533,7 @@ static void ravb_emac_init_gbeth(struct net_device *ndev)
/* EMAC Mode: PAUSE prohibition; Duplex; TX; RX; CRC Pass Through */
ravb_write(ndev, ECMR_ZPF | ((priv->duplex > 0) ? ECMR_DM : 0) |
+ (ndev->flags & IFF_PROMISC ? ECMR_PRM : 0) |
ECMR_TE | ECMR_RE | ECMR_RCPT |
ECMR_TXF | ECMR_RXF, ECMR);
@@ -569,6 +570,7 @@ static void ravb_emac_init_rcar(struct net_device *ndev)
/* EMAC Mode: PAUSE prohibition; Duplex; RX Checksum; TX; RX */
ravb_write(ndev, ECMR_ZPF | ECMR_DM |
(ndev->features & NETIF_F_RXCSUM ? ECMR_RCSC : 0) |
+ (ndev->flags & IFF_PROMISC ? ECMR_PRM : 0) |
ECMR_TE | ECMR_RE, ECMR);
ravb_set_rate_rcar(ndev);
--
2.51.0