[U-Boot] Ethernet via USB on Sinlinx SinA33

Hi,
I am trying to get Ethernet to work through the USB port of the Sinlinx SinA33 on U-Boot to use TFTP to get the kernel and dtb files.
However, I am getting 'data abort' when using dhcp or tftp after adding: #define CONFIG_USB_HOST_ETHER #define CONFIG_USB_ETHER_ASIX
to include/configs/sunxi-common.h and checking CONFIG_USB_EHCI_HCD as told in the documentation [1]
I tested this configuration with the C.H.I.P. and it is working well.
Steps to reproduce:
1) Add the following lines to include/configs/sunxi-common.h:
#define CONFIG_USB_HOST_ETHER #define CONFIG_USB_ETHER_ASIX
2) make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- Sinlinx_SinA33_defconfig 3) make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig 4) Check CONFIG_USB_EHCI_HC and save configuration 5) make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j$(nproc) 6) Prepare SDCard: sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8 7) Boot the board and run dhcp or tftp 8) Get 'data abort' and board gets reset (ethact is also not defined)
The log file is attached.
Thank you,
Quentin
[1] https://github.com/lentinj/u-boot/blob/master/doc/README.usb#L132

Hi,
On 25-03-16 18:14, Quentin Schulz wrote:
Hi,
I am trying to get Ethernet to work through the USB port of the Sinlinx SinA33 on U-Boot to use TFTP to get the kernel and dtb files.
However, I am getting 'data abort' when using dhcp or tftp after adding: #define CONFIG_USB_HOST_ETHER #define CONFIG_USB_ETHER_ASIX
to include/configs/sunxi-common.h and checking CONFIG_USB_EHCI_HCD as told in the documentation [1]
I tested this configuration with the C.H.I.P. and it is working well.
Are you perhaps building u-boot with gcc6 ? There are some known issues when building u-boot with gcc-6, which look pretty much like this.
Is the ethernet adapter connected to a regular usb host port, or to the otg port ?
Regards,
Hans
Steps to reproduce:
- Add the following lines to include/configs/sunxi-common.h:
#define CONFIG_USB_HOST_ETHER #define CONFIG_USB_ETHER_ASIX
- make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- Sinlinx_SinA33_defconfig
- make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig
- Check CONFIG_USB_EHCI_HC and save configuration
- make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j$(nproc)
- Prepare SDCard:
sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8 7) Boot the board and run dhcp or tftp 8) Get 'data abort' and board gets reset (ethact is also not defined)
The log file is attached.
Thank you,
Quentin
[1] https://github.com/lentinj/u-boot/blob/master/doc/README.usb#L132

Hi,
On 28/03/2016 14:56, Hans de Goede wrote:
Hi,
On 25-03-16 18:14, Quentin Schulz wrote:
Hi,
I am trying to get Ethernet to work through the USB port of the Sinlinx SinA33 on U-Boot to use TFTP to get the kernel and dtb files.
However, I am getting 'data abort' when using dhcp or tftp after adding: #define CONFIG_USB_HOST_ETHER #define CONFIG_USB_ETHER_ASIX
to include/configs/sunxi-common.h and checking CONFIG_USB_EHCI_HCD as told in the documentation [1]
I tested this configuration with the C.H.I.P. and it is working well.
Are you perhaps building u-boot with gcc6 ? There are some known issues when building u-boot with gcc-6, which look pretty much like this.
No, I'm building with gcc-5: $ arm-linux-gnueabihf-gcc --version arm-linux-gnueabihf-gcc (Ubuntu 5.2.1-22ubuntu1) 5.2.1 20151010
Is the ethernet adapter connected to a regular usb host port, or to the otg port ?
The Ethernet adapter is connected to the regular USB host port.
Regards,
Quentin
Steps to reproduce:
- Add the following lines to include/configs/sunxi-common.h:
#define CONFIG_USB_HOST_ETHER #define CONFIG_USB_ETHER_ASIX
- make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
Sinlinx_SinA33_defconfig 3) make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig 4) Check CONFIG_USB_EHCI_HC and save configuration 5) make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j$(nproc) 6) Prepare SDCard: sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8 7) Boot the board and run dhcp or tftp 8) Get 'data abort' and board gets reset (ethact is also not defined)
The log file is attached.
Thank you,
Quentin
[1] https://github.com/lentinj/u-boot/blob/master/doc/README.usb#L132

Hi,
On 29-03-16 08:38, Quentin Schulz wrote:
Hi,
On 28/03/2016 14:56, Hans de Goede wrote:
Hi,
On 25-03-16 18:14, Quentin Schulz wrote:
Hi,
I am trying to get Ethernet to work through the USB port of the Sinlinx SinA33 on U-Boot to use TFTP to get the kernel and dtb files.
However, I am getting 'data abort' when using dhcp or tftp after adding: #define CONFIG_USB_HOST_ETHER #define CONFIG_USB_ETHER_ASIX
to include/configs/sunxi-common.h and checking CONFIG_USB_EHCI_HCD as told in the documentation [1]
I tested this configuration with the C.H.I.P. and it is working well.
Are you perhaps building u-boot with gcc6 ? There are some known issues when building u-boot with gcc-6, which look pretty much like this.
No, I'm building with gcc-5: $ arm-linux-gnueabihf-gcc --version arm-linux-gnueabihf-gcc (Ubuntu 5.2.1-22ubuntu1) 5.2.1 20151010
Is the ethernet adapter connected to a regular usb host port, or to the otg port ?
The Ethernet adapter is connected to the regular USB host port.
Hmm, then maybe we are missing some cache flusing somewhere in the ehci code?
Otherwise I would not know what the issue might be.
Regards,
Hans

Hi,
On 29-03-16 08:38, Quentin Schulz wrote:
Hi,
On 28/03/2016 14:56, Hans de Goede wrote:
Hi,
On 25-03-16 18:14, Quentin Schulz wrote:
Hi,
I am trying to get Ethernet to work through the USB port of the Sinlinx SinA33 on U-Boot to use TFTP to get the kernel and dtb files.
However, I am getting 'data abort' when using dhcp or tftp after adding: #define CONFIG_USB_HOST_ETHER #define CONFIG_USB_ETHER_ASIX
to include/configs/sunxi-common.h and checking CONFIG_USB_EHCI_HCD as told in the documentation [1]
I tested this configuration with the C.H.I.P. and it is working well.
Are you perhaps building u-boot with gcc6 ? There are some known issues when building u-boot with gcc-6, which look pretty much like this.
No, I'm building with gcc-5: $ arm-linux-gnueabihf-gcc --version arm-linux-gnueabihf-gcc (Ubuntu 5.2.1-22ubuntu1) 5.2.1 20151010
Is the ethernet adapter connected to a regular usb host port, or to the otg port ?
The Ethernet adapter is connected to the regular USB host port.
So I've been debugging some armv7 cache issues lately and I've come up with the following fix:
https://patchwork.ozlabs.org/patch/605967/
This might very will fix your issue too. If not we're likely missing some cache flushing / invalidation in the usb driver for your usb host controller.
Regards,
Hans
Regards,
Quentin
Steps to reproduce:
- Add the following lines to include/configs/sunxi-common.h:
#define CONFIG_USB_HOST_ETHER #define CONFIG_USB_ETHER_ASIX
- make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
Sinlinx_SinA33_defconfig 3) make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig 4) Check CONFIG_USB_EHCI_HC and save configuration 5) make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j$(nproc) 6) Prepare SDCard: sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8 7) Boot the board and run dhcp or tftp 8) Get 'data abort' and board gets reset (ethact is also not defined)
The log file is attached.
Thank you,
Quentin
[1] https://github.com/lentinj/u-boot/blob/master/doc/README.usb#L132

Hi,
On 06/04/2016 17:24, Hans de Goede wrote:
Hi,
On 29-03-16 08:38, Quentin Schulz wrote:
Hi,
On 28/03/2016 14:56, Hans de Goede wrote:
Hi,
On 25-03-16 18:14, Quentin Schulz wrote:
Hi,
I am trying to get Ethernet to work through the USB port of the Sinlinx SinA33 on U-Boot to use TFTP to get the kernel and dtb files.
However, I am getting 'data abort' when using dhcp or tftp after adding: #define CONFIG_USB_HOST_ETHER #define CONFIG_USB_ETHER_ASIX
to include/configs/sunxi-common.h and checking CONFIG_USB_EHCI_HCD as told in the documentation [1]
I tested this configuration with the C.H.I.P. and it is working well.
Are you perhaps building u-boot with gcc6 ? There are some known issues when building u-boot with gcc-6, which look pretty much like this.
No, I'm building with gcc-5: $ arm-linux-gnueabihf-gcc --version arm-linux-gnueabihf-gcc (Ubuntu 5.2.1-22ubuntu1) 5.2.1 20151010
Is the ethernet adapter connected to a regular usb host port, or to the otg port ?
The Ethernet adapter is connected to the regular USB host port.
So I've been debugging some armv7 cache issues lately and I've come up with the following fix:
https://patchwork.ozlabs.org/patch/605967/
This might very will fix your issue too. If not we're likely missing some cache flushing / invalidation in the usb driver for your usb host controller.
Regards,
Hans
I actually tried uboot-sunxi repository (and then checked out on merge commit in master for this repository) and it is working as expected: I get Ethernet over USB.
I tested with master (43d3fb5c0609a76409e7859a2a5800670c7b5bd2) and I first get a reset of the board when starting USB (before I can enter U-Boot command line) and then after the reboot, U-Boot hangs on starting USB (still before the command line).
I did a git bisect on master and it returned this commit: http://git.denx.de/?p=u-boot.git;a=commit;h=3f9f8a5b83f8aec40c9f4ee496046a69...
Tell me if I can help in any way.
Regards,
Quentin
Regards,
Quentin
Steps to reproduce:
- Add the following lines to include/configs/sunxi-common.h:
#define CONFIG_USB_HOST_ETHER #define CONFIG_USB_ETHER_ASIX
- make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
Sinlinx_SinA33_defconfig 3) make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig 4) Check CONFIG_USB_EHCI_HC and save configuration 5) make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j$(nproc) 6) Prepare SDCard: sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8 7) Boot the board and run dhcp or tftp 8) Get 'data abort' and board gets reset (ethact is also not defined)
The log file is attached.
Thank you,
Quentin
[1] https://github.com/lentinj/u-boot/blob/master/doc/README.usb#L132

Hi,
On 11-04-16 12:25, Quentin Schulz wrote:
Hi,
On 06/04/2016 17:24, Hans de Goede wrote:
Hi,
On 29-03-16 08:38, Quentin Schulz wrote:
Hi,
On 28/03/2016 14:56, Hans de Goede wrote:
Hi,
On 25-03-16 18:14, Quentin Schulz wrote:
Hi,
I am trying to get Ethernet to work through the USB port of the Sinlinx SinA33 on U-Boot to use TFTP to get the kernel and dtb files.
However, I am getting 'data abort' when using dhcp or tftp after adding: #define CONFIG_USB_HOST_ETHER #define CONFIG_USB_ETHER_ASIX
to include/configs/sunxi-common.h and checking CONFIG_USB_EHCI_HCD as told in the documentation [1]
I tested this configuration with the C.H.I.P. and it is working well.
Are you perhaps building u-boot with gcc6 ? There are some known issues when building u-boot with gcc-6, which look pretty much like this.
No, I'm building with gcc-5: $ arm-linux-gnueabihf-gcc --version arm-linux-gnueabihf-gcc (Ubuntu 5.2.1-22ubuntu1) 5.2.1 20151010
Is the ethernet adapter connected to a regular usb host port, or to the otg port ?
The Ethernet adapter is connected to the regular USB host port.
So I've been debugging some armv7 cache issues lately and I've come up with the following fix:
https://patchwork.ozlabs.org/patch/605967/
This might very will fix your issue too. If not we're likely missing some cache flushing / invalidation in the usb driver for your usb host controller.
Regards,
Hans
I actually tried uboot-sunxi repository (and then checked out on merge commit in master for this repository) and it is working as expected: I get Ethernet over USB.
I tested with master (43d3fb5c0609a76409e7859a2a5800670c7b5bd2) and I first get a reset of the board when starting USB (before I can enter U-Boot command line) and then after the reboot, U-Boot hangs on starting USB (still before the command line).
I did a git bisect on master and it returned this commit: http://git.denx.de/?p=u-boot.git;a=commit;h=3f9f8a5b83f8aec40c9f4ee496046a69...
Ah, that is fixed by this commit:
http://git.denx.de/?p=u-boot/u-boot-usb.git;a=commitdiff;h=cfb3f1cd0e022711d...
A pullreq for which was send this morning, so this should be fixed in master as soon as the u-boot-usb pull-req gets merged.
Regards,
Hans

Hi,
On 11/04/2016 13:07, Hans de Goede wrote:
Hi,
On 11-04-16 12:25, Quentin Schulz wrote:
Hi,
On 06/04/2016 17:24, Hans de Goede wrote:
Hi,
On 29-03-16 08:38, Quentin Schulz wrote:
Hi,
On 28/03/2016 14:56, Hans de Goede wrote:
Hi,
On 25-03-16 18:14, Quentin Schulz wrote:
Hi,
I am trying to get Ethernet to work through the USB port of the Sinlinx SinA33 on U-Boot to use TFTP to get the kernel and dtb files.
However, I am getting 'data abort' when using dhcp or tftp after adding: #define CONFIG_USB_HOST_ETHER #define CONFIG_USB_ETHER_ASIX
to include/configs/sunxi-common.h and checking CONFIG_USB_EHCI_HCD as told in the documentation [1]
I tested this configuration with the C.H.I.P. and it is working well.
Are you perhaps building u-boot with gcc6 ? There are some known issues when building u-boot with gcc-6, which look pretty much like this.
No, I'm building with gcc-5: $ arm-linux-gnueabihf-gcc --version arm-linux-gnueabihf-gcc (Ubuntu 5.2.1-22ubuntu1) 5.2.1 20151010
Is the ethernet adapter connected to a regular usb host port, or to the otg port ?
The Ethernet adapter is connected to the regular USB host port.
So I've been debugging some armv7 cache issues lately and I've come up with the following fix:
https://patchwork.ozlabs.org/patch/605967/
This might very will fix your issue too. If not we're likely missing some cache flushing / invalidation in the usb driver for your usb host controller.
Regards,
Hans
I actually tried uboot-sunxi repository (and then checked out on merge commit in master for this repository) and it is working as expected: I get Ethernet over USB.
I tested with master (43d3fb5c0609a76409e7859a2a5800670c7b5bd2) and I first get a reset of the board when starting USB (before I can enter U-Boot command line) and then after the reboot, U-Boot hangs on starting USB (still before the command line).
I did a git bisect on master and it returned this commit: http://git.denx.de/?p=u-boot.git;a=commit;h=3f9f8a5b83f8aec40c9f4ee496046a69...
Ah, that is fixed by this commit:
http://git.denx.de/?p=u-boot/u-boot-usb.git;a=commitdiff;h=cfb3f1cd0e022711d...
A pullreq for which was send this morning, so this should be fixed in master as soon as the u-boot-usb pull-req gets merged.
Regards,
Hans
Tested with the patch, the issue is solved. Thanks Hans!
Regards,
Quentin
participants (2)
-
Hans de Goede
-
Quentin Schulz