How do I get RNDIS back?

Howdy all,

I have a fresh, new Angstrom install as of last night and can ‘bitbake base-image’ without a hitch.

I can even get to ‘make menuconfig’ using the notes from here:
http://wh1t3s.com/2009/05/11/oe-bitake-kernel-mods/

I only changed one thing…

I selected the ‘Ethernet Gadget’ in place of the ‘Composite Gadget’ and now the kernel panics.

I really would like to get back to the one wire to the target but Windows doesn’t have a clue about what to do with the ‘Composite Gadget’ device.

Where did I go wrong?

Thanks!

  • Dan

Silly question: are you sure that handler is being loaded by the
kernel? I've found that if you don't have any gadget support module
loaded and you try to bring up the USB, even in host mode, the kernel
will panic.

I'd raised that issue on LKML, saying that the system shouldn't panic
if the driver wasn't loaded. I was basically told "don't do that".

If you changed what gadget drivers were available but didn't change
whatever boot-time scripts loaded the default gadget it might cause
your symptoms.

Is anyone using the RNDIS USB gadget?

I have made no progress to speak of.

I built the driver in the kernel and it panics and I built the driver as a module and it does as well…

I get the following as soon as I plug in the USB cable:

root@beagleboard:~# insmod /lib/modules/2.6.29-omap1/kernel/drivers/usb/gadget/g_ether.ko
[ 81.436340] g_ether gadget: using random self ethernet address
[ 81.450622] g_ether gadget: using random host ethernet address
[ 81.461395] usb0: MAC 16:d7:d8:e7:d8:f4
[ 81.469390] usb0: HOST MAC 46:3d:6a:4f:77:09
[ 81.477752] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
[ 81.488525] g_ether gadget: g_ether ready
[ 81.496582] musb_hdrc musb_hdrc: MUSB HDRC host driver
[ 81.506347] musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 2
[ 81.522583] usb usb2: configuration #1 chosen from 1 choice
[ 81.532897] hub 2-0:1.0: USB hub found
[ 81.541229] hub 2-0:1.0: 1 port detected
root@beagleboard:~# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
usb0 Link encap:Ethernet HWaddr 16:D7:D8:E7:D8:F4
inet addr:192.168.0.202 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
root@beagleboard:~#

[ 107.294036] g_ether gadget: high speed config #2: RNDIS
[ 107.377044] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[ 107.394744] pgd = c0004000
[ 107.402252] [00000000] *pgd=00000000
[ 107.410644] Internal error: Oops: 17 [#1]
[ 107.419403] Modules linked in: g_ether
[ 107.428070] CPU: 0 Not tainted (2.6.29-omap1 #2)
[ 107.438110] PC is at strlen+0x18/0x2c
[ 107.446868] LR is at rndis_msg_parser+0x3a0/0x7ac [g_ether]
[ 107.457550] pc : [] lr : [] psr: 60000193
[ 107.457550] sp : c056bd88 ip : c056bd98 fp : c056bd94
[ 107.479522] r10: cf1e40e0 r9 : d80ab000 r8 : cf1e40f4
[ 107.489837] r7 : cf1e410c r6 : cf1e40f4 r5 : bf006df4 r4 : 00000000
[ 107.501403] r3 : bf006df4 r2 : 00000000 r1 : bf006e24 r0 : 00000000
[ 107.512878] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel
[ 107.530059] Control: 10c5387d Table: 8f05c019 DAC: 00000017
[ 107.540893] Process swapper (pid: 0, stack limit = 0xc056a2e8)
[ 107.551849] Stack: (0xc056bd88 to 0xc056c000)
[ 107.561248] bd80: c056bdbc c056bd98 bf0027fc c01c6768 cf042920 cf042720
[ 107.579864] bda0: 00000000 00000000 d80ab100 d80ab100 c056bde4 c056bdc0 bf002c34 bf002468
[ 107.598693] bdc0: bf003794 bf001dc8 c056be04 cf042720 cf98c1b4 00000000 c056be14 c056bde8
[ 107.618133] bde0: c02e5710 bf002c14 c02e5710 00000000 00000008 cf98c0f0 00000c78 cf042738
[ 107.637725] be00: cf98c0f0 cf042720 c056be6c c056be18 c02e4c20 c02e5634 c02e699c c02e5634
[ 107.657867] be20: c056be5c c056be30 c00794d4 c004883c c056be6c c056be40 c00794d4 c004883c
[ 107.678649] be40: c05afd30 40000113 00000000 cf98c0f0 00000000 00000008 00000099 0000001f
[ 107.699951] be60: c056beb4 c056be70 c02e393c c02e4998 c056beb0 00000000 c056e00c c003be6c
[ 107.721649] be80: c056beac 000000f0 c007539c 40000113 00000000 00000000 0000005c c05a8548
[ 107.743743] bea0: 411fc083 0000001f c056becc c056beb8 c02e3e18 c02e3198 60000193 cfa2d640
[ 107.766448] bec0: c056beec c056bed0 c0088048 c02e3dc0 c0579cc4 0000005c c056e00c c003be6c
[ 107.789398] bee0: c056bf04 c056bef0 c00894cc c0088018 0000005c 00000000 c056bf1c c056bf08
[ 107.812561] bf00: c003a058 c0089444 ffffffff d8200000 c056bf8c c056bf20 c003aa30 c003a00c
[ 107.836059] bf20: c056bf58 a0000013 00c5e7bb 00000000 c00463bc c056a000 c056e00c c003be6c
[ 107.859710] bf40: c05a8548 411fc083 0000001f c056bf8c c056bf90 c056bf68 c003be3c c00464b8
[ 107.883361] bf60: 60000013 ffffffff c00463bc c056a000 c056e00c c003be6c c05a8548 0000001f
[ 107.907043] bf80: c056bfb4 c056bf90 c003be3c c00463c8 c05a8104 c05e1cf4 c05a8104 c002dea4
[ 107.930694] bfa0: c056dea0 8002b700 c056bfc4 c056bfb8 c04205c4 c003bdf8 c056bff4 c056bfc8
[ 107.954345] bfc0: c0008950 c0420578 c0008468 00000000 00000000 c002dea4 00000000 10c5387d
[ 107.977996] bfe0: c05a85b4 c002e2a8 00000000 c056bff8 80008034 c0008714 00000000 00000000
[ 108.001678] Backtrace:
[ 108.011444] [] (strlen+0x0/0x2c) from [] (rndis_msg_parser+0x3a0/0x7ac [g_ether])
[ 108.035552] [] (rndis_msg_parser+0x0/0x7ac [g_ether]) from [] (rndis_command_complete+0x2c/0x74 [g_ether])
[ 108.062011] [] (rndis_command_complete+0x0/0x74 [g_ether]) from [] (musb_g_giveback+0xe8/0x10c)
[ 108.087463] r6:00000000 r5:cf98c1b4 r4:cf042720
[ 108.099517] [] (musb_g_giveback+0x0/0x10c) from [] (musb_g_ep0_irq+0x294/0xa5c)
[ 108.123260] r7:cf042720 r6:cf98c0f0 r5:cf042738 r4:00000c78
[ 108.136322] [] (musb_g_ep0_irq+0x0/0xa5c) from [] (musb_interrupt+0x7b0/0xc28)
[ 108.159851] [] (musb_interrupt+0x0/0xc28) from [] (generic_interrupt+0x64/0x7c)
[ 108.183471] [] (generic_interrupt+0x0/0x7c) from [] (handle_IRQ_event+0x3c/0x74)
[ 108.207214] r4:cfa2d640
[ 108.216766] [] (handle_IRQ_event+0x0/0x74) from [] (handle_level_irq+0x94/0xec)
[ 108.239990] r7:c003be6c r6:c056e00c r5:0000005c r4:c0579cc4
[ 108.252807] [] (handle_level_irq+0x0/0xec) from [] (__exception_text_start+0x58/0x70)
[ 108.276489] r5:00000000 r4:0000005c
[ 108.286895] [] (__exception_text_start+0x0/0x70) from [] (__irq_svc+0x30/0x80)
[ 108.309753] Exception stack(0xc056bf20 to 0xc056bf68)
[ 108.321777] bf20: c056bf58 a0000013 00c5e7bb 00000000 c00463bc c056a000 c056e00c c003be6c
[ 108.344055] bf40: c05a8548 411fc083 0000001f c056bf8c c056bf90 c056bf68 c003be3c c00464b8
[ 108.366241] bf60: 60000013 ffffffff
[ 108.388092] r5:d8200000 r4:ffffffff
[ 108.398193] [] (omap3_pm_idle+0x0/0x130) from [] (cpu_idle+0x50/0x80)
[ 108.419494] [] (cpu_idle+0x0/0x80) from [] (rest_init+0x58/0x6c)
[ 108.440460] r8:8002b700 r7:c056dea0 r6:c002dea4 r5:c05a8104 r4:c05e1cf4
[ 108.453979] [] (rest_init+0x0/0x6c) from [] (start_kernel+0x248/0x2a4)
[ 108.475341] [] (start_kernel+0x0/0x2a4) from [<80008034>] (0x80008034)
[ 108.496002] r6:c002e2a8 r5:c05a85b4 r4:10c5387d
[ 108.507354] Code: e24cb004 e1a02000 ea000000 e2800001 (e5d03000)
[ 108.520324] Kernel panic - not syncing: Fatal exception in interrupt