[PATCH net-next 1/3] net: bcmasp: Fix network filter wake for asp-3.0

justin.chen@broadcom.com posted 3 patches 3 weeks, 2 days ago
[PATCH net-next 1/3] net: bcmasp: Fix network filter wake for asp-3.0
Posted by justin.chen@broadcom.com 3 weeks, 2 days ago
From: Justin Chen <justin.chen@broadcom.com>

We need to apply the tx_chan_offset to the netfilter cfg channel or the
output channel will be incorrect for asp-3.0 and newer.

Signed-off-by: Justin Chen <justin.chen@broadcom.com>
---
 drivers/net/ethernet/broadcom/asp2/bcmasp.c | 5 +++--
 drivers/net/ethernet/broadcom/asp2/bcmasp.h | 1 +
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/asp2/bcmasp.c b/drivers/net/ethernet/broadcom/asp2/bcmasp.c
index fd35f4b4dc50..014340f33345 100644
--- a/drivers/net/ethernet/broadcom/asp2/bcmasp.c
+++ b/drivers/net/ethernet/broadcom/asp2/bcmasp.c
@@ -156,7 +156,7 @@ static void bcmasp_netfilt_hw_en_wake(struct bcmasp_priv *priv,
 			  ASP_RX_FILTER_NET_OFFSET_L4(32),
 			  ASP_RX_FILTER_NET_OFFSET(nfilt->hw_index + 1));
 
-	rx_filter_core_wl(priv, ASP_RX_FILTER_NET_CFG_CH(nfilt->port + 8) |
+	rx_filter_core_wl(priv, ASP_RX_FILTER_NET_CFG_CH(nfilt->ch) |
 			  ASP_RX_FILTER_NET_CFG_EN |
 			  ASP_RX_FILTER_NET_CFG_L2_EN |
 			  ASP_RX_FILTER_NET_CFG_L3_EN |
@@ -166,7 +166,7 @@ static void bcmasp_netfilt_hw_en_wake(struct bcmasp_priv *priv,
 			  ASP_RX_FILTER_NET_CFG_UMC(nfilt->port),
 			  ASP_RX_FILTER_NET_CFG(nfilt->hw_index));
 
-	rx_filter_core_wl(priv, ASP_RX_FILTER_NET_CFG_CH(nfilt->port + 8) |
+	rx_filter_core_wl(priv, ASP_RX_FILTER_NET_CFG_CH(nfilt->ch) |
 			  ASP_RX_FILTER_NET_CFG_EN |
 			  ASP_RX_FILTER_NET_CFG_L2_EN |
 			  ASP_RX_FILTER_NET_CFG_L3_EN |
@@ -714,6 +714,7 @@ struct bcmasp_net_filter *bcmasp_netfilt_get_init(struct bcmasp_intf *intf,
 		nfilter = &priv->net_filters[open_index];
 		nfilter->claimed = true;
 		nfilter->port = intf->port;
+		nfilter->ch = intf->channel + priv->tx_chan_offset;
 		nfilter->hw_index = open_index;
 	}
 
diff --git a/drivers/net/ethernet/broadcom/asp2/bcmasp.h b/drivers/net/ethernet/broadcom/asp2/bcmasp.h
index 74adfdb50e11..e238507be40a 100644
--- a/drivers/net/ethernet/broadcom/asp2/bcmasp.h
+++ b/drivers/net/ethernet/broadcom/asp2/bcmasp.h
@@ -348,6 +348,7 @@ struct bcmasp_net_filter {
 	bool				wake_filter;
 
 	int				port;
+	int				ch;
 	unsigned int			hw_index;
 };
 
-- 
2.34.1
Re: [PATCH net-next 1/3] net: bcmasp: Fix network filter wake for asp-3.0
Posted by Andrew Lunn 3 weeks, 1 day ago
On Thu, Jan 15, 2026 at 04:50:35PM -0800, justin.chen@broadcom.com wrote:
> From: Justin Chen <justin.chen@broadcom.com>
> 
> We need to apply the tx_chan_offset to the netfilter cfg channel or the
> output channel will be incorrect for asp-3.0 and newer.

If this is a fix, should it be queued for stable?

   Andrew
Re: [PATCH net-next 1/3] net: bcmasp: Fix network filter wake for asp-3.0
Posted by Justin Chen 3 weeks, 1 day ago

On 1/16/26 9:23 AM, Andrew Lunn wrote:
> On Thu, Jan 15, 2026 at 04:50:35PM -0800, justin.chen@broadcom.com wrote:
>> From: Justin Chen <justin.chen@broadcom.com>
>>
>> We need to apply the tx_chan_offset to the netfilter cfg channel or the
>> output channel will be incorrect for asp-3.0 and newer.
> 
> If this is a fix, should it be queued for stable?
> 

Yes, will add a fixes tag in v2. Thanks!

>     Andrew
Re: [PATCH net-next 1/3] net: bcmasp: Fix network filter wake for asp-3.0
Posted by Andrew Lunn 3 weeks, 1 day ago
On Fri, Jan 16, 2026 at 10:55:44AM -0800, Justin Chen wrote:
> 
> 
> On 1/16/26 9:23 AM, Andrew Lunn wrote:
> > On Thu, Jan 15, 2026 at 04:50:35PM -0800, justin.chen@broadcom.com wrote:
> > > From: Justin Chen <justin.chen@broadcom.com>
> > > 
> > > We need to apply the tx_chan_offset to the netfilter cfg channel or the
> > > output channel will be incorrect for asp-3.0 and newer.
> > 
> > If this is a fix, should it be queued for stable?
> > 
> 
> Yes, will add a fixes tag in v2. Thanks!

Please base this patch on net, not net-next.

https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html

    Andrew

---
pw-bot: cr
Re: [PATCH net-next 1/3] net: bcmasp: Fix network filter wake for asp-3.0
Posted by Florian Fainelli 3 weeks, 2 days ago

On 1/15/2026 4:50 PM, justin.chen@broadcom.com wrote:
> From: Justin Chen <justin.chen@broadcom.com>
> 
> We need to apply the tx_chan_offset to the netfilter cfg channel or the
> output channel will be incorrect for asp-3.0 and newer.
> 
> Signed-off-by: Justin Chen <justin.chen@broadcom.com>

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
-- 
Florian