Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1740776
| From | Andrew Lunn <andrew@lunn.ch> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v6 11/11] of: mdio: Prevent of_mdiobus_register from scanning mdio-mux nodes |
| Date | 2017-09-27 16:20 +0200 |
| Message-ID | <uullU-4d4-17@gated-at.bofh.it> (permalink) |
| References | <uuf6N-7P3-3@gated-at.bofh.it> <uuf6Q-7P3-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Sep 27, 2017 at 09:34:14AM +0200, Corentin Labbe wrote:
> Each child node of an MDIO node is scanned as a PHY when calling
> of_mdiobus_register() givint the following result:
> [ 18.175379] mdio_bus stmmac-0: /soc/ethernet@1c30000/mdio/mdio-mux has invalid PHY address
> [ 18.175408] mdio_bus stmmac-0: scan phy mdio-mux at address 0
> [ 18.175450] mdio_bus stmmac-0: scan phy mdio-mux at address 1
> [...]
> [ 18.176420] mdio_bus stmmac-0: scan phy mdio-mux at address 30
> [ 18.176452] mdio_bus stmmac-0: scan phy mdio-mux at address 31
>
> Since mdio-mux nodes are not PHY, this patch a way to to not scan
> them.
Hi Corentin
I still don't like this, but ...
>
> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
> ---
> drivers/of/of_mdio.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
> index d94dd8b77abd..d90ddb0d90f2 100644
> --- a/drivers/of/of_mdio.c
> +++ b/drivers/of/of_mdio.c
> @@ -190,6 +190,10 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
> struct device_node *child;
> bool scanphys = false;
> int addr, rc;
> + static const struct of_device_id do_not_scan[] = {
> + { .compatible = "mdio-mux" },
> + {}
> + };
Please rename this to some less generic. What i don't want is other
compatible strings added here. We want to make the exception for
muxes, but nothing else. So something like compatible_muxes?
Andrew
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v6 00/11] net: stmmac: dwmac-sun8i: Handle integrated PHY Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-09-27 09:40 +0200
[PATCH v6 02/11] arm: dts: sunxi: Restore EMAC changes Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-09-27 09:40 +0200
[PATCH v6 09/11] net: stmmac: dwmac-sun8i: choose internal PHY via phy-is-integrated Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-09-27 09:40 +0200
[PATCH v6 03/11] arm64: dts: allwinner: Restore EMAC changes Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-09-27 09:40 +0200
[PATCH v6 10/11] net: stmmac: dwmac-sun8i: Handle integrated/external MDIOs Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-09-27 09:40 +0200
[PATCH v6 11/11] of: mdio: Prevent of_mdiobus_register from scanning mdio-mux nodes Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-09-27 09:40 +0200
Re: [PATCH v6 11/11] of: mdio: Prevent of_mdiobus_register from scanning mdio-mux nodes Andrew Lunn <andrew@lunn.ch> - 2017-09-27 16:20 +0200
Re: [PATCH v6 11/11] of: mdio: Prevent of_mdiobus_register from scanning mdio-mux nodes Florian Fainelli <f.fainelli@gmail.com> - 2017-09-28 07:00 +0200
[PATCH v6 07/11] arm64: dts: allwinner: add snps,dwmac-mdio compatible to emac/mdio Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-09-27 09:40 +0200
[PATCH v6 04/11] net: stmmac: sun8i: Restore the compatibles Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-09-27 09:40 +0200
[PATCH v6 05/11] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-09-27 09:40 +0200
Re: [PATCH v6 05/11] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-09-27 12:20 +0200
Re: [PATCH v6 05/11] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY Andrew Lunn <andrew@lunn.ch> - 2017-09-27 16:10 +0200
Re: [PATCH v6 05/11] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-09-28 09:40 +0200
Re: [PATCH v6 05/11] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY Florian Fainelli <f.fainelli@gmail.com> - 2017-09-28 07:00 +0200
Re: [PATCH v6 05/11] dt-bindings: net: dwmac-sun8i: update documentation about integrated PHY Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-09-28 09:10 +0200
[PATCH v6 08/11] net: stmmac: snps,dwmac-mdio MDIOs are automatically registered Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-09-27 09:40 +0200
[PATCH v6 01/11] dt-bindings: net: Restore sun8i dwmac binding Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-09-27 09:50 +0200
csiph-web