RE: State of g_ether/RNDIS?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michal, here's the output you'd asked for.

I forgot to point out in my last post that in order to stop the panics and get output, I changed fsl_ep_queue() to return -EINVAL when called after fsl_ep_disable() with a NULL "struct usb_endpoint_descriptor *desc".

I've attached two WinXP-SP3 USB Deview html exports (re-posting with text attachments as it was blocked form the list). The first is when plugging in the device with no configuration (previously uninstalled by USB Deview). The second is after unplugging and re-plugging the cable. It seems to get further, as can be seen by USB Deview, and also the Network Control Panel shows the connection as enabled but only briefly before remaining disabled.

As for "lsusb", I was not able to get any output. The applet in busybox didn't have the options you used ("lsusb -vv -d 0525:"), so I built the latest usbutils from SourceForge.net (v0.86). Still it only appears to display info from the port configured in host mode. The port configured for g_ether/RNDIS list nothing even with the -d filter removed and successfully working with a WinCE device.

Instead here's the output from /proc/driver/rndis-000 and /proc/driver/fsl_usb2_udc:

root$ cat /proc/driver/rndis-000 
Config Nr. 0
used      : y
state     : RNDIS_INITIALIZED
medium    : 0x00000000
speed     : 9728000
cable     : connected
vendor ID : 0x00000000
vendor    : <NULL>


root$ cat /proc/driver/fsl_usb2_udc 
ARC USBOTG Device Controller driver
fsl-usb2-udc version: 1 August 2005
Gadget driver: g_ether

USBCTRL Reg = 40041275

USBCMD Reg:
        SetupTW: 0
        Run/Stop: Run

USB Status Reg:
        Dr Suspend: 0 Reset Received: 0 System Error: Normal USB Error Interrupt: No err

USB Intrrupt Enable Reg:
        Sleep Enable: 1 SOF Received Enable: 0 Reset Enable: 1
        System Error Enable: 1 Port Change Dectected Enable: 1
        USB Error Intr Enable: 1 USB Intr Enable: 1

USB Frame Index Reg: Frame Number is 0x3670

USB Device Address Reg: Device Addr is 0x4000000

USB Endpoint List Address Reg: Device Addr is 0x83b43000

USB Port Status & Control Reg:
        Port Transceiver Type: UTMI Port Speed: Full Speed 
        PHY Low Power Suspend: Low power mode Port Reset: Not in Reset Port Suspend Mode: Not in 
        Over-current Change: No Port Enable/Disable Change: No change
        Port Enabled/Disabled: Enable Current Connect Status: Attached

USB Mode Reg: Controller Mode is Device Controller

Endpoint Setup Status Reg: SETUP on ep 0x0

EP Ctrl Reg [0x0]: = [0x800080]
EP Ctrl Reg [0x1]: = [0x880088]
EP Ctrl Reg [0x2]: = [0x8c0000]
EP Ctrl Reg [0x3]: = [0x0]
EP Ctrl Reg [0x4]: = [0x0]
EP Ctrl Reg [0x5]: = [0x0]
EP Ctrl Reg [0x6]: = [0x0]
EP Ctrl Reg [0x7]: = [0x0]

EP Prime Reg = [0x0]

For ep0 Maxpkt is 0x40 index is 0x0
req c3b71860 actual 0x20 length 0x20  buf c3b44e00

For ep1out Maxpkt is 0x40 index is 0x1
req c1a531a0 actual 0x640 length0x640  buf c154b802
req c14ab480 actual 0x640 length0x640  buf c1520002

For ep1in Maxpkt is 0x40 index is 0x1
its req queue is empty


For ep2in Maxpkt is 0x8 index is 0x2
its req queue is empty


Best regards,
Marc

-----Original Message-----
From: linux-usb-owner@xxxxxxxxxxxxxxx [mailto:linux-usb-owner@xxxxxxxxxxxxxxx] On Behalf Of Marc St-Jean
Sent: April 28, 2011 5:19 PM
To: linux-usb@xxxxxxxxxxxxxxx
Cc: Michal Nazarewicz
Subject: RE: State of g_ether/RNDIS?

I got my hands on a WinCE 6.0 based device and the g_ether/RNDIS appears to run correctly with it. 

Trying to track down what is going on with Win XP SP3, I captured some kernel logs (left some "fsl_ep_enable" output in there in case it's of any help). In both cases, the target board was freshly booted, the usb0 device ifconfig'd and a DHCP server started.

With WinCE there are fewer exchanges before "init rndis" and "rndis open" appear. That's followed by "rndis_set_param_dev:", "rndis req21.00 v0000 i0000 l24", "rndis_msg_parser: REMOTE_NDIS_INITIALIZE_MSG" and many others.

With WinXP there is a longer exchange before "init rndis" and "rndis open" appear. Then "rndis_set_param_dev:", "rndis req21.00 v0000 i0000 l24" are followed by "g_ether gadget: suspend".

It seems like WinXP doesn't like that "rndis req21.00 v0000 i0000 l24" and fails to reply so linux  g_ether/RNDIS times out 5 seconds later.

Anyone familiar with RNDIS protocol have ideas of what may be happening here?

Thanks.
Marc

WinCE 6.0 (working):

Apr 28 19:11:07 freescale kernel: g_ether gadget: suspend
Apr 28 19:11:07 freescale kernel: g_ether gadget: resume
Apr 28 19:11:07 freescale kernel: g_ether gadget: suspend
Apr 28 19:11:07 freescale kernel: g_ether gadget: resume
Apr 28 19:11:08 freescale kernel: g_ether gadget: setup complete --> -108, 8/8
Apr 28 19:11:08 freescale last message repeated 2 times
Apr 28 19:11:08 freescale kernel: g_ether gadget: setup complete --> -108, 8/8
Apr 28 19:11:08 freescale kernel: g_ether gadget: setup complete --> -108, 18/18
Apr 28 19:11:08 freescale kernel: g_ether gadget: setup complete --> -108, 9/9
Apr 28 19:11:08 freescale kernel: g_ether gadget: setup complete --> -108, 67/67
Apr 28 19:11:08 freescale kernel: g_ether gadget: setup complete --> -108, 9/9
Apr 28 19:11:08 freescale kernel: g_ether gadget: full speed config #2: RNDIS
Apr 28 19:11:08 freescale kernel: fsl_ep_enable:
Apr 28 19:11:08 freescale kernel: fsl_ep_enable: desc = c3b49e84
Apr 28 19:11:08 freescale kernel: g_ether gadget: init rndis
Apr 28 19:11:08 freescale kernel: g_ether gadget: RNDIS RX/TX early activation ... 
Apr 28 19:11:08 freescale kernel: fsl_ep_enable:
Apr 28 19:11:08 freescale kernel: fsl_ep_enable: desc = c3b49e94
Apr 28 19:11:08 freescale kernel: fsl_ep_enable:
Apr 28 19:11:08 freescale kernel: fsl_ep_enable: desc = c3b49e9b
Apr 28 19:11:08 freescale kernel: usb0: qlen 2
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis_open
Apr 28 19:11:08 freescale kernel: rndis_set_param_medium: 0 97280
Apr 28 19:11:08 freescale kernel: usb0: eth_start
Apr 28 19:11:08 freescale kernel: rndis_set_param_dev:
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l24
Apr 28 19:11:08 freescale kernel: rndis_msg_parser: REMOTE_NDIS_INITIALIZE_MSG
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l28
Apr 28 19:11:08 freescale kernel: gen_ndis_query_resp: OID_GEN_SUPPORTED_LIST
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:08 freescale kernel: gen_ndis_query_resp: OID_GEN_VENDOR_DRIVER_VERSION
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:08 freescale kernel: gen_ndis_query_resp: OID_GEN_MAXIMUM_FRAME_SIZE
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:08 freescale kernel: gen_ndis_query_resp: OID_802_3_MAXIMUM_LIST_SIZE
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l34
Apr 28 19:11:08 freescale kernel: gen_ndis_query_resp: OID_802_3_CURRENT_ADDRESS
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:08 freescale kernel: gen_ndis_query_resp: OID_GEN_PHYSICAL_MEDIUM
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:08 freescale kernel: gen_ndis_query_resp: OID_GEN_MAXIMUM_FRAME_SIZE
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:08 freescale last message repeated 2 times
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l34
Apr 28 19:11:08 freescale kernel: gen_ndis_query_resp: OID_802_3_CURRENT_ADDRESS
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:08 freescale kernel: gen_ndis_query_resp: OID_GEN_MAXIMUM_FRAME_SIZE
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:08 freescale last message repeated 2 times
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:08 freescale last message repeated 2 times
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:08 freescale kernel: gen_ndis_query_resp: OID_GEN_PHYSICAL_MEDIUM
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:08 freescale last message repeated 2 times
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l36
Apr 28 19:11:08 freescale last message repeated 2 times
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l36
Apr 28 19:11:08 freescale last message repeated 2 times
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:08 freescale last message repeated 2 times
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:08 freescale last message repeated 2 times
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:08 freescale kernel: gen_ndis_set_resp: OID_GEN_CURRENT_PACKET_FILTER 0000000b
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:08 freescale last message repeated 2 times
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:08 freescale last message repeated 2 times
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:08 freescale kernel: gen_ndis_query_resp: OID_GEN_PHYSICAL_MEDIUM
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:08 freescale last message repeated 2 times
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:08 freescale last message repeated 2 times
Apr 28 19:11:08 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:11 freescale last message repeated 9 times
Apr 28 19:11:11 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l34
Apr 28 19:11:11 freescale kernel: gen_ndis_set_resp: OID_802_3_MULTICAST_LIST
Apr 28 19:11:11 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:13 freescale last message repeated 3 times
Apr 28 19:11:13 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:13 freescale last message repeated 2 times
Apr 28 19:11:13 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:13 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:13 freescale last message repeated 2 times
Apr 28 19:11:13 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:18 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:18 freescale last message repeated 2 times
Apr 28 19:11:18 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:18 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:18 freescale last message repeated 2 times
Apr 28 19:11:18 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:18 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:18 freescale last message repeated 2 times
Apr 28 19:11:18 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:18 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:18 freescale last message repeated 2 times
Apr 28 19:11:18 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:18 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:18 freescale kernel: gen_ndis_query_resp: OID_GEN_PHYSICAL_MEDIUM
Apr 28 19:11:18 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:18 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:18 freescale last message repeated 2 times
Apr 28 19:11:18 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:18 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l36
Apr 28 19:11:18 freescale last message repeated 2 times
Apr 28 19:11:18 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:18 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l36
Apr 28 19:11:18 freescale last message repeated 2 times
Apr 28 19:11:18 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:18 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:18 freescale last message repeated 2 times
Apr 28 19:11:18 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:18 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:18 freescale last message repeated 2 times
Apr 28 19:11:18 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:19 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:19 freescale last message repeated 2 times
Apr 28 19:11:19 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:19 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:19 freescale last message repeated 2 times
Apr 28 19:11:19 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:19 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:19 freescale last message repeated 2 times
Apr 28 19:11:19 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:19 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:19 freescale kernel: gen_ndis_query_resp: OID_GEN_PHYSICAL_MEDIUM
Apr 28 19:11:19 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:19 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:19 freescale last message repeated 2 times
Apr 28 19:11:19 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:19 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l36
Apr 28 19:11:19 freescale last message repeated 2 times
Apr 28 19:11:19 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:19 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l36
Apr 28 19:11:19 freescale last message repeated 2 times
Apr 28 19:11:19 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:19 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:19 freescale last message repeated 2 times
Apr 28 19:11:19 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025
Apr 28 19:11:19 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l32
Apr 28 19:11:19 freescale last message repeated 2 times
Apr 28 19:11:19 freescale kernel: g_ether gadget: rndis reqa1.01 v0000 i0000 l1025


WinXP SP3 (not working)
Apr 28 22:37:54 freescale kernel: g_ether gadget: suspend
Apr 28 22:37:55 freescale kernel: g_ether gadget: resume
Apr 28 22:37:55 freescale kernel: g_ether gadget: suspend
Apr 28 22:37:55 freescale kernel: g_ether gadget: resume
Apr 28 22:37:55 freescale kernel: g_ether gadget: setup complete --> -108, 18/18
Apr 28 22:37:55 freescale last message repeated 2 times
Apr 28 22:37:55 freescale kernel: g_ether gadget: setup complete --> -108, 18/18
Apr 28 22:37:55 freescale kernel: g_ether gadget: setup complete --> -108, 9/9
Apr 28 22:37:55 freescale kernel: g_ether gadget: setup complete --> -108, 67/67
Apr 28 22:37:55 freescale kernel: g_ether gadget: setup complete --> -108, 10/10
Apr 28 22:37:55 freescale kernel: g_ether gadget: setup complete --> -108, 4/4
Apr 28 22:37:55 freescale kernel: g_ether gadget: setup complete --> -108, 44/44
Apr 28 22:37:55 freescale kernel: g_ether gadget: setup complete --> -108, 4/4
Apr 28 22:37:56 freescale kernel: g_ether gadget: setup complete --> -108, 44/44
Apr 28 22:37:56 freescale kernel: g_ether gadget: setup complete --> -108, 18/18
Apr 28 22:37:56 freescale kernel: g_ether gadget: setup complete --> -108, 9/9
Apr 28 22:37:56 freescale kernel: g_ether gadget: setup complete --> -108, 67/67
Apr 28 22:37:56 freescale kernel: g_ether gadget: full speed config #2: RNDIS
Apr 28 22:37:56 freescale kernel: fsl_ep_enable:
Apr 28 22:37:56 freescale kernel: fsl_ep_enable: desc = c3ae3e84
Apr 28 22:37:56 freescale kernel: g_ether gadget: init rndis
Apr 28 22:37:56 freescale kernel: g_ether gadget: RNDIS RX/TX early activation ... 
Apr 28 22:37:56 freescale kernel: fsl_ep_enable:
Apr 28 22:37:56 freescale kernel: fsl_ep_enable: desc = c3ae3e94
Apr 28 22:37:56 freescale kernel: fsl_ep_enable:
Apr 28 22:37:56 freescale kernel: fsl_ep_enable: desc = c3ae3e9b
Apr 28 22:37:56 freescale kernel: usb0: qlen 2
Apr 28 22:37:56 freescale kernel: g_ether gadget: rndis_open
Apr 28 22:37:56 freescale kernel: rndis_set_param_medium: 0 97280
Apr 28 22:37:56 freescale kernel: usb0: eth_start
Apr 28 22:37:56 freescale kernel: rndis_set_param_dev:
Apr 28 22:37:56 freescale kernel: g_ether gadget: rndis req21.00 v0000 i0000 l24
Apr 28 22:38:01 freescale kernel: g_ether gadget: suspend


-----Original Message-----
From: linux-usb-owner@xxxxxxxxxxxxxxx [mailto:linux-usb-owner@xxxxxxxxxxxxxxx] On Behalf Of Marc St-Jean
Sent: April 27, 2011 1:52 PM
To: linux-usb@xxxxxxxxxxxxxxx
Cc: Michal Nazarewicz
Subject: RE: State of g_ether/RNDIS?

Thanks Michal, it's good to hear g_ether/RNDIS should be working on 2.6.31.

Yes I have tried that latest version of the INF file but it didn't make a difference, at this point I think there is one or two other issues. I will gather more info on the Windows side but first I wanted to bring up the first issue which might effect what it going on later during the RNDIS protocol exchange.

After plugging in the USB cable we get a panic. I believe it doesn't occur until we attempt to install the driver/INF on the Windows side, but after that it always occurs when unplugging and replugging.

I've added debugging and see that rndis_response_available() passes fsl_ep_queue() an ep who's container has a "struct usb_endpoint_descriptor *desc" which is NULL. This desc is set as part of enabling the ep in fsl_ep_enable() and cleared in  fsl_ep_disable(). For some reason replugging in the cable causes 3  fsl_ep_disable(), 2 fsl_ep_queue() and then 3 fsl_ep_enable().

The first of the two fsl_ep_queue() is called with the ep containing the NULL desc.

>From the trace below does anyone familiar with the RNDIS code have any idea why rndis_response_available() would call  fsl_ep_queue() after a fsl_ep_disable()?
Marc

P.S. I should also point out the port is FS not HS in case that makes a difference.


Unable to handle kernel NULL pointer dereference at virtual address 00000002
pgd = c0004000
[00000002] *pgd=00000000
Internal error: Oops: 17 [#1] PREEMPT
Modules linked in:
CPU: 0    Not tainted  (2.6.31-4.1.1 #4)
PC is at fsl_ep_queue+0x20/0x460
LR is at rndis_response_available+0x54/0x7c
pc : [<c0303b00>]    lr : [<c03056e8>]    psr: a0000093
sp : c0521e50  ip : 00000018  fp : 00000000
r10: 00000000  r9 : 00000000  r8 : 00000002
r7 : 00000000  r6 : 00000001  r5 : c3b30940  r4 : c3b28740
r3 : 00000000  r2 : 00000020  r1 : c3b28740  r0 : c3b30940
Flags: NzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 0005317f  Table: 83264000  DAC: 00000017
Process swapper (pid: 0, stack limit = 0xc0520270)
Stack: (0xc0521e50 to 0xc0522000)
1e40:                                     c3b30940 c3b28740 00000020 c3b38560 
1e60: 00000000 00000001 00000000 00000002 00000000 00000000 00000000 c03056e8 
1e80: c0596dc0 c03074fc c3b38560 c3b28860 c3b28860 c3b3dae0 fde070c0 00000001 
1ea0: c3b19000 c03075cc c3b30800 c3b28860 c3b28860 c3b30800 00000001 c0303904 
1ec0: 00010001 c3b30800 c3b30818 00000000 00000040 00000001 00000100 c03046c0 
1ee0: c48a8000 c3b19000 c3b190dc c0304a84 1d16952e c0528b88 00000001 00074138 
1f00: 1d16952e 000013be 20000013 c0521f38 000f6cb8 c055b820 00000002 c3b3db20 
1f20: c0520000 c3b3db20 00000025 00000001 00000000 00000000 00000000 c014a16c 
1f40: c052c318 00000025 c3b3db20 00000002 00000001 c0520000 80023e08 c014bfbc 
1f60: 00000025 00000000 00250000 c00fe064 80000013 ffffffff fc400000 c00fe9e8 
1f80: 00000000 0005317f 0005217f 80000013 c0520000 c00f6e18 c00f6e14 c0523af8 
1fa0: 80023e3c 41069264 80023e08 00000000 800000d3 c0521fc8 c00ff850 c00ff85c 
1fc0: 80000013 ffffffff c00ff830 c00ffd38 c058cb40 c00088ec c0008448 00000000 
1fe0: 00000000 c00f6e18 00000000 00053175 c0553e04 80008034 00000000 00000000 
[<c0303b00>] (fsl_ep_queue+0x20/0x460) from [<c03056e8>] (rndis_response_available+0x54/0x7c)
[<c03056e8>] (rndis_response_available+0x54/0x7c) from [<c03074fc>] (rndis_msg_parser+0x6f0/0x7a0)
[<c03074fc>] (rndis_msg_parser+0x6f0/0x7a0) from [<c03075cc>] (rndis_command_complete+0x20/0x64)
[<c03075cc>] (rndis_command_complete+0x20/0x64) from [<c0303904>] (done+0xdc/0xf8)
[<c0303904>] (done+0xdc/0xf8) from [<c03046c0>] (T.592+0x30/0x40)
[<c03046c0>] (T.592+0x30/0x40) from [<c0304a84>] (fsl_udc_irq+0x138/0x8ec)
[<c0304a84>] (fsl_udc_irq+0x138/0x8ec) from [<c014a16c>] (handle_IRQ_event+0xa8/0x1e4)
[<c014a16c>] (handle_IRQ_event+0xa8/0x1e4) from [<c014bfbc>] (handle_level_irq+0xc0/0x140)
[<c014bfbc>] (handle_level_irq+0xc0/0x140) from [<c00fe064>] (_text+0x64/0x80)
[<c00fe064>] (_text+0x64/0x80) from [<c00fe9e8>] (__irq_svc+0x48/0x88)
Exception stack(0xc0521f80 to 0xc0521fc8)
1f80: 00000000 0005317f 0005217f 80000013 c0520000 c00f6e18 c00f6e14 c0523af8 
1fa0: 80023e3c 41069264 80023e08 00000000 800000d3 c0521fc8 c00ff850 c00ff85c 
1fc0: 80000013 ffffffff                                                       
[<c00fe9e8>] (__irq_svc+0x48/0x88) from [<c00ff85c>] (default_idle+0x2c/0x30)
[<c00ff85c>] (default_idle+0x2c/0x30) from [<c00ffd38>] (cpu_idle+0x60/0xb8)
[<c00ffd38>] (cpu_idle+0x60/0xb8) from [<c00088ec>] (start_kernel+0x260/0x2b8)
[<c00088ec>] (start_kernel+0x260/0x2b8) from [<80008034>] (0x80008034)
Code: e5943000 e3530000 0a00010b e5903028 (e5d32002) 
Kernel panic - not syncing: Fatal exception in interrupt
Rebooting in 5 seconds..



-----Original Message-----
From: Michał Nazarewicz [mailto:mnazarewicz@xxxxxxxxx] On Behalf Of Michal Nazarewicz
Sent: April 26, 2011 10:35 AM
To: linux-usb@xxxxxxxxxxxxxxx; Marc St-Jean
Subject: Re: State of g_ether/RNDIS?

On Tue, 26 Apr 2011 17:55:55 +0200, Marc St-Jean <Marc.St-Jean@xxxxxxxxxx>  
wrote:
> I'm new to the list and I wonder if I could get some help/orientation
> with regards to the state of g_ether/RNDIS?

> We are not trying to get a multi-function device working at this point,
> simply a static configured g_ether/RNDIS.  Should the existing kernel
> code work without patches?

Yes, g_ether should work without any additional patches.  I've updated
the Documentation/usb/linux.inf file in June 2010 (see 90eef5b8acb45:
USB: gadget: g_ether: updated INF file) and it should work with anything
starting with Windows XP SP3.

Could you elaborate on the symptoms on Windows?  Could you try installing
<http://www.nirsoft.net/utils/usb_devices_view.html> and say what it says?
(Or at least connecting the device to Linux host and issue
"lsusb -vv -d 0525:".)

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michal "mina86" Nazarewicz    (o o)
ooo +-----<email/xmpp: mnazarewicz@xxxxxxxxxx>-----ooO--(_)--Ooo--
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
      USB Devices List


        Created by using USBDeview <http://www.nirsoft.net/>

Device Name 	Description 	Device Type 	Connected 	Safe To Unplug
Disabled 	USB Hub 	Drive Letter 	Serial Number 	Created Date 	Last
Plug/Unplug Date 	VendorID 	ProductID 	Firmware Revision 	USB Class 	USB
SubClass 	USB Protocol 	Hub / Port 	Computer Name 	Vendor Name 	Product
Name 	ParentId Prefix 	Service Name 	Service Description 	Driver
Filename 	Device Class 	Device Mfg 	Power 	Driver Description 	Driver
Version 	Instance ID
RNDIS/Ethernet Gadget	USB Ethernet/RNDIS Gadget	Communication
No	No	No	No	 	 	02/05/2011 3:41:12 PM	02/05/2011 3:41:29 PM	0525	a4a2
3.25	02	02	ff	Hub 1, Port 1	 	 	 	 	USB_RNDIS	USB Remote NDIS Network
Device Driver	usb8023.sys	Net	Acer Incorporated.	 	USB Ethernet/RNDIS
Gadget	1.0.0.0	USB\Vid_0525&Pid_a4a2\5&29574ba5&0&1

      USB Devices List


        Created by using USBDeview <http://www.nirsoft.net/>

Device Name 	Description 	Device Type 	Connected 	Safe To Unplug
Disabled 	USB Hub 	Drive Letter 	Serial Number 	Created Date 	Last
Plug/Unplug Date 	VendorID 	ProductID 	Firmware Revision 	USB Class 	USB
SubClass 	USB Protocol 	Hub / Port 	Computer Name 	Vendor Name 	Product
Name 	ParentId Prefix 	Service Name 	Service Description 	Driver
Filename 	Device Class 	Device Mfg 	Power 	Driver Description 	Driver
Version 	Instance ID
RNDIS/Ethernet Gadget	USB Ethernet/RNDIS Gadget	Communication	Yes
Yes	No	No	 	 	02/05/2011 3:41:12 PM	02/05/2011 3:46:21 PM	0525	a4a2
3.25	02	02	ff	Hub 1, Port 1	 	 	 	 	USB_RNDIS	USB Remote NDIS Network
Device Driver	usb8023.sys	Net	Acer Incorporated.	2 mA	USB Ethernet/RNDIS
Gadget	1.0.0.0	USB\Vid_0525&Pid_a4a2\5&29574ba5&0&1


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux