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