From: Guenter Roeck <linux@roeck-us.net>
To: Sean Anderson <sean.anderson@seco.com>
Cc: netdev@vger.kernel.org,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Claudiu Beznea <claudiu.beznea@microchip.com>,
Jakub Kicinski <kuba@kernel.org>,
"David S . Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org
Subject: Re: [net-next PATCH 2/2] net: macb: Use mdio child node for MDIO bus if it exists
Date: Tue, 26 Oct 2021 09:49:47 -0700 [thread overview]
Message-ID: <20211026164947.GA3550285@roeck-us.net> (raw)
In-Reply-To: <20211022163548.3380625-2-sean.anderson@seco.com>
Hi,
while bisecting I noticed the following.
On Fri, Oct 22, 2021 at 12:35:48PM -0400, Sean Anderson wrote:
> This allows explicitly specifying which children are present on the mdio
> bus. Additionally, it allows for non-phy MDIO devices on the bus.
>
> Signed-off-by: Sean Anderson <sean.anderson@seco.com>
> ---
>
> drivers/net/ethernet/cadence/macb_main.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index 029dea2873e3..30a65cac9e87 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -898,6 +898,17 @@ static int macb_mdiobus_register(struct macb *bp)
> {
> struct device_node *child, *np = bp->pdev->dev.of_node;
>
> + /* If we have a child named mdio, probe it instead of looking for PHYs
> + * directly under the MAC node
> + */
> + child = of_get_child_by_name(np, "mdio");
> + if (np) {
s/np/child/
to avoid network interface failures with messages like
[ 12.764530] macb 10090000.ethernet eth0: Could not attach PHY (-19)
I'll send a patch in a minute to fix this up, after bisect is complete
and after testing, to make sure that there is no additional problem.
Guenter
> + int ret = of_mdiobus_register(bp->mii_bus, child);
> +
> + of_node_put(child);
> + return ret;
> + }
> +
> if (of_phy_is_fixed_link(np))
> return mdiobus_register(bp->mii_bus);
>
> --
> 2.25.1
>
next prev parent reply other threads:[~2021-10-26 16:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-22 16:35 [net-next PATCH 1/2] dt-bindings: net: macb: Add mdio bus child node Sean Anderson
2021-10-22 16:35 ` [net-next PATCH 2/2] net: macb: Use mdio child node for MDIO bus if it exists Sean Anderson
2021-10-22 19:43 ` Andrew Lunn
2021-10-26 16:49 ` Guenter Roeck [this message]
2021-10-22 19:37 ` [net-next PATCH 1/2] dt-bindings: net: macb: Add mdio bus child node Andrew Lunn
2021-10-22 19:39 ` Andrew Lunn
2021-10-24 12:50 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211026164947.GA3550285@roeck-us.net \
--to=linux@roeck-us.net \
--cc=claudiu.beznea@microchip.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=sean.anderson@seco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox