From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikolaus Schulz Date: Tue, 6 Sep 2016 11:33:35 +0200 Subject: [U-Boot] [PATCH] eth: asix88179: Reset device during probe with DM_ETH enabled In-Reply-To: References: <1472565703-9470-1-git-send-email-nikolaus.schulz@avionic-design.de> Message-ID: <20160906093335.GA5717@avionic-0071.adnet.avionic-design.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Sep 05, 2016 at 07:04:49PM -0600, Simon Glass wrote: > On 30 August 2016 at 08:01, Nikolaus Schulz > wrote: > > With the ethernet driver model enabled, reset the device before reading > > the MAC address, just like it's done for the non-device-model code path. > > This avoids a timeout when the interface is first used. > > > > Signed-off-by: Nikolaus Schulz > > --- > > drivers/usb/eth/asix88179.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/drivers/usb/eth/asix88179.c b/drivers/usb/eth/asix88179.c > > index 7548269..0725940 100644 > > --- a/drivers/usb/eth/asix88179.c > > +++ b/drivers/usb/eth/asix88179.c > > @@ -878,6 +878,10 @@ 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) > > + return ret; > > + > > /* Get the MAC address */ > > ret = asix_read_mac(&priv->ueth, pdata->enetaddr); > > if (ret) > > How come this doesn't happen in ax88179_eth_start()? In fact I first had put it there, but that was basically killing the ethernet. And having it in the probe function matches the non-DM code path, which has it in ax88179_eth_get_info. Nikolaus