eth: asix88179: Reset device during probe with DM_ETH enabled
PATCH 1/1 eth: asix88179: Reset device during probe with DM_ETH enabled
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.
--- drivers/usb/eth/asix88179.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/usb/eth/asix88179.c +4 -0
@@ -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)
Signature · 1 line
2.1.4
PATCH 1/1 eth: asix88179: Reset device during probe with DM_ETH enabled
Quoted 5 lines · Nikolaus Schulz
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 <[email protected]>
I'd like some more ACKs on this or Tested-bys before I apply it as I don't have that hardware. I am fine with the patch itself though.
Quoted 20 lines
--- drivers/usb/eth/asix88179.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/usb/eth/asix88179.c +4
-0@@ -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)
Signature · 2 lines
Best regards, Marek Vasut
PATCH 1/1 eth: asix88179: Reset device during probe with DM_ETH enabled
In reply to Nikolaus SchulzHi,
Quoted 14 lines · Nikolaus Schulz
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 <[email protected]>--- drivers/usb/eth/asix88179.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/usb/eth/asix88179.c +0
-0
drivers/usb/eth/asix88179.c static int ax88179_eth_probe(struct udevice *dev) · line 887
Quoted 10 lines
drivers/usb/eth/asix88179.c +4
-0@@ -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()?
Quoted 3 lines
--
2.1.4
Regards,
Simon
PATCH 1/1 eth: asix88179: Reset device during probe with DM_ETH enabled
Quoted 21 lines · On Mon, 5 Sep 2016 19:04:49 -0600 Simon Glass <[email protected]> wrote:
Hi,
Quoted 17 lines · Nikolaus Schulz
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 <[email protected]>--- drivers/usb/eth/asix88179.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/usb/eth/asix88179.c +0
-0@@ -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 ];
Quoted 9 lines
drivers/usb/eth/asix88179.c static int ax88179_eth_probe(struct udevice *dev) · line 887
Quoted 7 lines
drivers/usb/eth/asix88179.c +4
-0+ 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()?
It happen in ax88179_eth_get_info() in the non DM case, that's why it was overseen when adding DM support.
Alban
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160906/9befde4f/attachment.sig>
PATCH 1/1 eth: asix88179: Reset device during probe with DM_ETH enabled
In reply to Simon GlassQuoted 19 lines · Simon Glass
Quoted 17 lines · Nikolaus Schulz
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 <[email protected]>--- drivers/usb/eth/asix88179.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/usb/eth/asix88179.c +0
-0@@ -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 ];
Quoted 9 lines
drivers/usb/eth/asix88179.c static int ax88179_eth_probe(struct udevice *dev) · line 887
Quoted 7 lines
drivers/usb/eth/asix88179.c +4
-0+ 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
PATCH 1/1 eth: asix88179: Reset device during probe with DM_ETH enabled
Hi,
Quoted 30 lines · Nikolaus Schulz
Quoted 19 lines · Simon Glass
Quoted 17 lines · Nikolaus Schulz
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 <[email protected]>--- drivers/usb/eth/asix88179.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/usb/eth/asix88179.c +0
-0@@ -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 ];Quoted 9 lines
drivers/usb/eth/asix88179.c static int ax88179_eth_probe(struct udevice *dev) · line 887
Quoted 7 lines
drivers/usb/eth/asix88179.c +4
-0+ 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()?
Quoted 3 lines
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.
OK thanks.
Quoted 2 lines
Nikolaus