mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Sascha Hauer <sha@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH master] net: designware: eqos: fix MDIO regression for STM32MP1 boards
Date: Fri, 5 Nov 2021 08:51:01 +0100	[thread overview]
Message-ID: <85d72153-f4fd-2893-3bb3-393005239177@pengutronix.de> (raw)
In-Reply-To: <1df357da-eff8-ea6e-59be-e63d694f8286@pengutronix.de>

Hello Sascha,

On 04.10.21 13:39, Ahmad Fatoum wrote:
> Hello Sascha,
> 
> On 04.10.21 13:26, Sascha Hauer wrote:
>> On Tue, Aug 31, 2021 at 05:32:14PM +0200, Ahmad Fatoum wrote:
>>> The STM32MP1 boards call their mdio subnode mdio0, which is now skipped
>>> since ed8c7bdf8592 ("net: designware: eqos: set mdio bus device node").
>>>
>>> Fix networking for them by only falling back to the mdio node name when a
>>> child node with the correct compatible could not be found.
>>>
>>> Fixes: ed8c7bdf8592 ("net: designware: eqos: set mdio bus device node")
>>> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
>>> ---
>>>  drivers/net/designware_eqos.c | 6 +++++-
>>>  1 file changed, 5 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/net/designware_eqos.c b/drivers/net/designware_eqos.c
>>> index f83ec127143c..5eee844e289a 100644
>>> --- a/drivers/net/designware_eqos.c
>>> +++ b/drivers/net/designware_eqos.c
>>> @@ -824,6 +824,7 @@ static void eqos_probe_dt(struct device_d *dev, struct eqos *eqos)
>>>  
>>>  int eqos_probe(struct device_d *dev, const struct eqos_ops *ops, void *priv)
>>>  {
>>> +	struct device_node *np = dev->device_node;
>>>  	struct mii_bus *miibus;
>>>  	struct resource *iores;
>>>  	struct eqos *eqos;
>>> @@ -862,7 +863,10 @@ int eqos_probe(struct device_d *dev, const struct eqos_ops *ops, void *priv)
>>>  	miibus->read = eqos_mdio_read;
>>>  	miibus->write = eqos_mdio_write;
>>>  	miibus->priv = eqos;
>>> -	miibus->dev.device_node = of_get_child_by_name(dev->device_node, "mdio");
>>> +
>>> +	miibus->dev.device_node = of_get_compatible_child(np, "snps,dwmac-mdio");
>>> +	if (!miibus->dev.device_node)
>>> +		miibus->dev.device_node = of_get_child_by_name(np, "mdio");
>>
>> Do we need this fallback? I think I introduced ed8c7bdf8592 for the
>> rk3568, which also should work without the fallback.
> 
> Linux driver uses "mdio" node name for snps,dwc-qos-ethernet-4.10 and looks
> at compatible otherwise. That's why I chose to keep support for both.

STM32MP1 support in master is broken. Can this be cherry picked?

Thanks,
Ahmad

> 
>>
>> Sascha
>>
> 
> 


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


  reply	other threads:[~2021-11-05  7:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-31 15:32 Ahmad Fatoum
2021-09-02  7:00 ` Rouven Czerwinski
2021-10-04 11:26 ` Sascha Hauer
2021-10-04 11:39   ` Ahmad Fatoum
2021-11-05  7:51     ` Ahmad Fatoum [this message]
2021-11-05  9:20       ` Sascha Hauer

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=85d72153-f4fd-2893-3bb3-393005239177@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=sha@pengutronix.de \
    /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