netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] net: ethernet: mtk_eth_soc: fix wrong use of new helper function
@ 2022-09-25 14:47 Daniel Golle
  2022-09-25 21:19 ` Lorenzo Bianconi
  2022-09-27 14:50 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Daniel Golle @ 2022-09-25 14:47 UTC (permalink / raw)
  To: linux-mediatek, netdev, Lorenzo Bianconi
  Cc: Sujuan Chen, Bo Jiao, Felix Fietkau, John Crispin, Sean Wang,
	Mark Lee, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Matthias Brugger, Chen Minqiang

In function mtk_foe_entry_set_vlan() the call to field accessor macro
FIELD_GET(MTK_FOE_IB1_BIND_VLAN_LAYER, entry->ib1)
has been wrongly replaced by
mtk_prep_ib1_vlan_layer(eth, entry->ib1)

Use correct helper function mtk_get_ib1_vlan_layer instead.

Reported-by: Chen Minqiang <ptpt52@gmail.com>
Fixes: 03a3180e5c09e1 ("net: ethernet: mtk_eth_soc: introduce flow offloading support for mt7986")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
 drivers/net/ethernet/mediatek/mtk_ppe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mediatek/mtk_ppe.c b/drivers/net/ethernet/mediatek/mtk_ppe.c
index 25f8738a062bd0..4ea2b342f252ac 100644
--- a/drivers/net/ethernet/mediatek/mtk_ppe.c
+++ b/drivers/net/ethernet/mediatek/mtk_ppe.c
@@ -337,7 +337,7 @@ int mtk_foe_entry_set_vlan(struct mtk_eth *eth, struct mtk_foe_entry *entry,
 {
 	struct mtk_foe_mac_info *l2 = mtk_foe_entry_l2(eth, entry);
 
-	switch (mtk_prep_ib1_vlan_layer(eth, entry->ib1)) {
+	switch (mtk_get_ib1_vlan_layer(eth, entry->ib1)) {
 	case 0:
 		entry->ib1 |= mtk_get_ib1_vlan_tag_mask(eth) |
 			      mtk_prep_ib1_vlan_layer(eth, 1);
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] net: ethernet: mtk_eth_soc: fix wrong use of new helper function
  2022-09-25 14:47 [PATCH 1/2] net: ethernet: mtk_eth_soc: fix wrong use of new helper function Daniel Golle
@ 2022-09-25 21:19 ` Lorenzo Bianconi
  2022-09-27 14:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Lorenzo Bianconi @ 2022-09-25 21:19 UTC (permalink / raw)
  To: Daniel Golle
  Cc: linux-mediatek, netdev, Sujuan Chen, Bo Jiao, Felix Fietkau,
	John Crispin, Sean Wang, Mark Lee, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Matthias Brugger, Chen Minqiang

[-- Attachment #1: Type: text/plain, Size: 1310 bytes --]

> In function mtk_foe_entry_set_vlan() the call to field accessor macro
> FIELD_GET(MTK_FOE_IB1_BIND_VLAN_LAYER, entry->ib1)
> has been wrongly replaced by
> mtk_prep_ib1_vlan_layer(eth, entry->ib1)
> 
> Use correct helper function mtk_get_ib1_vlan_layer instead.

Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>

> 
> Reported-by: Chen Minqiang <ptpt52@gmail.com>
> Fixes: 03a3180e5c09e1 ("net: ethernet: mtk_eth_soc: introduce flow offloading support for mt7986")
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
> ---
>  drivers/net/ethernet/mediatek/mtk_ppe.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/mediatek/mtk_ppe.c b/drivers/net/ethernet/mediatek/mtk_ppe.c
> index 25f8738a062bd0..4ea2b342f252ac 100644
> --- a/drivers/net/ethernet/mediatek/mtk_ppe.c
> +++ b/drivers/net/ethernet/mediatek/mtk_ppe.c
> @@ -337,7 +337,7 @@ int mtk_foe_entry_set_vlan(struct mtk_eth *eth, struct mtk_foe_entry *entry,
>  {
>  	struct mtk_foe_mac_info *l2 = mtk_foe_entry_l2(eth, entry);
>  
> -	switch (mtk_prep_ib1_vlan_layer(eth, entry->ib1)) {
> +	switch (mtk_get_ib1_vlan_layer(eth, entry->ib1)) {
>  	case 0:
>  		entry->ib1 |= mtk_get_ib1_vlan_tag_mask(eth) |
>  			      mtk_prep_ib1_vlan_layer(eth, 1);
> -- 
> 2.37.3
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] net: ethernet: mtk_eth_soc: fix wrong use of new helper function
  2022-09-25 14:47 [PATCH 1/2] net: ethernet: mtk_eth_soc: fix wrong use of new helper function Daniel Golle
  2022-09-25 21:19 ` Lorenzo Bianconi
@ 2022-09-27 14:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-09-27 14:50 UTC (permalink / raw)
  To: Daniel Golle
  Cc: linux-mediatek, netdev, lorenzo, sujuan.chen, Bo.Jiao, nbd, john,
	sean.wang, Mark-MC.Lee, davem, edumazet, kuba, pabeni,
	matthias.bgg, ptpt52

Hello:

This series was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Sun, 25 Sep 2022 15:47:20 +0100 you wrote:
> In function mtk_foe_entry_set_vlan() the call to field accessor macro
> FIELD_GET(MTK_FOE_IB1_BIND_VLAN_LAYER, entry->ib1)
> has been wrongly replaced by
> mtk_prep_ib1_vlan_layer(eth, entry->ib1)
> 
> Use correct helper function mtk_get_ib1_vlan_layer instead.
> 
> [...]

Here is the summary with links:
  - [1/2] net: ethernet: mtk_eth_soc: fix wrong use of new helper function
    https://git.kernel.org/netdev/net-next/c/fb7da771bc43
  - [2/2] net: ethernet: mtk_eth_soc: fix usage of foe_entry_size
    https://git.kernel.org/netdev/net-next/c/454b20e19322

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-27 14:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-25 14:47 [PATCH 1/2] net: ethernet: mtk_eth_soc: fix wrong use of new helper function Daniel Golle
2022-09-25 21:19 ` Lorenzo Bianconi
2022-09-27 14:50 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).