aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorCaleb Connolly2024-06-18 16:57:57 +0200
committerMarek Vasut2024-07-13 19:51:16 +0200
commit1bd136715a4d3a8e44ccbe693e4c2a9010efb342 (patch)
tree6c985415d7b6c5f6e0e8b37896ad755d4480b729 /drivers
parentb182816c1fb436916661949213c543bf4d42250b (diff)
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. Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/eth/asix88179.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/eth/asix88179.c b/drivers/usb/eth/asix88179.c
index 7bfd285b3aa..a0aa5c25e42 100644
--- a/drivers/usb/eth/asix88179.c
+++ b/drivers/usb/eth/asix88179.c
@@ -629,6 +629,12 @@ 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)