mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
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>
This commit is contained in:
committed by
Marek Vasut
parent
b182816c1f
commit
1bd136715a
@@ -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)
|
||||
|
Reference in New Issue
Block a user