net: bgmac: fix BCM5358 support by setting correct flags
Subsystems (3)
PATCH 1/1 net: bgmac: fix BCM5358 support by setting correct flags
From: Rafał Miłecki <[email protected]>
Code blocks handling BCMA_CHIP_ID_BCM5357 and BCMA_CHIP_ID_BCM53572 were incorrectly unified. Chip package values are not unique and cannot be checked independently. They are meaningful only in a context of a given chip.
Packages BCM5358 and BCM47188 share the same value but then belong to different chips. Code unification resulted in treating BCM5358 as BCM47188 and broke its initialization.
--- drivers/net/ethernet/broadcom/bgmac-bcma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/broadcom/bgmac-bcma.c +3 -3
@@ -240,12 +240,12 @@ static int bgmac_probe(struct bcma_device *core) bgmac->feature_flags |=BGMAC_FEAT_CLKCTLST ; bgmac->feature_flags |=BGMAC_FEAT_FLW_CTRL1 ; bgmac->feature_flags |=BGMAC_FEAT_SW_TYPE_PHY ; -if (ci->pkg ==BCMA_PKG_ID_BCM47188 || - ci->pkg ==BCMA_PKG_ID_BCM47186 ) { +if ((ci->id ==BCMA_CHIP_ID_BCM5357 && ci->pkg ==BCMA_PKG_ID_BCM47186 ) || + (ci->id ==BCMA_CHIP_ID_BCM53572 && ci->pkg ==BCMA_PKG_ID_BCM47188 )) { bgmac->feature_flags |=BGMAC_FEAT_SW_TYPE_RGMII ; bgmac->feature_flags |=BGMAC_FEAT_IOST_ATTACHED ; } -if (ci->pkg ==BCMA_PKG_ID_BCM5358 ) +if (ci->id ==BCMA_CHIP_ID_BCM5357 && ci->pkg ==BCMA_PKG_ID_BCM5358 ) bgmac->feature_flags |=BGMAC_FEAT_SW_TYPE_EPHYRMII ;break ;case BCMA_CHIP_ID_BCM53573 :
Signature · 7 lines
2.34.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 7 lines · Rafał Miłecki
From: Rafał Miłecki <[email protected]>
Code blocks handling
BCMA_CHIP_ID_BCM5357andBCMA_CHIP_ID_BCM53572were incorrectly unified. Chip package values are not unique and cannot be checked independently. They are meaningful only in a context of a given chip.
Quoted 8 lines
Packages BCM5358 and BCM47188 share the same value but then belong to different chips. Code unification resulted in treating BCM5358 as BCM47188 and broke its initialization.
Fixes cb1b0f90acfe ("net: ethernet: bgmac: unify code of the same family")Cc Jon Mason <[email protected]>Signed-off-by Rafał Miłecki <[email protected]>
Signature · 1 line
Florian
This patch was applied to netdev/net.git (master) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (master)
by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Wed, 8 Feb 2023 10:16:37 +0100 you wrote:
From: Rafał Miłecki <[email protected]>
Code blocks handling
BCMA_CHIP_ID_BCM5357andBCMA_CHIP_ID_BCM53572were incorrectly unified. Chip package values are not unique and cannot be checked independently. They are meaningful only in a context of a given chip.[...]
Here is the summary with links:
- [net] net: bgmac: fix BCM5358 support by setting correct flags
https://git.kernel.org/netdev/net/c/d61615c366a4
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html