* [PATCH] eth: asix88179: reset during probe
@ 2024-06-18 14:57 Caleb Connolly
2024-06-23 4:34 ` Marek Vasut
2024-07-09 8:39 ` Mattijs Korpershoek
0 siblings, 2 replies; 6+ messages in thread
From: Caleb Connolly @ 2024-06-18 14:57 UTC (permalink / raw)
To: Caleb Connolly, Marek Vasut, Mattijs Korpershoek, Tom Rini; +Cc: u-boot
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>
---
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] eth: asix88179: reset during probe
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
1 sibling, 0 replies; 6+ messages in thread
From: Marek Vasut @ 2024-06-23 4:34 UTC (permalink / raw)
To: Caleb Connolly, Mattijs Korpershoek, Tom Rini; +Cc: u-boot
On 6/18/24 4:57 PM, Caleb Connolly 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: Marek Vasut <marex@denx.de>
Please let me know if you need me to pick this up via usb tree, even if
this is kind-of a -net patch .
Thanks
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] eth: asix88179: reset during probe
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
2024-07-09 11:13 ` Marek Vasut
1 sibling, 1 reply; 6+ messages in thread
From: Mattijs Korpershoek @ 2024-07-09 8:39 UTC (permalink / raw)
To: Caleb Connolly, Caleb Connolly, Marek Vasut, Tom Rini; +Cc: u-boot
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] eth: asix88179: reset during probe
2024-07-09 8:39 ` Mattijs Korpershoek
@ 2024-07-09 11:13 ` Marek Vasut
2024-07-09 12:25 ` Mattijs Korpershoek
0 siblings, 1 reply; 6+ messages in thread
From: Marek Vasut @ 2024-07-09 11:13 UTC (permalink / raw)
To: Mattijs Korpershoek, Caleb Connolly, Tom Rini; +Cc: u-boot
On 7/9/24 10:39 AM, Mattijs Korpershoek wrote:
> Hi Caleb,
Hi,
> 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(+)
Do you want to pick it via usb-gadget tree or shall I pick it via usb tree ?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] eth: asix88179: reset during probe
2024-07-09 11:13 ` Marek Vasut
@ 2024-07-09 12:25 ` Mattijs Korpershoek
2024-07-13 17:52 ` Marek Vasut
0 siblings, 1 reply; 6+ messages in thread
From: Mattijs Korpershoek @ 2024-07-09 12:25 UTC (permalink / raw)
To: Marek Vasut, Caleb Connolly, Tom Rini; +Cc: u-boot
Hi Marek,
On mar., juil. 09, 2024 at 13:13, Marek Vasut <marex@denx.de> wrote:
> On 7/9/24 10:39 AM, Mattijs Korpershoek wrote:
>> Hi Caleb,
>
> Hi,
>
>> 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(+)
>
> Do you want to pick it via usb-gadget tree or shall I pick it via usb tree ?
According to get_maintainer.pl, it should be you :)
./scripts/get_maintainer.pl -- drivers/usb/eth/asix88179.c
Marek Vasut <marex@denx.de> (maintainer:USB)
Tom Rini <trini@konsulko.com> (maintainer:THE REST,authored:3/3=100%,added_lines:1/1=100%,removed_lines:2/2=100%)
Mattijs Korpershoek <mkorpershoek@baylibre.com> (commit_signer:1/3=33%)
u-boot@lists.denx.de (open list)
If you are okay with that, please pick it up.
Thanks!
Mattijs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] eth: asix88179: reset during probe
2024-07-09 12:25 ` Mattijs Korpershoek
@ 2024-07-13 17:52 ` Marek Vasut
0 siblings, 0 replies; 6+ messages in thread
From: Marek Vasut @ 2024-07-13 17:52 UTC (permalink / raw)
To: Mattijs Korpershoek, Caleb Connolly, Tom Rini; +Cc: u-boot
On 7/9/24 2:25 PM, Mattijs Korpershoek wrote:
> Hi Marek,
>
> On mar., juil. 09, 2024 at 13:13, Marek Vasut <marex@denx.de> wrote:
>
>> On 7/9/24 10:39 AM, Mattijs Korpershoek wrote:
>>> Hi Caleb,
>>
>> Hi,
>>
>>> 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(+)
>>
>> Do you want to pick it via usb-gadget tree or shall I pick it via usb tree ?
>
> According to get_maintainer.pl, it should be you :)
Applied to usb/master, thanks !
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-07-13 17:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2024-07-09 11:13 ` Marek Vasut
2024-07-09 12:25 ` Mattijs Korpershoek
2024-07-13 17:52 ` Marek Vasut
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.