All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To: Caleb Connolly <caleb.connolly@linaro.org>,
	Caleb Connolly <caleb.connolly@linaro.org>,
	Marek Vasut <marex@denx.de>, Tom Rini <trini@konsulko.com>
Cc: u-boot@lists.denx.de
Subject: Re: [PATCH] eth: asix88179: reset during probe
Date: Tue, 09 Jul 2024 10:39:54 +0200	[thread overview]
Message-ID: <87v81fhsbp.fsf@baylibre.com> (raw)
In-Reply-To: <20240618145759.3296876-2-caleb.connolly@linaro.org>

Hi Caleb,

Thank you for the patch.

On mar., juin 18, 2024 at 16:57, Caleb Connolly <caleb.connolly@linaro.org> wrote:

> In some cases (consistently in my case with an embedded board) the
> ethernet controller will time out on the first init but always succeed
> after reset.
>
> Let's reset the controller during probe so we always start with it in a
> known state, and don't have wait for the first asix_wait_link() to
> time out.
>
> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>

> ---
> I see this behaviour consistently across three Qualcomm platforms that use this
> controller.
> ---
>  drivers/usb/eth/asix88179.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/usb/eth/asix88179.c b/drivers/usb/eth/asix88179.c
> index 7bfd285b3aa4..a0aa5c25e428 100644
> --- a/drivers/usb/eth/asix88179.c
> +++ b/drivers/usb/eth/asix88179.c
> @@ -628,8 +628,14 @@ static int ax88179_eth_probe(struct udevice *dev)
>  
>  	usb_dev = priv->ueth.pusb_dev;
>  	priv->maxpacketsize = usb_dev->epmaxpacketout[AX_ENDPOINT_OUT];
>  
> +	ret = asix_basic_reset(&priv->ueth, priv);
> +	if (ret) {
> +		printf("Failed to reset ethernet device\n");
> +		return ret;
> +	}
> +
>  	/* Get the MAC address */
>  	ret = asix_read_mac(&priv->ueth, pdata->enetaddr);
>  	if (ret)
>  		return ret;
> -- 
> 2.45.0

  parent reply	other threads:[~2024-07-09  8:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-18 14:57 [PATCH] eth: asix88179: reset during probe Caleb Connolly
2024-06-23  4:34 ` Marek Vasut
2024-07-09  8:39 ` Mattijs Korpershoek [this message]
2024-07-09 11:13   ` Marek Vasut
2024-07-09 12:25     ` Mattijs Korpershoek
2024-07-13 17:52       ` Marek Vasut

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=87v81fhsbp.fsf@baylibre.com \
    --to=mkorpershoek@baylibre.com \
    --cc=caleb.connolly@linaro.org \
    --cc=marex@denx.de \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.