🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
5 messages
5 total messages Started by David Oberhollenzer Mon, 30 Nov 2026 07:28
[PATCH] net: ravb: Honor the promsicuous mode state on device re-init
#24458
Author: David Oberhollenzer
Date: Mon, 30 Nov 2026 07:28
43 lines
12353 bytes
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@sigma-star.at>
---
 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
Re: [PATCH] net: ravb: Honor the promsicuous mode state on device re-init
#24460
Author: netdev-bot+sinfo
Date: Mon, 30 Nov 2026 07:33
23 lines
8670 bytes
Hi!

This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:

 - How the issue was discovered, e.g. hit in production, hit during
   development, syzbot report, manual code inspection, LLM or static
   analysis tool scan.

 - What hardware the change was tested on. For driver fixes please
   mention the device (and if relevant firmware version) used for
   testing, or say that the change was not tested on real hardware.

Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account.

*IMPORTANT*: If you do repost (for other reasons) - please include
the relevant info in the cover letter or commit messages.
-- 
The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.
Re: [PATCH] net: ravb: Honor the promsicuous mode state on device re-init
#24469
Author: David Oberhollenzer
Date: Mon, 30 Nov 2026 07:55
31 lines
12384 bytes
On 11/30/26 8:33 AM, netdev-bot+sinfo@kernel.org wrote:
> Hi!
> 
> This is an automated message. This series looks like a fix, but its
> commit messages seem to be missing some information:
> 
>   - How the issue was discovered, e.g. hit in production, hit during
>     development, syzbot report, manual code inspection, LLM or static
>     analysis tool scan.
> 

The issue was hit during development of a new revision of an existing,
production device, where an older SoC has been replaced.

Bridging between interfaces worked on the old revision. On the new
revision, multi-/broadcast frames are forwarded, but unicast frames
addressed to the device on the respective other side are dropped.
The silently disabled promiscuous mode was considered to be the root
cause, the issue no longer appears with this fix applied.

>   - What hardware the change was tested on. For driver fixes please
>     mention the device (and if relevant firmware version) used for
>     testing, or say that the change was not tested on real hardware.
> 

This was tested on a proprietary board with a Renesas R9A07G044L2 SoC.

Greetings,

David
Re: [PATCH] net: ravb: Honor the promsicuous mode state on device re-init
#24673
Author: Niklas Söderlund
Date: Mon, 30 Nov 2026 15:55
66 lines
15545 bytes
Hi David,

Thanks for your patch.

On 2026-11-30 08:28:55 +0100, David Oberhollenzer wrote:
> 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@sigma-star.at>
> ---
>  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);

I wonder if it would make more sens to add a call to ravb_set_rx_mode() 
in ravb_emac_init()?

It would align with how the promiscuous mode is preserved when resuming 
from suspend. If it's added there the direct call to ravb_set_rx_mode() 
could even be dropped from ravb_resume() as it already calls ravb_open() 
which in turn call ravb_emac_init().

That way we have a single point for this and don't need to spread code 
in the gbeth and rcar codepaths, something I'm slowly working to join 
back into one.

>  
>  	ravb_set_rate_rcar(ndev);
> -- 
> 2.51.0
> 

-- 
Kind Regards,
Niklas Söderlund
Re: [PATCH] net: ravb: Honor the promsicuous mode state on device re-init
#24892
Author: Andrew Lunn
Date: Tue, 01 Dec 2026 01:39
24 lines
9185 bytes
On Mon, Nov 30, 2026 at 08:28:55AM +0100, David Oberhollenzer wrote:
> 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@sigma-star.at>

You are missing a Fixes: tag indicating where the problem started.

https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html

	Andrew
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads