* [PATCH net] net: ethernet: mtk_eth_soc: fix typo for declaration MT7988 ESW capability
@ 2025-05-13 4:27 Daniel Golle
2025-05-13 5:21 ` Michal Swiatkowski
2025-05-15 2:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Daniel Golle @ 2025-05-13 4:27 UTC (permalink / raw)
To: Felix Fietkau, Sean Wang, Lorenzo Bianconi, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Matthias Brugger, AngeloGioacchino Del Regno, Russell King,
Daniel Golle, netdev, linux-kernel, linux-arm-kernel,
linux-mediatek
From: Bo-Cun Chen <bc-bocun.chen@mediatek.com>
Since MTK_ESW_BIT is a bit number rather than a bitmap, it causes
MTK_HAS_CAPS to produce incorrect results. This leads to the ETH
driver not declaring MAC capabilities correctly for the MT7988 ESW.
Fixes: 445eb6448ed3 ("net: ethernet: mtk_eth_soc: add basic support for MT7988 SoC")
Signed-off-by: Bo-Cun Chen <bc-bocun.chen@mediatek.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index 22a532695fb0..6c92072b4c28 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -4748,7 +4748,7 @@ static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
}
if (mtk_is_netsys_v3_or_greater(mac->hw) &&
- MTK_HAS_CAPS(mac->hw->soc->caps, MTK_ESW_BIT) &&
+ MTK_HAS_CAPS(mac->hw->soc->caps, MTK_ESW) &&
id == MTK_GMAC1_ID) {
mac->phylink_config.mac_capabilities = MAC_ASYM_PAUSE |
MAC_SYM_PAUSE |
--
2.49.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: ethernet: mtk_eth_soc: fix typo for declaration MT7988 ESW capability
2025-05-13 4:27 [PATCH net] net: ethernet: mtk_eth_soc: fix typo for declaration MT7988 ESW capability Daniel Golle
@ 2025-05-13 5:21 ` Michal Swiatkowski
2025-05-15 2:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Michal Swiatkowski @ 2025-05-13 5:21 UTC (permalink / raw)
To: Daniel Golle
Cc: Felix Fietkau, Sean Wang, Lorenzo Bianconi, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Matthias Brugger, AngeloGioacchino Del Regno, Russell King,
netdev, linux-kernel, linux-arm-kernel, linux-mediatek
On Tue, May 13, 2025 at 05:27:30AM +0100, Daniel Golle wrote:
> From: Bo-Cun Chen <bc-bocun.chen@mediatek.com>
>
> Since MTK_ESW_BIT is a bit number rather than a bitmap, it causes
> MTK_HAS_CAPS to produce incorrect results. This leads to the ETH
> driver not declaring MAC capabilities correctly for the MT7988 ESW.
>
> Fixes: 445eb6448ed3 ("net: ethernet: mtk_eth_soc: add basic support for MT7988 SoC")
> Signed-off-by: Bo-Cun Chen <bc-bocun.chen@mediatek.com>
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
> ---
> drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> index 22a532695fb0..6c92072b4c28 100644
> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> @@ -4748,7 +4748,7 @@ static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
> }
>
> if (mtk_is_netsys_v3_or_greater(mac->hw) &&
> - MTK_HAS_CAPS(mac->hw->soc->caps, MTK_ESW_BIT) &&
> + MTK_HAS_CAPS(mac->hw->soc->caps, MTK_ESW) &&
> id == MTK_GMAC1_ID) {
> mac->phylink_config.mac_capabilities = MAC_ASYM_PAUSE |
> MAC_SYM_PAUSE |
Looks like other usage of MTK_HAS_CAPS is fine, thanks for fixing.
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> --
> 2.49.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: ethernet: mtk_eth_soc: fix typo for declaration MT7988 ESW capability
2025-05-13 4:27 [PATCH net] net: ethernet: mtk_eth_soc: fix typo for declaration MT7988 ESW capability Daniel Golle
2025-05-13 5:21 ` Michal Swiatkowski
@ 2025-05-15 2:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-05-15 2:40 UTC (permalink / raw)
To: Daniel Golle
Cc: nbd, sean.wang, lorenzo, andrew+netdev, davem, edumazet, kuba,
pabeni, matthias.bgg, angelogioacchino.delregno, linux, netdev,
linux-kernel, linux-arm-kernel, linux-mediatek
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 13 May 2025 05:27:30 +0100 you wrote:
> From: Bo-Cun Chen <bc-bocun.chen@mediatek.com>
>
> Since MTK_ESW_BIT is a bit number rather than a bitmap, it causes
> MTK_HAS_CAPS to produce incorrect results. This leads to the ETH
> driver not declaring MAC capabilities correctly for the MT7988 ESW.
>
> Fixes: 445eb6448ed3 ("net: ethernet: mtk_eth_soc: add basic support for MT7988 SoC")
> Signed-off-by: Bo-Cun Chen <bc-bocun.chen@mediatek.com>
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
>
> [...]
Here is the summary with links:
- [net] net: ethernet: mtk_eth_soc: fix typo for declaration MT7988 ESW capability
https://git.kernel.org/netdev/net/c/1bdea6fad6fb
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:[~2025-05-15 2:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-13 4:27 [PATCH net] net: ethernet: mtk_eth_soc: fix typo for declaration MT7988 ESW capability Daniel Golle
2025-05-13 5:21 ` Michal Swiatkowski
2025-05-15 2:40 ` 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).