mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v1] net: dsa: wait until PHY aneg is done
Date: Fri, 29 Apr 2022 09:17:38 +0200	[thread overview]
Message-ID: <20220429071738.GS4012@pengutronix.de> (raw)
In-Reply-To: <20220427073340.3125330-1-o.rempel@pengutronix.de>

On Wed, Apr 27, 2022 at 09:33:40AM +0200, Oleksij Rempel wrote:
> Some PHYs need a bit longer to complete auto negotiation. So, wait long
> enough until this process is done.
> 
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
>  drivers/net/dsa.c | 4 ++++
>  1 file changed, 4 insertions(+)

Applied, thanks

Sascha


> 
> diff --git a/drivers/net/dsa.c b/drivers/net/dsa.c
> index f2420d306f..d9e629cefc 100644
> --- a/drivers/net/dsa.c
> +++ b/drivers/net/dsa.c
> @@ -111,6 +111,10 @@ static int dsa_port_start(struct eth_device *edev)
>  
>  	dsa_port_set_ethaddr(edev);
>  
> +	ret = phy_wait_aneg_done(dp->edev.phydev);
> +	if (ret)
> +		return ret;
> +
>  	if (ops->port_enable) {
>  		ret = ops->port_enable(dp, dp->index, dp->edev.phydev);
>  		if (ret)
> -- 
> 2.30.2
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
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:[~2022-04-29  7:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-27  7:33 Oleksij Rempel
2022-04-29  7:17 ` Sascha Hauer [this message]

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=20220429071738.GS4012@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=o.rempel@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