CONFIG_DM_ETH USB_ETHER_ASIX Reception Issue on Tegra
Hi there
Trying to update one of my patch sets of late made me notice that the ASIX USB to Ethernet stuff if CONFIG_DM_ETH is enabled seems to be rather broken. I already sent two patches to even get that far but even with that reception still does not seem to work (see below). I tested by enabling CONFIG_DM_ETH on Colibri T20/T30 as well as Apalis T30 with CONFIG_USB_HOST_ETHER and CONFIG_USB_ETHER_ASIX enabled and a LevelOne USB-0301 ASIX AX88772 dongle. Has anybody actually tried that lately?
Colibri T20 # usb start
starting USB...
USB0: USB EHCI 1.00 USB1: USB EHCI 1.00 USB2: USB EHCI 1.00
scanning bus 1 for devices... 1 USB Device(s) found scanning bus 2 for devices...
Warning: asix_eth using MAC address from ROM
2 USB Device(s) found
scanning bus 0 for devices... 1 USB Device(s) found Colibri T20 # tftpboot $loadaddr uImage-colibri_t20 Using asix_eth device
TFTP from server 192.168.10.1; our IP address is 192.168.10.4 Filename 'uImage-colibri_t20'.
Load address: 0x1000000
Loading: EHCI timed out on TD - token=0x8008d80
Rx: failed to receive: -5
T EHCI timed out on TD - token=0x8008d80
Rx: failed to receive: -5
T EHCI timed out on TD - token=0x8008d80
Rx: failed to receive: -5
T EHCI timed out on TD - token=0x8008d80
Rx: failed to receive: -5
T EHCI timed out on TD - token=0x8008d80
Rx: failed to receive: -5
T EHCI timed out on TD - token=0x8008d80
Rx: failed to receive: -5
T EHCI timed out on TD - token=0x8008d80
Rx: failed to receive: -5
T EHCI timed out on TD - token=0x8008d80
Rx: failed to receive: -5
T EHCI timed out on TD - token=0x8008d80
Rx: failed to receive: -5
T EHCI timed out on TD - token=0x8008d80
Rx: failed to receive: -5
T EHCI timed out on TD - token=0x8008d80
Rx: failed to receive: -5
Retry count exceeded; starting again
Colibri T20 #
Quoted 15 lines · Marcel Ziswiler
Hi there
Trying to update one of my patch sets of late made me notice that the ASIX USB to Ethernet stuff if
CONFIG_DM_ETHis enabled seems to be rather broken. I already sent two patches to even get that far but even with that reception still does not seem to work (see below). I tested by enablingCONFIG_DM_ETHon Colibri T20/T30 as well as Apalis T30 withCONFIG_USB_HOST_ETHERandCONFIG_USB_ETHER_ASIXenabled and a LevelOne USB-0301 ASIX AX88772 dongle. Has anybody actually tried that lately?Colibri T20 # usb start
starting USB...USB0: USB EHCI 1.00 USB1: USB EHCI 1.00 USB2: USB EHCI 1.00
Quoted 11 lines
scanning bus 1 for devices... 1 USB Device(s) found scanning bus 2 for devices...
Warning:asix_ethusing MAC address from ROM
2 USB Device(s) found
scanning bus 0 for devices... 1 USB Device(s) found Colibri T20 # tftpboot $loadaddr uImage-colibri_t20 Usingasix_ethdevice
TFTP from server 192.168.10.1; our IP address is 192.168.10.4 Filename 'uImage-colibri_t20'.
Load address:0x1000000
Loading: EHCI timed out on TD - token=0x8008d80
This stuff looks more like a breakage in the EHCI controller, no ?
Best regards,
Marek Vasut
Quoted 1 line · Marek Vasut
This stuff looks more like a breakage in the EHCI controller, no ?
Well, but that same EHCI controller works just fine as long as CONFIG_DM_ETH is not defined.
Quoted 5 lines · Marcel Ziswiler
Quoted 1 line · Marek Vasut
This stuff looks more like a breakage in the EHCI controller, no ?
Well, but that same EHCI controller works just fine as long as
CONFIG_DM_ETHis not defined.
This trims down the scope quite considerably. Does the controller with with CONFIG_DM_ETH enabled if you plug in a USB stick instead of an ethernet ?
Best regards,
Marek Vasut
Quoted 4 lines · Marek Vasut
This trims down the scope quite considerably. Does the controller with with
CONFIG_DM_ETHenabled if you plug in a USB stick instead of an ethernet ?
Yes, USB sticks work just fine. It's just the USB Ethernet stuff which does no longer work once CONFIG_DM_ETH is enabled.
Hi Marcel,
Quoted 9 lines · Marcel Ziswiler
Quoted 4 lines · Marek Vasut
This trims down the scope quite considerably. Does the controller with with
CONFIG_DM_ETHenabled if you plug in a USB stick instead of an ethernet ?Yes, USB sticks work just fine. It's just the USB Ethernet stuff which does no longer work once
CONFIG_DM_ETHis enabled.
The memalign() function arguments are around the wrong way! Definitely worth seeing if that fixes it. For some reason rpi and minnowboard seem to work even with this error.
Regards,
Simon
Quoted 1 line · Simon Glass
The
memalign()function arguments are around the wrong way!
I assume you meant that one:
drivers/usb/eth/usb_ether.c +0 -0
@@ -73,7 +73,7 @@ int usb_ether_register(struct udevice *dev, struct
ueth_data *ueth, int rxsize)
}
ueth->rxsize = rxsize;
- ueth->rxbuf = memalign(rxsize, ARCH_DMA_MINALIGN);
+ ueth->rxbuf = memalign(ARCH_DMA_MINALIGN, rxsize);
if (!ueth->rxbuf)
return -ENOMEM;Quoted 3 lines
Definitely
worth seeing if that fixes it. For some reason rpi and minnowboard seem to work even with this error.
Unfortunately still the same:
U-Boot SPL 2015.10-rc1-00188-gfac971b-dirty (Aug 07 2015 - 06:34:28)
U-Boot 2015.10-rc1-00188-gfac971b-dirty (Aug 07 2015 - 06:34:28 +0000)
TEGRA20
Model: Toradex Colibri T20 Board: Toradex Colibri T20 DRAM: 512 MiB NAND: 1024 MiB MMC: Tegra SD/MMC: 0
*** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial Net: Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot: 0
Colibri T20 # usb start
starting USB...
USB0: USB EHCI 1.00 USB1: USB EHCI 1.00 USB2: USB EHCI 1.00
scanning bus 1 for devices... 1 USB Device(s) found scanning bus 2 for devices...
Warning: asix_eth using MAC address from ROM 2 USB Device(s) found
scanning bus 0 for devices... 1 USB Device(s) found Colibri T20 # dhcp
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
EHCI timed out on TD - token=0x8008d80
Rx: failed to receive: -5
BOOTP broadcast 4
BOOTP broadcast 5
EHCI timed out on TD - token=0x88008d80
Rx: failed to receive: -5
BOOTP broadcast 6
BOOTP broadcast 7
EHCI timed out on TD - token=0x8008d80
Rx: failed to receive: -5
BOOTP broadcast 8
BOOTP broadcast 9
EHCI timed out on TD - token=0x88008d80
Rx: failed to receive: -5
Retry time exceeded; starting again
Colibri T20 #
Hi Marcel,
Quoted 74 lines · Marcel Ziswiler
Quoted 1 line · Simon Glass
The
memalign()function arguments are around the wrong way!I assume you meant that one:
drivers/usb/eth/usb_ether.c +1
-1@@ -73,7 +73,7 @@ int usb_ether_register(struct udevice *dev, struct ueth_data *ueth, int rxsize) } ueth->rxsize = rxsize; - ueth->rxbuf =memalign (rxsize,ARCH_DMA_MINALIGN ); + ueth->rxbuf =memalign (ARCH_DMA_MINALIGN , rxsize);if (!ueth->rxbuf)return -ENOMEM ;Quoted 4 lines
Definitely
worth seeing if that fixes it. For some reason rpi and minnowboard seem to work even with this error.Unfortunately still the same:
U-Boot SPL 2015.10-rc1-00188-gfac971b-dirty (Aug 07 2015 - 06:34:28)
U-Boot 2015.10-rc1-00188-gfac971b-dirty (Aug 07 2015 - 06:34:28 +0000)
TEGRA20
Model: Toradex Colibri T20 Board: Toradex Colibri T20 DRAM: 512 MiB NAND: 1024 MiB MMC: Tegra SD/MMC: 0*** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial Net: Net Initialization SkippedNo ethernet found.
Hit any key to stop autoboot: 0
Colibri T20 # usb start
starting USB...USB0: USB EHCI 1.00 USB1: USB EHCI 1.00 USB2: USB EHCI 1.00scanning bus 1 for devices... 1 USB Device(s) found scanning bus 2 for devices...
Warning:asix_ethusing MAC address from ROM 2 USB Device(s) found
scanning bus 0 for devices... 1 USB Device(s) found Colibri T20 # dhcp
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
EHCI timed out on TD - token=0x8008d80
Rx: failed to receive: -5
BOOTP broadcast 4
BOOTP broadcast 5
EHCI timed out on TD - token=0x88008d80
Rx: failed to receive: -5
BOOTP broadcast 6
BOOTP broadcast 7
EHCI timed out on TD - token=0x8008d80
Rx: failed to receive: -5
BOOTP broadcast 8
BOOTP broadcast 9
EHCI timed out on TD - token=0x88008d80
Rx: failed to receive: -5
Quoted 2 lines
Retry time exceeded; starting again
Colibri T20 #
One point to make is that I have seen this on and off for a while. When I tested the driver model EHCI support I found this bug. But then when I turned off driver model it was still there. So I decided it was pre-existing. Also I'm not sure that this error is handled correctly. The code that times out does not retry properly.
Marek do
Regards,
Simon
Quoted 83 lines · Simon Glass
Hi Marcel,
Quoted 77 lines · Marcel Ziswiler
Quoted 1 line · Simon Glass
The
memalign()function arguments are around the wrong way!I assume you meant that one:
drivers/usb/eth/usb_ether.c +1
-1@@ -73,7 +73,7 @@ int usb_ether_register(struct udevice *dev, struct ueth_data *ueth, int rxsize) } ueth->rxsize = rxsize; - ueth->rxbuf =memalign (rxsize,ARCH_DMA_MINALIGN ); + ueth->rxbuf =memalign (ARCH_DMA_MINALIGN , rxsize);if (!ueth->rxbuf) return -ENOMEM;Quoted 4 lines
Definitely
worth seeing if that fixes it. For some reason rpi and minnowboard seem to work even with this error.Unfortunately still the same:
U-Boot SPL 2015.10-rc1-00188-gfac971b-dirty (Aug 07 2015 - 06:34:28)
U-Boot 2015.10-rc1-00188-gfac971b-dirty (Aug 07 2015 - 06:34:28 +0000)
TEGRA20
Model: Toradex Colibri T20 Board: Toradex Colibri T20 DRAM: 512 MiB NAND: 1024 MiB MMC: Tegra SD/MMC: 0*** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial Net: Net Initialization SkippedNo ethernet found.
Hit any key to stop autoboot: 0
Colibri T20 # usb start
starting USB...USB0: USB EHCI 1.00 USB1: USB EHCI 1.00 USB2: USB EHCI 1.00scanning bus 1 for devices... 1 USB Device(s) found scanning bus 2 for devices...
Warning:asix_ethusing MAC address from ROM 2 USB Device(s) found
scanning bus 0 for devices... 1 USB Device(s) found Colibri T20 # dhcp
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
EHCI timed out on TD - token=0x8008d80
Rx: failed to receive: -5
BOOTP broadcast 4
BOOTP broadcast 5
EHCI timed out on TD - token=0x88008d80
Rx: failed to receive: -5
BOOTP broadcast 6
BOOTP broadcast 7
EHCI timed out on TD - token=0x8008d80
Rx: failed to receive: -5
BOOTP broadcast 8
BOOTP broadcast 9
EHCI timed out on TD - token=0x88008d80
Rx: failed to receive: -5Quoted 2 lines
Retry time exceeded; starting again
Colibri T20 #
Quoted 7 lines
One point to make is that I have seen this on and off for a while. When I tested the driver model EHCI support I found this bug. But then when I turned off driver model it was still there. So I decided it was pre-existing. Also I'm not sure that this error is handled correctly. The code that times out does not retry properly.
Marek do
I think there's a bit of this sentence missing. But the fix I pushed was for enumeration, not for this.
Quoted 2 lines
Regards,
Simon
Hi Marcel,
Quoted 48 lines · Marcel Ziswiler
Hi there
Trying to update one of my patch sets of late made me notice that the ASIX USB to Ethernet stuff if
CONFIG_DM_ETHis enabled seems to be rather broken. I already sent two patches to even get that far but even with that reception still does not seem to work (see below). I tested by enablingCONFIG_DM_ETHon Colibri T20/T30 as well as Apalis T30 withCONFIG_USB_HOST_ETHERandCONFIG_USB_ETHER_ASIXenabled and a LevelOne USB-0301 ASIX AX88772 dongle. Has anybody actually tried that lately?Colibri T20 # usb start
starting USB...USB0: USB EHCI 1.00 USB1: USB EHCI 1.00 USB2: USB EHCI 1.00scanning bus 1 for devices... 1 USB Device(s) found scanning bus 2 for devices...
Warning:asix_ethusing MAC address from ROM
2 USB Device(s) found
scanning bus 0 for devices... 1 USB Device(s) found Colibri T20 # tftpboot $loadaddr uImage-colibri_t20 Usingasix_ethdevice
TFTP from server 192.168.10.1; our IP address is 192.168.10.4 Filename 'uImage-colibri_t20'.
Load address:0x1000000
Loading: EHCI timed out on TD - token=0x8008d80
Rx: failed to receive: -5
T EHCI timed out on TD - token=0x8008d80
Rx: failed to receive: -5
T EHCI timed out on TD - token=0x8008d80
Rx: failed to receive: -5
T EHCI timed out on TD - token=0x8008d80
Rx: failed to receive: -5
T EHCI timed out on TD - token=0x8008d80
Rx: failed to receive: -5
T EHCI timed out on TD - token=0x8008d80
Rx: failed to receive: -5
T EHCI timed out on TD - token=0x8008d80
Rx: failed to receive: -5
T EHCI timed out on TD - token=0x8008d80
Rx: failed to receive: -5
T EHCI timed out on TD - token=0x8008d80
Rx: failed to receive: -5
T EHCI timed out on TD - token=0x8008d80
Rx: failed to receive: -5
T EHCI timed out on TD - token=0x8008d80
Rx: failed to receive: -5
Quoted 2 lines
Retry count exceeded; starting again
Colibri T20 #
Not on Tegra. I did test it on minnowmax and it worked. But the cache implementation is quite different on that platform.
Regards,
Simon