This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

g_cdc USB modules cause kernel (3.12.10) crash on AM3352

Other Parts Discussed in Thread: AM3352, DA8XX

Hi all


I'm using the AM3352  on a custom board strongly based on the beaglebone black design . The kernel sources version is the 3.12.10. the same as provided by the sdk7


At the moment, i'm very close to end the distribution development process. But I'm stuck on g_cdc driver problems that cause kernel panic in certain conditions.

For (very sad) reasons that i will not explain, I'm forced to connect two custom board each other in order to make them communicate some data.

There aren't much peripherals to choice, so i'm almost forced to use the usb slots.


Like the BB black , i have two usb slots. One is the host , the second one is  the device (not OTG because is forced to be device. The ID pin is floating. )
So I have connected the host of one board with the device of the other board.

Then, I've loaded the proper modules to achieve the ethernet over usb connection. In this way, it's possible to exploit the benefits of ssh connection, or place simple remote server with sshfs to share files.

the HOST side ,

I load

modprobe am335x
modprobe fuse

configure usb0 with ifup  (192,168.7.5)


FROM E THE DEVICE side

modprobe libcomposite
modprobe musb_hdrc
modprobe musb_am335x
sleep 1
modprobe usbnet
modprobe u_ether
sleep 1
modprobe g_cdc
modprobe u_rndis
sleep 1
ifup usb0 (192.168.7.2)

then from one board i can connect to the other board with ssh and viceversa

The problem begins when i try to copy a file with scp form DEVICE TO HOST

From device side i type something like 

scp file root@192.168.7.5:/home/root

I get the kernle panic of the host..... very strange to me!!!!!

[  133.363538] skbuff: skb_over_panic: text:c0419e28 len:1562 put:1562 head:dc4c3f00 data:dc4c3f42 tail:0xdc4c455c end:0xdc4c4540 dev:usb0
[  133.376527] ------------[ cut here ]------------
[  133.381438] Kernel BUG at c05b4f38 [verbose debug info unavailable]
[  133.388102] Internal error: Oops - BUG: 0 [#1] ARM
[  133.393198] Modules linked in: musb_dsps musb_hdrc musb_am335x libcomposite configfs iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_filter ip_tables x_tables
[  133.411784] CPU: 0 PID: 2353 Comm: scp Not tainted 3.12.10 #6
[  133.417897] task: dddd4c00 ti: ddbc8000 task.ti: ddbc8000
[  133.423649] PC is at skb_panic+0x5c/0x68
[  133.427827] LR is at irq_work_queue+0x5c/0xbc
[  133.432463] pc : [<c05b4f38>]    lr : [<c00919a8>]    psr: 600f0193
[  133.432463] sp : ddbc98f8  ip : 00000000  fp : ddbc992c
[  133.444672] r10: 00000006  r9 : 00000100  r8 : ddbc8000
[  133.450228] r7 : c075b034  r6 : dc4c3f00  r5 : 0000061a  r4 : dc4c3f42
[  133.457170] r3 : c08493dc  r2 : c084a144  r1 : c08493e4  r0 : 0000007b
[  133.464113] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user
[  133.471793] Control: 10c5387d  Table: 9c0e8019  DAC: 00000015
[  133.477902] Process scp (pid: 2353, stack limit = 0xddbc8240)
[  133.484013] Stack: (0xddbc98f8 to 0xddbca000)
[  133.488649] 98e0:                                                       0000061a dc4c3f00
[  133.497352] 9900: dc4c3f42 dc4c455c dc4c4540 dc120800 0000061a dc4c455c dc4c4540 00000000
[  133.506055] 9920: ddbc994c ddbc9930 c04fa164 c05b4ee8 dc120c40 dc448c40 dd92b980 00000000
[  133.514757] 9940: ddbc996c ddbc9950 c0419e28 c04fa11c dc448c40 600f0113 00000000 ddbc9990
[  133.523461] 9960: ddbc998c ddbc9970 c0424b68 c0419e0c dc448c54 ddbc9990 ddebeee8 ddebeeec
[  133.532165] 9980: ddbc99b4 ddbc9990 c042564c c0424b0c ddbc9990 ddbc9990 00000000 c0846f3c
[  133.540869] 99a0: c08853c0 00000000 ddbc99d4 ddbc99b8 c004b900 c04255dc 00000001 00000018
[  133.549571] 99c0: c088541c c0885400 ddbc9a24 ddbc99d8 c004bb6c c004b8a0 00000000 d786b14b
[  133.558274] 99e0: ddbc9a0c 00000018 00400100 ffffbee8 ddbc8018 0000000a 00000021 600f0193
[  133.566976] 9a00: 00000021 00000000 00000021 dc3507c0 ddb46800 00000000 ddbc9a3c ddbc9a28
[  133.575679] 9a20: c004bd04 c004baa0 00000000 ddbc8000 ddbc9a54 ddbc9a40 c004bfa0 c004bcc0
[  133.584381] 9a40: 00000110 c0854a8c ddbc9a74 ddbc9a58 c00151e4 c004bf0c 00000080 fa200000
[  133.593084] 9a60: ddbc9a98 c08842d4 ddbc9a94 ddbc9a78 c00087bc c00151b4 c00cfafc 800f0013
[  133.601786] 9a80: ffffffff ddbc9acc ddbc9afc ddbc9a98 c05b8080 c0008760 dd8000c0 00000080
[  133.610487] 9aa0: 00000039 00000036 dd802800 dc3507c0 a00f0013 dd119bf0 dc3507c0 ddb46800
[  133.619189] 9ac0: 00000000 ddbc9afc ddbc9b00 ddbc9ae0 c0176e30 c00cfafc 800f0013 ffffffff
[  133.627891] 9ae0: 00000001 00000000 00000200 ddbc9be8 ddbc9bcc ddbc9b00 c0176e30 c00cfa8c
[  133.636594] 9b00: ddbc9b1c ddbc9b10 c05b6c44 c05b6848 ddbc9b8c ddbc9b20 c05b6398 c05b6c18
[  133.645295] 9b20: c0847ec0 ffffbee6 ddbc9b54 dd06ba88 ddbc9b5c ddbc9b40 c00a6bb8 c00aadc4
[  133.653996] 9b40: fffe24ec 000000c1 00000000 00000000 00000200 ddbc9b60 00000000 c00a1324
[  133.662697] 9b60: 000000c1 0001bbe5 00000000 ddbc9cf4 ddbc8020 ddbc9c04 00000000 00000000
[  133.671398] 9b80: 00000000 ddbc9b90 c08829d8 00000000 010200da 00000000 ddbc9bc4 ddbc9ba8
[  133.680099] 9ba0: dd119be0 00000000 00000000 00000000 dd119be0 dd14f4c8 dd119bf0 ffffffff
[  133.688802] 9bc0: ddbc9c4c ddbc9bd0 c0158b18 c0176cd0 ddbc9c14 ddbc9be0 c00fd79c c00fd348
[  133.697504] 9be0: 00000002 ffff0000 c0881f30 c0befba0 00000000 00000001 00000000 dd119cb4
[  133.706205] 9c00: 00000000 c0befba0 ddbc9c34 00000000 00000000 c00fd750 00000000 00000000
[  133.714907] 9c20: dd119bf0 00001000 00001000 00000000 00000000 00000000 00001000 00000000
[  133.723610] 9c40: ddbc9cbc ddbc9c50 c00ff248 c0158770 dd14f4c8 00000001 ddbc9c94 ddbc9c68
[  133.732311] 9c60: c0befba0 ddbc9c88 dd119bf0 dd14f4c8 00000000 00000000 00001000 ddbc9c88
[  133.741014] 9c80: 00000002 dd14f4c8 ddbc9cbc ddbc9c98 c0178984 c0befba0 dd119bf0 dd2183c0
[  133.749717] 9ca0: 00000000 dd119cb4 00001000 c0158764 ddbc9d1c ddbc9cc0 c015d610 c00ff084
[  133.758419] 9cc0: 00001000 c0158764 c05cfb24 00001355 ddb1d000 00000000 00001000 00000000
[  133.767121] 9ce0: 00000000 00000000 c0178a10 00000000 dd119bf0 00001000 dd119cb4 00000000
[  133.775823] 9d00: ddbc8020 ddbc8000 c05cf8b8 00004000 ddbc9d94 ddbc9d20 c009dd94 c015d4f8
[  133.784525] 9d20: 00001000 00000000 ddbc9d50 ddbc9d54 dd119bf0 00000000 00001000 ddbc8020
[  133.793226] 9d40: ddbc1740 00000000 00000000 00000000 dd119bf0 00000000 ddbc9ee8 00000001
[  133.801928] 9d60: 00000000 00004000 53c97aaa ddbc9f10 ddbc8018 ddbc1740 ddbc9ef0 ddbc9ee8
[  133.810630] 9d80: dd119cb4 00004000 ddbc9e0c ddbc9d98 c009f594 c009dbdc 00000000 00000000
[  133.819332] 9da0: ddbc9f10 00004000 00000000 ddbc9db8 00000000 00000000 ddbc9ddc ddbc9dc8
[  133.828033] 9dc0: ddbc9f10 dddf5084 00000000 00000000 ffffffff 00000001 c00bcb80 00004000
[  133.836734] 9de0: 00000002 00000000 00000000 dd119c5c 00000001 ddbc9ef0 ddbc1740 ddbc9ee8
[  133.845437] 9e00: ddbc9e44 ddbc9e10 c009f824 c009f3b8 ddbc9e50 ddd6a000 dd25c5f0 00000000
[  133.854140] 9e20: 00000000 ddbc9f78 00004000 ddbc9ee8 00000001 ddbc9ef0 ddbc9edc ddbc9e48
[  133.862842] 9e40: c01545ec c009f7d4 00000000 00000000 53c97aaa 2de5448e 53c97aaa 2de5448e
[  133.871546] 9e60: 00001000 ddbc9ee8 00001000 00000000 ddbc9edc ddbc9e80 c00dc5a4 c00ebc58
[  133.880247] 9e80: ddc20060 ddf2abcc dc3f3f00 00000001 00000004 00000000 00000001 00004000
[  133.888950] 9ea0: 00001000 ddbc9ee8 c05c9f80 ddf2abc0 00000000 00000000 00000000 ddbc9f78
[  133.897653] 9ec0: 00004000 00000000 00004000 00000000 ddbc9f44 ddbc9ee0 c00d452c c0154540
[  133.906355] 9ee0: 00000000 00000000 0001e958 00004000 ddbc1740 00000000 00000000 00000000
[  133.915057] 9f00: dddd4c00 00000000 00000000 00000000 00000000 00000000 00004000 00000000
[  133.923760] 9f20: 00000000 00000000 00004000 ddbc1740 0001e958 ddbc9f78 ddbc9f74 ddbc9f48
[  133.932461] 9f40: c00d4c6c c00d44b4 00000000 00000000 00000000 00000000 ddbc1740 0001e958
[  133.941163] 9f60: 00000000 00004000 ddbc9fa4 ddbc9f78 c00d52b8 c00d4bbc 00000000 00000000
[  133.949865] 9f80: 00000000 0001ca50 00009650 00000004 c0014488 ddbc8000 00000000 ddbc9fa8
[  133.958566] 9fa0: c00142e0 c00d5280 00000000 0001ca50 00000003 0001e958 00004000 00004000
[  133.967268] 9fc0: 00000000 0001ca50 00009650 00000004 00004000 0001e958 00000000 00000000
[  133.975969] 9fe0: 00000000 bef582f4 0000f078 43a996cc 600f0010 00000003 00000000 00000000
[  133.984661] Backtrace:
[  133.987283] [<c05b4edc>] (skb_panic+0x0/0x68) from [<c04fa164>] (skb_put+0x54/0x58)
[  133.995424]  r7:00000000 r6:dc4c4540 r5:dc4c455c r4:0000061a
[  134.001476] [<c04fa110>] (skb_put+0x0/0x58) from [<c0419e28>] (rx_complete+0x28/0x238)
[  134.009893]  r7:00000000 r6:dd92b980 r5:dc448c40 r4:dc120c40
[  134.015950] [<c0419e00>] (rx_complete+0x0/0x238) from [<c0424b68>] (__usb_hcd_giveback_urb+0x68/0xf8)
[  134.025753]  r7:ddbc9990 r6:00000000 r5:600f0113 r4:dc448c40
[  134.031804] [<c0424b00>] (__usb_hcd_giveback_urb+0x0/0xf8) from [<c042564c>] (usb_giveback_urb_bh+0x7c/0xac)
[  134.042251]  r6:ddebeeec r5:ddebeee8 r4:ddbc9990 r3:dc448c54
[  134.048312] [<c04255d0>] (usb_giveback_urb_bh+0x0/0xac) from [<c004b900>] (tasklet_action+0x6c/0xc4)
[  134.058021]  r7:00000000 r6:c08853c0 r5:c0846f3c r4:00000000
[  134.064071] [<c004b894>] (tasklet_action+0x0/0xc4) from [<c004bb6c>] (__do_softirq+0xd8/0x1cc)
[  134.073226]  r7:c0885400 r6:c088541c r5:00000018 r4:00000001
[  134.079276] [<c004ba94>] (__do_softirq+0x0/0x1cc) from [<c004bd04>] (do_softirq+0x50/0x5c)
[  134.088075] [<c004bcb4>] (do_softirq+0x0/0x5c) from [<c004bfa0>] (irq_exit+0xa0/0xf4)
[  134.096400]  r4:ddbc8000 r3:00000000
[  134.100233] [<c004bf00>] (irq_exit+0x0/0xf4) from [<c00151e4>] (handle_IRQ+0x3c/0x8c)
[  134.108559]  r4:c0854a8c r3:00000110
[  134.112381] [<c00151a8>] (handle_IRQ+0x0/0x8c) from [<c00087bc>] (omap3_intc_handle_irq+0x68/0x7c)
[  134.121907]  r6:c08842d4 r5:ddbc9a98 r4:fa200000 r3:00000080
[  134.127959] [<c0008754>] (omap3_intc_handle_irq+0x0/0x7c) from [<c05b8080>] (__irq_svc+0x40/0x54)
[  134.137395] Exception stack(0xddbc9a98 to 0xddbc9ae0)
[  134.142767] 9a80:                                                       dd8000c0 00000080
[  134.151469] 9aa0: 00000039 00000036 dd802800 dc3507c0 a00f0013 dd119bf0 dc3507c0 ddb46800
[  134.160171] 9ac0: 00000000 ddbc9afc ddbc9b00 ddbc9ae0 c0176e30 c00cfafc 800f0013 ffffffff
[  134.168864]  r7:ddbc9acc r6:ffffffff r5:800f0013 r4:c00cfafc
[  134.174930] [<c00cfa80>] (kfree+0x0/0xb8) from [<c0176e30>] (ext4_ext_map_blocks+0x16c/0xdf0)
[  134.183994]  r6:ddbc9be8 r5:00000200 r4:00000000 r3:00000001
[  134.190055] [<c0176cc4>] (ext4_ext_map_blocks+0x0/0xdf0) from [<c0158b18>] (ext4_da_get_block_prep+0x3b4/0x624)
[  134.200804] [<c0158764>] (ext4_da_get_block_prep+0x0/0x624) from [<c00ff248>] (__block_write_begin+0x1d0/0x460)
[  134.211542] [<c00ff078>] (__block_write_begin+0x0/0x460) from [<c015d610>] (ext4_da_write_begin+0x124/0x274)
[  134.222005] [<c015d4ec>] (ext4_da_write_begin+0x0/0x274) from [<c009dd94>] (generic_file_buffered_write+0x1c4/0x280)
[  134.233207] [<c009dbd0>] (generic_file_buffered_write+0x0/0x280) from [<c009f594>] (__generic_file_aio_write+0x1e8/0x41c)
[  134.244867] [<c009f3ac>] (__generic_file_aio_write+0x0/0x41c) from [<c009f824>] (generic_file_aio_write+0x5c/0xa4)
[  134.255884] [<c009f7c8>] (generic_file_aio_write+0x0/0xa4) from [<c01545ec>] (ext4_file_write+0xb8/0x454)
[  134.266072] [<c0154534>] (ext4_file_write+0x0/0x454) from [<c00d452c>] (do_sync_write+0x84/0xac)
[  134.275425] [<c00d44a8>] (do_sync_write+0x0/0xac) from [<c00d4c6c>] (vfs_write+0xbc/0x198)
[  134.284211]  r6:ddbc9f78 r5:0001e958 r4:ddbc1740
[  134.289146] [<c00d4bb0>] (vfs_write+0x0/0x198) from [<c00d52b8>] (SyS_write+0x44/0x80)
[  134.297563]  r9:00004000 r8:00000000 r7:0001e958 r6:ddbc1740 r5:00000000
r4:00000000
[  134.305934] [<c00d5274>] (SyS_write+0x0/0x80) from [<c00142e0>] (ret_fast_syscall+0x0/0x30)
[  134.314813]  r9:ddbc8000 r8:c0014488 r7:00000004 r6:00009650 r5:0001ca50
r4:00000000
[  134.323178] Code: e58d4008 e58de00c e59f0008 ebfff497 (e7f001f2)
[  134.329666] ---[ end trace 3b1c5f20208b81c5 ]---
[  134.334578] Kernel panic - not syncing: Fatal exception in interrupt

I've noticed this strange behavior when the file copeid have a size equal or bigger  2KB

While , if i do the same thing form the HOST to DEVICE , all things goes fine. No problems.

I can't figure the reason of this problem :(

Any help is very highly highly highly appreciated 

Best regards

Marco

  • Hi Marco,

    Are you seeing the same behavior any other old TI SDKs or only SDK 7 ?

    Have you tried to sent/receive the files through "tftp" command or any other n/w file transfer commands ?

    Like the BB black , i have two usb slots. One is the host , the second one is  the device (not OTG because is forced to be device. The ID pin is floating. )

    Sorry I'm not aware about AM335x, some how I give you my suggestions and ideas to narrow down the problem.

    Both USB device ports are connected to the same USB controller ( or HUB ) or different USB controller ?

  • Hi Titus :) :)

    nice to hear news from you, thanks a lot for the fast answer .


    I've seen that behavior only with the sdk7 , the one that i've used to develop my distribution. I've seen something similar of my problem (in other linux forum discussions) but with older version of kernel like 2.6.x .... I don't think it could be useful,but i could be wrong.

    Two usb ports are linked directly with a cable. Distribution are identical in kernel and drivers.

    platform 4830e000.lcdc: Driver da8xx_lcdc

    at the host side , when the other board wake up i get

     [   10.774225] usb 2-1: new high-speed USB device number 2 using musb-hdrc
    [   10.915275] usb 2-1: New USB device found, idVendor=0525, idProduct=a4aa
    [   10.922454] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [   10.930107] usb 2-1: Product: CDC Composite Gadget
    [   10.935237] usb 2-1: Manufacturer: Linux 3.12.10 with musb-hdrc
    [   10.959861] cdc_ether 2-1:1.0 usb0: register 'cdc_ether' at usb-musb-hdrc.1.auto-1, CDC Ethernet Device, c6:f8:24:22:b3:f0
    [   11.002504] platform 4830e000.lcdc: Driver da8xx_lcdc requests probe deferral
    [   11.066951] platform 4830e000.lcdc: Driver da8xx_lcdc requests probe deferral
     new cdc_link found ...
    ... link established
    root
    root@localhost:~ > lsusb
    Bus 002 Device 002: ID 0525:a4aa Netchip Technology, Inc. Linux-USB CDC Composite Gadge (Ethernet and ACM)
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


    From device side

    Jul 18 15:56:02  kernel: [    9.036391] platform 4830e000.lcdc: Driver da8xx_lcdc requests probe deferral
    Jul 18 15:56:02  kernel: [    9.047691] of_get_named_gpio_flags: can't parse gpios property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    Jul 18 15:56:02  kernel: [    9.051936] of_get_named_gpio_flags: can't parse gpios property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
    Jul 18 15:56:02  kernel: [    9.096645] platform 4830e000.lcdc: Driver da8xx_lcdc requests probe deferral
    Jul 18 15:56:02 kernel: [    9.114959] musb-hdrc musb-hdrc.0.auto: Enabled SW babble control
    Jul 18 15:56:02  kernel: [    9.145196] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
    Jul 18 15:56:02 kernel: [    9.145220] musb-hdrc: MHDRC RTL version 2.0
    Jul 18 15:56:02  kernel: [    9.145228] musb-hdrc: setup fifo_mode 4
    Jul 18 15:56:02  kernel: [    9.145243] musb-hdrc: 28/31 max ep, 16384/16384 memory
    Jul 18 15:56:02  kernel: [    9.145347] musb-hdrc musb-hdrc.0.auto: MUSB HDRC host driver
    Jul 18 15:56:02  kernel: [    9.173251] musb-hdrc musb-hdrc.0.auto: new USB bus registered, assigned bus number 1
    Jul 18 15:56:02 kernel: [    9.188813] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    Jul 18 15:56:02 kernel: [    9.196016] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    Jul 18 15:56:02 kernel: [    9.203604] usb usb1: Product: MUSB HDRC host driver
    Jul 18 15:56:02 kernel: [    9.208811] usb usb1: Manufacturer: Linux 3.12.10 musb-hcd
    Jul 18 15:56:02 kernel: [    9.214576] usb usb1: SerialNumber: musb-hdrc.0.auto
    Jul 18 15:56:02 kernel: [    9.221748] hub 1-0:1.0: USB hub found
    Jul 18 15:56:02 kernel: [    9.225725] hub 1-0:1.0: 1 port detected
    Jul 18 15:56:02 kernel: [    9.230322] platform 4830e000.lcdc: Driver da8xx_lcdc requests probe deferral
    Jul 18 15:56:02 kernel: [    9.239306] musb-hdrc musb-hdrc.1.auto: Enabled SW babble control
    Jul 18 15:56:02 kernel: [    9.247018] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
    Jul 18 15:56:02 kernel: [    9.247029] musb-hdrc: MHDRC RTL version 2.0
    Jul 18 15:56:02 kernel: [    9.247036] musb-hdrc: setup fifo_mode 4
    Jul 18 15:56:02 kernel: [    9.247051] musb-hdrc: 28/31 max ep, 16384/16384 memory
    Jul 18 15:56:02 kernel: [    9.247144] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
    Jul 18 15:56:02 kernel: [    9.255819] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 2
    Jul 18 15:56:02 kernel: [    9.264852] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
    Jul 18 15:56:02 kernel: [    9.272020] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    Jul 18 15:56:02 kernel: [    9.279595] usb usb2: Product: MUSB HDRC host driver
    Jul 18 15:56:02 kernel: [    9.284821] usb usb2: Manufacturer: Linux 3.12.10 musb-hcd
    Jul 18 15:56:02 kernel: [    9.290574] usb usb2: SerialNumber: musb-hdrc.1.auto
    Jul 18 15:56:02 kernel: [    9.296973] hub 2-0:1.0: USB hub found
    Jul 18 15:56:02 kernel: [    9.300943] hub 2-0:1.0: 1 port detected
    Jul 18 15:56:02 kernel: [    9.305617] platform 4830e000.lcdc: Driver da8xx_lcdc requests probe deferral
    Jul 18 15:56:02 kernel: [    9.330692] platform 4830e000.lcdc: Driver da8xx_lcdc requests probe deferral
    Jul 18 15:56:03 connmand[1241]: eth0 {update} flags 102467 <UP,RUNNING,LOWER_UP>
    Jul 18 15:56:03 connmand[1241]: eth0 {newlink} index 2 address 1C:BA:8C:B7:55:1D mtu 1500
    Jul 18 15:56:03  connmand[1241]: eth0 {newlink} index 2 operstate 6 <UP>
    Jul 18 15:56:03  kernel: [   10.221754] libphy: 4a101000.mdio:00 - Link is Up - 100/Full
    Jul 18 15:56:03  connmand[1241]: Skipping disconnect of carrier, network is connecting.
    Jul 18 15:56:03  connmand[1241]: Setting hostname to elenos
    Jul 18 15:56:03  avahi-daemon[1364]: Registering new address record for 10.0.100.125 on eth0.IPv4.
    Jul 18 15:56:03  connmand[1241]: eth0 {add} address 10.0.100.125/24 label eth0 family 2
    Jul 18 15:56:03  connmand[1241]: eth0 {add} route 10.0.100.254 gw 0.0.0.0 scope 253 <LINK>
    Jul 18 15:56:03  connmand[1241]: eth0 {add} route 208.67.220.220 gw 10.0.100.254 scope 0 <UNIVERSE>
    Jul 18 15:56:04  connmand[1241]: eth0 {add} route 87.106.208.187 gw 10.0.100.254 scope 0 <UNIVERSE>
    Jul 18 15:56:04  connmand[1241]: eth0 {del} route 87.106.208.187 gw 10.0.100.254 scope 0 <UNIVERSE>
    Jul 18 15:56:04  kernel: [   11.187101] udc musb-hdrc.0.auto: registering UDC driver [g_cdc]
    Jul 18 15:56:04  kernel: [   11.204226] using random self ethernet address
    Jul 18 15:56:04  kernel: [   11.209006] using random host ethernet address
    Jul 18 15:56:04  kernel: [   11.230207] userial_init: registered 4 ttyGS* devices
    Jul 18 15:56:04  kernel: [   11.239322] g_cdc gadget: adding config #1 'CDC Composite (ECM + ACM)'/bf0872cc
    Jul 18 15:56:04  kernel: [   11.239390] g_cdc gadget: adding 'cdc_ethernet'/dd316200 to config 'CDC Composite (ECM + ACM)'/bf0872cc
    Jul 18 15:56:04  connmand[1241]: usb0 {create} index 3 type 1 <ETHER>
    Jul 18 15:56:04  connmand[1241]: usb0 {update} flags 4098 <DOWN>
    Jul 18 15:56:04  connmand[1241]: usb0 {newlink} index 3 operstate 2 <DOWN>
    Jul 18 15:56:04  kernel: [   11.246901] usb0: HOST MAC c6:f8:24:22:b3:f0
    Jul 18 15:56:04  kernel: [   11.258493] usb0: MAC 1a:c6:dd:11:c9:34
    Jul 18 15:56:04  connmand[1241]: Adding interface usb0 [ gadget ]
    Jul 18 15:56:04  connmand[1241]: usb0 {newlink} index 3 address 1A:C6:DD:11:C9:34 mtu 1500
    Jul 18 15:56:04  connmand[1241]: usb0 {newlink} index 3 operstate 2 <DOWN>
    Jul 18 15:56:04 kernel: [   11.275958] g_cdc gadget: CDC Ethernet: dual speed IN/ep1in OUT/ep1out NOTIFY/ep2in
    Jul 18 15:56:04  kernel: [   11.276033] g_cdc gadget: adding 'acm'/dd663f00 to config 'CDC Composite (ECM + ACM)'/bf0872cc
    Jul 18 15:56:04  kernel: [   11.276088] g_cdc gadget: acm ttyGS0: dual speed IN/ep3in OUT/ep2out NOTIFY/ep4in
    Jul 18 15:56:04  kernel: [   11.276118] g_cdc gadget: cfg 1/bf0872cc speeds: high full
    Jul 18 15:56:04  kernel: [   11.276142] g_cdc gadget:   interface 0 = cdc_ethernet/dd316200
    Jul 18 15:56:04  kernel: [   11.276164] g_cdc gadget:   interface 1 = cdc_ethernet/dd316200
    Jul 18 15:56:04  kernel: [   11.276186] g_cdc gadget:   interface 2 = acm/dd663f00
    Jul 18 15:56:04  kernel: [   11.276207] g_cdc gadget:   interface 3 = acm/dd663f00
    Jul 18 15:56:04  kernel: [   11.276248] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
    Jul 18 15:56:04  kernel: [   11.284347] g_cdc gadget: g_cdc ready
    Jul 18 15:56:05  kernel: [   11.876808] g_cdc gadget: high-speed config #1: CDC Composite (ECM + ACM)
    Jul 18 15:56:05  kernel: [   11.884088] g_cdc gadget: init ecm
    Jul 18 15:56:05  kernel: [   11.884116] g_cdc gadget: notify connect false
    Jul 18 15:56:05  kernel: [   11.884155] g_cdc gadget: activate acm ttyGS0
    Jul 18 15:56:05  kernel: [   11.884190] g_cdc gadget: acm ttyGS0 serial state 0000
    Jul 18 15:56:05 kernel: [   11.884940] g_cdc gadget: activate ecm
    Jul 18 15:56:05  kernel: [   11.885024] usb0: qlen 10
    Jul 18 15:56:05  kernel: [   11.885045] g_cdc gadget: ecm_close
    Jul 18 15:56:05  kernel: [   11.903547] g_cdc gadget: notify connect false
    Jul 18 15:56:05  kernel: [   11.935675] g_cdc gadget: notify speed 425984000
    Jul 18 15:56:05  connmand[1241]: usb0 {update} flags 69699 <UP,RUNNING,LOWER_UP>
    Jul 18 15:56:05  connmand[1241]: usb0 {newlink} index 3 address 1A:C6:DD:11:C9:34 mtu 1500
    Jul 18 15:56:05  connmand[1241]: usb0 {newlink} index 3 operstate 6 <UP>
    Jul 18 15:56:05  kernel: [   12.458732] usb0: eth_open
    Jul 18 15:56:05  kernel: [   12.458778] usb0: eth_start
    Jul 18 15:56:05  kernel: [   12.458867] g_cdc gadget: ecm_open
    Jul 18 15:56:05  kernel: [   12.458889] g_cdc gadget: notify connect true

    i've tried with netcat command but it seems that it doedn't works because it refuse connection while ssh connection is active

    i've tried tftp command but it goes on timeout both send and recive file

    Now i'm trying to configure proftpd on the host side. the goal is to obtain a transfer with the udp packets. 

    OTHER problem : i've already set up a fuse server with sshfs and transfer works fine from device to host but , when i copy or move a file from the folder , the kernl crash and system panic take place.

    I think to call ghostbuster in certain moments :)

    Best regards

    Marco

  • Marco,

    Please disable CPPI DMA and rebuild the kernel for both boards, if the issue goes away, please try the kernel git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git, branch origin/ti-linux-3.12.y. This is the kernel repo for SDK releases, it is currently on 3.12.25 and have some CPPI DMA bug fixes.

  • Marco,

    I have some questions for your setup.

    Marco Destro said:

    the HOST side ,

    I load

    modprobe am335x

    what is the am335x module? is it supposed to be musb_am335x?

    Marco Destro said:

    FROM E THE DEVICE side

    modprobe libcomposite
    modprobe musb_hdrc
    modprobe musb_am335x
    sleep 1
    modprobe usbnet
    modprobe u_ether
    sleep 1
    modprobe g_cdc
    modprobe u_rndis

    Why you have to load such many gadget modules? I think you only have to do

    # modprobe musb_am335x

    # modprobe g_ether

  • Hi Bin :)

    Thanks a lot for your answers!


    i've typed wrong. You're right it's musb_am335x module.

    You're right too on g_ether.

    The effects on the host are the same.

    Please, could you tell me which files need to be changed?  if the changes are too much , it doesn't matter. I'll clone the repository  of 3.12.15 version and recompile all.

    THANKS A LOT Bin and Titus

    I will let you know as soon as possible if it solves the problem

    Best regards

    Marco

  • Marco,

    I intended to want you to clone the repo, but I found the tree does not have all the MUSB driver fixes I am looking for.

    So before clone the tree, please try the 2nd patch mention in the wiki http://processors.wiki.ti.com/index.php/Sitara_Linux_SDK_MUSB_Issues.

    Let me know if the patch does not fix your issue, I will try to give you a list of MUSB patches from kernel 3.16/3.17.

  • thanks a lot Bin! Your help is very valuable


    Now i'll try to apply the patch and see the changes.

    Again, thanks a lot .

     

  • Hi All, 

    bad news :(
    I tried to put the patch individually in my kernel 3.12.10. so the file cppi41.c is 0724.cppi41_patchato.c and then recompile all  
     
    but the error is still present

    I tried to download the branch 3.12.25 and recompile the kernel but the problem remains.
     
    every time I try send the file from device to host (with scp command ), the host goes to kernel panic state with the same previous error.
     
    have you  other ideas?
     
    Any help is highly appreciated
     
    Marco
  • oops i accidentally edited  the file with + at 333 line in copy paste operation.

    I but I've already tried without that error. The results are as reported above


    marco

  • Marco,

    Have you tried to disable CPPI DMA to isolate if the issue is in the CPPI driver?

    Please give me a couple days, I will collect all the latest MUSB/CPPI related patches from the linux-usb mailing list for you.

  • Hi Bin Liu

    Yes i've tried it. I've disabled the support for cppi41 DMA from menuconfig.

    Unfortunatley the driver musb_am335x doesn't recognize the usb connection.

    Regards

    Marco 

  • Marco,

    Any dmesg log about the failure? Please run the following command to check if you disabled CPPI correctly.

    # zcat /proc/config.gz | grep CPPI

    You should have both following options unset.

    CONFIG_USB_TI_CPPI41_DMA

    CONFIG_TI_CPPI41

  • Hi bin,

    I got this results: on the sheel board

    root@localhost:~ > zcat /proc/config.gz | grep CPPI
    CONFIG_USB_TI_CPPI41_DMA=y
    # CONFIG_TI_CPPI41 is not set

    sorry , i suppose it should be

    # CONFIG_USB_TI_CPPI41_DMA is not set
    # CONFIG_TI_CPPI41 is not set

    I'll correct it and try again.

    Thanks a lot bin

    Marco

  • Hi Bin

    i'm sorry, but I've no success disabling the cppi_DMA in that way :(

    I've a doubt. This could be a trivial question but... i've to recompile some modules too, in order the changes take place?

    have you got some news about the source files?

    best regards 

    Marco

  • Marco,

    Marco Destro said:
    i'm sorry, but I've no success disabling the cppi_DMA in that way :(

    If you still want to go this path, please provide the details of how you did the change, and what dmesg error you got, I will take a look. Disabling CPPI is very trivial, I guess you just missed a simple step.

    Marco Destro said:
    I've a doubt. This could be a trivial question but... i've to recompile some modules too, in order the changes take place?

    After you disabled the CPPI options in .config or menuconfig, you have to rebuild kernel and modules and install them into the filesystem, "make zImage", and "make modules".

    Marco Destro said:
    have you got some news about the source files?

    I am still working on it.

  • Hi Bin Liu


    Problem solved :) removing the DMA support of CPPI41 works.  I've forgot to install the modules properly.

    I repeat. it makes problem only in host mode. In device mode it works fine even with the dma enabled.

    Thanks a lot for the forum support.

    Best regards

    Marco    

  • Marco,

    Thanks for the update.

    If the throughput with DMA disabled does not meet your requirement, here is the list of important patches I collected from mainline kernel releases for SDK 7.0 kernel.

    http://processors.wiki.ti.com/index.php/Sitara_Linux_SDK_MUSB_Issues