[U-Boot] netconsole: USB Ethernet connection dropping with ping or tftpboot

Jörg Krause jkrause at posteo.de
Thu Feb 5 23:10:04 CET 2015


On Do, 2015-02-05 at 08:33 -0700, Stephen Warren wrote:
> On 02/05/2015 04:21 AM, Jörg Krause wrote:
> > On Di, 2015-02-03 at 22:44 +0100, Jörg Krause wrote:
> >> I followed the instructions from Marek in 'M28 U-Boot Single-Wire Debug
> >> preview' to enable NetConsole:
> >> http://www.denx-cs.de/?q=blogm28singlewiredebug
> >>
> >> I'm using mxsldr to flash the u-boot.sb image to RAM. This is the dmesg
> >> output from my host:
> >>
> >>          [31048.492181] usb 3-13: new high-speed USB device number 24
> >>          using xhci_hcd
> >>          [31048.667617] cdc_ether 3-13:1.0 eth0: register 'cdc_ether' at
> >>          usb-0000:00:14.0-13, CDC Ethernet Device, 00:19:b8:00:00:01
> >>          [31048.669101] cdc_ether 3-13:1.0 enp0s20u13: renamed from eth0
> >>          [31048.696758] cdc_ether 3-13:1.0 enp0s20u13: kevent 12 may have
> >>          been dropped
> >>
> >> I noticed the 'kevent 12 may have been dropped' message here.
> >>
> >> Nevertheless, NetworkManager shows me a USB Ethernet connection and
> >> using './netconsole 10.0.0.2' I am able to communicate with the device,
> >> e.g. 'nand info' outputs correctly.
> >>
> >> But if I use 'ping 10.0.0.1' or 'tftpboot u-boot.sb' the network
> >> connection drops. Both commands work fine if I switch back from
> >> netconsole to serial in-/output.
> >>
> >> This is the output from dmesg:
> >>          [31620.215354] usb 3-13: USB disconnect, device number 24
> >>          [31620.215422] cdc_ether 3-13:1.0 enp0s20u13: unregister
> >>          'cdc_ether' usb-0000:00:14.0-13, CDC Ethernet Device
> >>
> >> Do I missed something?
> >
> > I managed to get serial console and netconsole muxing to work, so I can
> > see all the debug messages:
> >
> >          Hit any key to stop autoboot:  5 using ci_udc, OUT ep- IN ep-
> >          STATUS ep-
> >          MAC 00:19:b8:00:00:02
> >          HOST MAC 00:19:b8:00:00:01
> >          high speed config #1: 2 mA, Ethernet Gadget, using CDC Ethernet
> >          USB network up!
> >           0
> >          => tftp u-boot.sb
> >          using ci_udc, OUT ep- IN ep- STATUS ep-
> >          timeout sending packets to usb ethernet
> >
> > This reminded me about an issue I had some months ago:
> > http://lists.denx.de/pipermail/u-boot/2014-July/182885.html
> >
> > I enabled debug output in arch/arm/cpu/arm926ejs/cache.c and I get
> > error:
> > => tftp u-boot.sb
> > using ci_udc, OUT ep- IN ep- STATUS ep-
> > CACHE: Misaligned operation at range [43f7b010, 43f7b070]
> >
> > I removed the flush_cache() call in cmd_net.c:netboot_common() as
> > suggested by Marek in the thread. But the error message is still there.
> 
> Perhaps make flush_cache() a macro that also passes in the file/line 
> number where it's called from, and print those out along with he 
> "misaligned operation" error message?
> 
> (or find some other way to perform a stack dump from within that function).

I've added in each function in ci_udc a printf statement before a cache
function is called, eg:

        static void ci_flush_qh(int ep_num)
        {
        	[..]
        	printf("CACHE: flush_dcache_range %s %d
        \n",__FUNCTION__,__LINE__);
        	flush_dcache_range(start, end);
        }

I've also looked at all calling functions of flush_cache or
flush_dcache_range, but I think there is nothing of relevance.

This is a snippet of the output:

        Using usb_ether device
        CACHE: flush_dcache_range ci_bounce 356 
        timeout sending packets to usb ethernet
        CACHE: flush_dcache_range ci_bounce 356 
        CACHE: flush_dcache_range ci_bounce 356 
        timeout sending packets to usb ethernet
        timeout sending packets to usb ethernet
        CACHE: flush_dcache_range ci_bounce 356 
        timeout sending packets to usb ethernet
        CACHE: flush_dcache_range ci_bounce 356 
        CACHE: flush_dcache_range ci_bounce 356 
        timeout sending packets to usb ethernet
        timeout sending packets to usb ethernet
        CACHE: flush_dcache_range ci_bounce 356 
        timeout sending packets to usb ethernet
        CACHE: flush_dcache_range ci_flush_qh 166 
        CACHE: flush_dcache_range ci_bounce 356 
        timeout sending packets to usb ethernet
        CACHE: flush_dcache_range ci_flush_qh 166 
        CACHE: flush_dcache_range ci_bounce 356 
        timeout sending packets to usb ethernet
        CACHE: flush_dcache_range ci_flush_qh 166 
        CACHE: flush_dcache_range ci_bounce 356 
        timeout sending packets to usb ethernet
        CACHE: flush_dcache_range ci_flush_qh 166 
        CACHE: flush_dcache_range ci_bounce 356 
        timeout sending packets to usb ethernet
        CACHE: flush_dcache_range ci_flush_qh 166 
        CACHE: flush_dcache_range ci_bounce 356 
        CACHE: Misaligned operation at range [43f7b010, 43f7b070]
        timeout sending packets to usb ethernet
        ping failed; host 10.0.0.1 is not alive
        
I hope this helps.



More information about the U-Boot mailing list