diff mbox series

bcm53xx: disable CONFIG_SWCONFIG_B53_PHY_DRIVER

Message ID 20210930144000.23300-1-zajec5@gmail.com
State Rejected
Delegated to: Rafał Miłecki
Headers show
Series bcm53xx: disable CONFIG_SWCONFIG_B53_PHY_DRIVER | expand

Commit Message

Rafał Miłecki Sept. 30, 2021, 2:40 p.m. UTC
From: Rafał Miłecki <rafal@milecki.pl>

OpenWrt downstream b53 MDIO driver is bugged as it:
1. Registers as PHY device driver (while switch is an MDIO device)
2. Provides of_match_table

That results in bypassing kernel bus matching checks and probing b53 for
MDIO device treated as PHY device. It doesn't work as PHY structure
isn't initialized and phy_probe() causes a softlock.

This happened to work with kernel 5.4 but some internal change revealed
that broken design.

For bcm53xx this shouldn't be critical as only Linksys EA9500 extra
switch is connected using MDIO.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
 target/linux/bcm53xx/config-5.10 | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Rafał Miłecki Sept. 30, 2021, 2:44 p.m. UTC | #1
Cc Tobias, author of the 8f9cd1af0f9c ("swconfig: fix Broadcom b53 support").

Another option would be to revert above commit (.of_match_table part anyway).

On 30.09.2021 16:40, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> OpenWrt downstream b53 MDIO driver is bugged as it:
> 1. Registers as PHY device driver (while switch is an MDIO device)
> 2. Provides of_match_table
> 
> That results in bypassing kernel bus matching checks and probing b53 for
> MDIO device treated as PHY device. It doesn't work as PHY structure
> isn't initialized and phy_probe() causes a softlock.
> 
> This happened to work with kernel 5.4 but some internal change revealed
> that broken design.
> 
> For bcm53xx this shouldn't be critical as only Linksys EA9500 extra
> switch is connected using MDIO.
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
>   target/linux/bcm53xx/config-5.10 | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/target/linux/bcm53xx/config-5.10 b/target/linux/bcm53xx/config-5.10
> index 9d98e812bd..e495419aad 100644
> --- a/target/linux/bcm53xx/config-5.10
> +++ b/target/linux/bcm53xx/config-5.10
> @@ -268,8 +268,7 @@ CONFIG_SPI_MEM=y
>   CONFIG_SRCU=y
>   CONFIG_SWCONFIG=y
>   CONFIG_SWCONFIG_B53=y
> -CONFIG_SWCONFIG_B53_PHY_DRIVER=y
> -CONFIG_SWCONFIG_B53_PHY_FIXUP=y
> +# CONFIG_SWCONFIG_B53_PHY_DRIVER is not set
>   CONFIG_SWCONFIG_B53_SRAB_DRIVER=y
>   CONFIG_SWPHY=y
>   CONFIG_SWP_EMULATE=y
>
Rafał Miłecki Oct. 7, 2021, 10:08 a.m. UTC | #2
Deprecated by the
Revert "swconfig: fix Broadcom b53 support"
diff mbox series

Patch

diff --git a/target/linux/bcm53xx/config-5.10 b/target/linux/bcm53xx/config-5.10
index 9d98e812bd..e495419aad 100644
--- a/target/linux/bcm53xx/config-5.10
+++ b/target/linux/bcm53xx/config-5.10
@@ -268,8 +268,7 @@  CONFIG_SPI_MEM=y
 CONFIG_SRCU=y
 CONFIG_SWCONFIG=y
 CONFIG_SWCONFIG_B53=y
-CONFIG_SWCONFIG_B53_PHY_DRIVER=y
-CONFIG_SWCONFIG_B53_PHY_FIXUP=y
+# CONFIG_SWCONFIG_B53_PHY_DRIVER is not set
 CONFIG_SWCONFIG_B53_SRAB_DRIVER=y
 CONFIG_SWPHY=y
 CONFIG_SWP_EMULATE=y