Ethernet issue and debug log issue

Hi All,

  1. I am using latest u-boot build which is 2018-rc2 revision, I enabled for more debug information by mentioning “#define DEBUG” in include/common.h file, built it and ran the u-boot, while initializing, I guess on autoboot running time, after USB device verification, mmc check started and the application got hanged after displaying the following information.

mmc0(part 0) is current device
Scanning mmc 0:1…

after this no further update, and not came to CLI, waited more than half-hour, is there anything I missed here. I want to see more debug log, When I cross check it is getting stuck at some where while running environment variables at autoboot time.

  1. In normal booting, without having debug definition, I successfully able to get into command line interface, I connected the LAN cable and try to check for any ethernet devices connected to the board. FYI, I was not loaded the kernel and rootfs, I am planing to load them through tftp, but it says an error as no device detected. guide me if I missed something.

cheers

  1. In normal booting, without having debug definition, I successfully able to get into command line interface, I connected the LAN cable and try to check for any ethernet devices connected to the board. FYI, I was not loaded the kernel and rootfs, I am planing to load them through tftp, but it says an error as no device detected. guide me if I missed something.

What commands did you use to look for other devices?

What chipset if your USB adapter based on (e.g. is it one supported by
u-boot)?

Okay once I connected the LAN cable, I am giving "usb reset:command to detect the ethernet device, but I am getting 0 devices. It is USB2514.

When I gave USB info command I am able to see all the vendor details and all three usb ports information. So I think it will be supported by u-boot, am I missed some forcible IP configuration / something to detect the Ethernet device.

Do you have enabled the more debug informaion on ‘console’ by adding “#define DEBUG”, if I add it , then program is hanging for me while doing autoboot.

USB2514 is the hub. What chipset is your USB ethernet adapter based on?

Did you try ‘usb start’ and ‘usb scan’ u-boot commands ?

We are using onboard USB to ethernet bridge ic LAN7500i,

@Loic, yes I try to give stop and start the usb again by using ‘usb start’ command. But no improvement. I did power cycle too, but same situation, no ethernet device detected by target.

@Loic,

Do you have enabled the more debug informaion on ‘console’ by adding “#define DEBUG”, if I add it , then program is hanging for me while doing autoboot.

We are using onboard USB to ethernet bridge ic LAN7500i,

Have you enabled the driver? The driver for this part is enabled by
default in the db410c_defconfig.

@danielt,

Thanks for the inforation, default this driver is not enabled. Now I mentioned the “CONFIG_USB_ETHER_LAN75XX=y” in 'configs/dragonboard410c_defconfig.

applied distclean and rebuild the u-boot-master, folder, but still in the final u-boot.cfg file the definition is missing. am I missed anything

Then I tried to define this macro at “include/configs/dragonboard410c.h” file and rebuild it, while building I got the errors on lan7x.o may be some ENUM flags are not defined.

The errors attachment is just for your information, I will try to figure it out the root cause, but mean while if you know some stable build which is enabled with this usb-ethernet driver, please let me know.

Thanks.

I found the root cause is due to missing of “CONFIG_DM_ETH” definition,

I think we need to mention these functions under #ifdef of “CONFIG_DM_ETH” similar to other drivers, but the denx mail list is saying something different (link: [U-Boot] [PATCH v3 1/2] usb: net: Add support for Microchip LAN75xx and LAN78xx), can anyone help me on it, which one is correct process.

Mention “CONFIG_DM_ETH” in configurations (or) restrict the error raised functions under #ifdef of “CONFIG_DM_ETH”.

Cheers

u-boot is slowly evolving from an ad-hoc driver model to a more formal driver model. Symbols like CONFIG_DM_ETH switch between the old approach (which does not support LAN7500) to the new approach.

As with Linux kernel it is perhaps better to use the menu system (make menuconfig) to update the config settings. In particular you can search for config symbols: /LAN7<CR> and from there look at the dependancies to ensure everything you need is enabled.

In this case the menu system shows that you cannot enable CONFIG_USB_ETHER_LAN75XX unless CONFIG_DM_ETH and CONFIG_PHYLIB are both set.

Thanks for your response, I used menuconfig as well, to config “CONFIG_USB_ETHER_LAN75XX” it said, it have a dependency to enable the “CONFIG_USB_ETHER” and “CONFIG_PHYLIB”. It did not said about to enable “CONFIG_DM_ETH”.

After completion of “make _config”, I am able to see the generated .config file with required configuration. So I continue to do make but it was getting failed with errors, as I said earlier we may need to enable “CONFIG_DM_ETH”.

I will try and update it on forum…

Not may, you will need CONFIG_DM_ETH.

It looks to me like being able to enable CONFIG_USB_ETHER_LAN75XX without it is a bug in the Kconfig files in u-boot.

Hmm, I understand it.

Please find the attached screenshot the source version is 2018.09rc2, I agree, then it requires to update the Kconfig.

Even as I mentioned in earlier thread, the CONFIG_DM_ETH dependency was removed in one the patch in 2017, (link: [U-Boot] [PATCH v3 1/2] usb: net: Add support for Microchip LAN75xx and LAN78xx). So I got confused.

I think you are misreading the history of this patch set (noting that the history all takes place before the code was merged into u-boot).

I don’t think it was the CONFIG_DM_ETH dependency that was removed… what was removed was support for not having CONFIG_DM_ETH (e.g. CONFIG_DM_ETH became mandatory). As a result a dependency on on CONFIG_DM_ETH should have been added to the Kconfig file but I think this was overlooked.

Okay got it, let me try with enabling of CONFIG_DM_ETH