Other Parts Discussed in Thread: AM1808, OMAP-L138
Hello,
I have a stability problem with the Linux g_ether gadget module on the AM1808 experimenters kit board.
Can someone please confirm this issue?
The g_ether module start up perfectly and communication between the board and a Win7 machine work as expected.
But after a while the link stops working. All IP trafic over usb0 link just stops. The best part is that
no error messages is shown in dmesg. ifconfig show that the link is up. Even windows still think that
the link is up. Everything looks normal, but no IP trafic get through.
The issue is "reproducable" by transfering a large amount of data over the link. After 10 to 15 minutes
(the exact time varies) the usb0 link will just stop.
Assume: PC => 192.168.29.1, Am1808 board => 192.168.29.2
On PC side:
:again
wget http://192.168.29.2/test.html (~8M file in /srv/www/)
del test.html
goto again
(generally in 10 to 15 minutes, the wget will stop working)
ping 192.168.29.2
(100% packet loss after error)
On AM1808 board:
ping 192.168.29.1
(100% packet loss after error)
-------------------------------
I isolated the issue using the following code:
The kernel comes from the "http://arago-project.org/git/projects/linux-omapl1.git" tree
using the "v2.6.33-rc4_DAVINCIPSP_03.20.00.13" tag. In the .config[1] file I only added
USB gadget support and g_ether module. The rest of the .config is the same as the SDK.
The file system comes from the AM18x-1_10_00_00.tar.gz file that shipped with EVM.
[1] http://arago-project.org/git/?p=arago.git;a=blob;f=recipes/linux/linux-omapl1-2.6.32%2B2.6.33-rc4-psp03.20.00.12/da850-omapl138-evm/defconfig
-------------------------------
(before error)
root@arago:~# dmesg
Linux version 2.6.33-rc4 (worker@machine) (gcc version 4.5.1 (Sourcery G++ Lite 2010.09-50) ) #1 PREEMPT Wed Feb 2 15:14:42 SAST 2011
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: DaVinci DA850/OMAP-L138/AM18xx EVM
Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 16384
free_area_init_node: node 0, pgdat c04416d0, node_mem_map c0464000
DMA zone: 128 pages used for memmap
DMA zone: 0 pages reserved
DMA zone: 16256 pages, LIFO batch:3
DaVinci da850/omap-l138 variant 0x0
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: console=ttyS2,115200n8 ip=192.168.1.6 root=/dev/nfs nfsroot=192.168.1.3:/srv/nfs/nfsroot.evm
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
...
eth0: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=1:00, id=7c0f1)
IP-Config: Guessing netmask 255.255.255.0
IP-Config: Complete:
device=eth0, addr=192.168.1.6, mask=255.255.255.0, gw=255.255.255.255,
host=192.168.1.6, domain=, nis-domain=(none),
bootserver=255.255.255.255, rootserver=192.168.1.3, rootpath=
Looking up port of RPC 100003/2 on 192.168.1.3
PHY: 1:00 - Link is Up - 100/Full
Looking up port of RPC 100005/1 on 192.168.1.3
VFS: Mounted root (nfs filesystem) on device 0:13.
Freeing init memory: 144K
udev: starting version 141
g_ether gadget: using random self ethernet address
usb0: MAC 26:b0:cd:f5:6f:d7
usb0: HOST MAC 00:18:30:00:00:01
g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
g_ether gadget: g_ether ready
g_ether gadget: high speed config #2: RNDIS
musb_hdrc periph: enabled ep2in for int IN, dma, maxpacket 8
musb_hdrc periph: enabled ep1in for bulk IN, dma, maxpacket 512
musb_hdrc periph: enabled ep1out for bulk OUT, dma, maxpacket 512
NET: Registered protocol family 10
eth0: no IPv6 routers present
usb0: no IPv6 routers present
warning: `vsftpd' uses 32-bit capabilities (legacy support in use)
root@arago:~# ping 192.168.29.1
PING 192.168.29.1 (192.168.29.1): 56 data bytes
64 bytes from 192.168.29.1: seq=0 ttl=128 time=1.092 ms
64 bytes from 192.168.29.1: seq=1 ttl=128 time=0.961 ms
--- 192.168.29.1 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0.961/1.026/1.092 ms
>>> Error occured here <<<
root@arago:~# dmesg
[[ no changes, same as before ]]
root@arago:~# ping 192.168.29.1
PING 192.168.29.1 (192.168.29.1): 56 data bytes
--- 192.168.29.1 ping statistics ---
6 packets transmitted, 0 packets received, 100% packet loss
root@arago:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:08:EE:04:32:45
inet addr:192.168.1.6 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::208:eeff:fe04:3245/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:31352 errors:0 dropped:0 overruns:0 frame:0
TX packets:21171 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:31262245 (29.8 MiB) TX bytes:11505755 (10.9 MiB)
Interrupt:33
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:6 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0 (notice the 6 packets on lo interface!)
collisions:0 txqueuelen:0
RX bytes:1992 (1.9 KiB) TX bytes:1992 (1.9 KiB)
usb0 Link encap:Ethernet HWaddr 26:B0:CD:F5:6F:D7
inet addr:192.168.29.2 Bcast:192.168.29.3 Mask:255.255.255.252
inet6 addr: fe80::24b0:cdff:fef5:6fd7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1473897 errors:0 dropped:0 overruns:0 frame:0
TX packets:3646698 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:59034759 (56.2 MiB) TX bytes:1226875918 (1.1 GiB)
-------------------------------
One thing I noticed was that after the error, the ping packets cause
the lo interface's packet counter to increase. Don't know if this is
a clue or not.
Can somebody please suggest what can be done to fix this problem?
Thanks,
Francois Retief