eth: asix88179: reset during probe
PATCH 1/1 eth: asix88179: reset during probe
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.
---
I see this behaviour consistently across three Qualcomm platforms that use this controller.
--- drivers/usb/eth/asix88179.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/usb/eth/asix88179.c +6 -0
@@ -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;
Signature · 1 line
2.45.0
Quoted 9 lines · Caleb Connolly
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 <[email protected]>
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
Hi Caleb,
Thank you for the patch.
Quoted 9 lines · Caleb Connolly
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 <[email protected]>
Quoted 28 lines
---
I see this behaviour consistently across three Qualcomm platforms that use this controller.--- drivers/usb/eth/asix88179.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/usb/eth/asix88179.c +6
-0@@ -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;Signature · 1 line
2.45.0
Quoted 1 line · Mattijs Korpershoek
Hi Caleb,
Hi,
Quoted 8 lines
Thank you for the patch.
Quoted 4 lines · Caleb Connolly
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.
Quoted 14 lines
Quoted 5 lines
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 <[email protected]>Reviewed-by Mattijs Korpershoek <[email protected]>Quoted 6 lines
---
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 ?
Hi Marek,
Quoted 21 lines · Marek Vasut
Quoted 1 line · Mattijs Korpershoek
Hi Caleb,
Hi,
Quoted 16 lines
Thank you for the patch.
Quoted 9 lines · Caleb Connolly
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 <[email protected]>Reviewed-by Mattijs Korpershoek <[email protected]>
Quoted 8 lines
Quoted 6 lines
Quoted 6 lines
---
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 <[email protected]> (maintainer:USB)
Tom Rini <[email protected]> (maintainer:THE REST,authored:3/3=100%,added_lines:1/1=100%,removed_lines:2/2=100%) Mattijs Korpershoek <[email protected]> (commit_signer:1/3=33%)
[email protected] (open list)
If you are okay with that, please pick it up.
Thanks!
Mattijs
Marek Vasut
AppliedQuoted 32 lines · Mattijs Korpershoek
Hi Marek,
Quoted 28 lines · Marek Vasut
Quoted 1 line · Mattijs Korpershoek
Hi Caleb,
Hi,
Quoted 22 lines
Thank you for the patch.
Quoted 9 lines · Caleb Connolly
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 <[email protected]>Reviewed-by Mattijs Korpershoek <[email protected]>Quoted 6 lines
---
I see this behaviour consistently across three Qualcomm platforms that use this controller.--- drivers/usb/eth/asix88179.c | 6 ++++++ 1 file changed, 6 insertions(+)
Quoted 3 lines
Quoted 1 line
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 !