RNDIS USB ethernet gadget problem with super speed connection net338x

From: Simon Appleby
Date: Fri Jan 22 2016 - 05:43:01 EST


Hi,

I am working with the PLX/Avago net3382 connected via PCIe to an ARM
controller. I have the kernel configured to use the net338x as an RNDIS
gadget and when a USB2 cable is plugged into the board the windows test
host correctly enumerates the gadget and I am able to setup and ethernet
across the connection.

However, if I use a super speed cable there appears to be a problem after
the initial transfer of the descriptors that I don¹t understand. The
windows host shows the gadget as working initially, but after a short
delay of a few seconds marks it as code 10 (This device cannot start).

Am I right in thinking the problems start after the first non-core control
request?
Any help with debugging this problem or at least pointing me in the right
direction would be most appreciated.


Best Regards

Simon Appleby




uname -a
Linux usb_test 3.19.8 #6 Fri Jan 22 09:47:38 GMT 2016 armv5tel GNU/Linux



Log output with USB3 cable
Jan 10 21:30:54 (none) user.debug kernel: net2280 0000:05:00.0: super-speed
Jan 10 21:30:54 (none) user.debug kernel: net2280 0000:05:00.0: setup
80.06 v0100 i0000 l0040 ep_cfg 00000000
Jan 10 21:30:54 (none) user.debug kernel: net2280 0000:05:00.0: write ep0
fifo (IN) 18 bytes (short) req cf98ba80
Jan 10 21:30:54 (none) user.debug kernel: g_ether gadget: setup complete
--> 0, 0/18
Jan 10 21:30:54 (none) user.debug kernel: net2280 0000:05:00.0: setup
80.06 v0100 i0000 l0012 ep_cfg 00000000
Jan 10 21:30:54 (none) user.debug kernel: net2280 0000:05:00.0: write ep0
fifo (IN) 18 bytes (short) req cf98ba80
Jan 10 21:30:54 (none) user.debug kernel: g_ether gadget: setup complete
--> 0, 0/18
Jan 10 21:30:54 (none) user.debug kernel: net2280 0000:05:00.0: setup
80.06 v0200 i0000 l00ff ep_cfg 00000000
Jan 10 21:30:54 (none) user.debug kernel: net2280 0000:05:00.0: write ep0
fifo (IN) 93 bytes (short) req cf98ba80
Jan 10 21:30:54 (none) user.debug kernel: g_ether gadget: setup complete
--> 0, 0/93
Jan 10 21:30:54 (none) user.debug kernel: net2280 0000:05:00.0: setup
80.06 v0f00 i0000 l0005 ep_cfg 00000000
Jan 10 21:30:54 (none) user.debug kernel: net2280 0000:05:00.0: write ep0
fifo (IN) 5 bytes (short) req cf98ba80
Jan 10 21:30:54 (none) user.debug kernel: g_ether gadget: setup complete
--> 0, 0/5
Jan 10 21:30:54 (none) user.debug kernel: net2280 0000:05:00.0: setup
80.06 v0f00 i0000 l0016 ep_cfg 00000000
Jan 10 21:30:54 (none) user.debug kernel: net2280 0000:05:00.0: write ep0
fifo (IN) 22 bytes (short) req cf98ba80
Jan 10 21:30:54 (none) user.debug kernel: g_ether gadget: setup complete
--> 0, 0/22
Jan 10 21:30:54 (none) user.debug kernel: net2280 0000:05:00.0: setup
80.06 v0300 i0000 l00ff ep_cfg 00000000
Jan 10 21:30:54 (none) user.debug kernel: net2280 0000:05:00.0: write ep0
fifo (IN) 4 bytes (short) req cf98ba80
Jan 10 21:30:54 (none) user.debug kernel: g_ether gadget: setup complete
--> 0, 0/4
Jan 10 21:30:54 (none) user.debug kernel: net2280 0000:05:00.0: setup
80.06 v0302 i0409 l00ff ep_cfg 00000000
Jan 10 21:30:54 (none) user.debug kernel: net2280 0000:05:00.0: write ep0
fifo (IN) 44 bytes (short) req cf98ba80
Jan 10 21:30:54 (none) user.debug kernel: g_ether gadget: setup complete
--> 0, 0/44
Jan 10 21:30:54 (none) user.debug kernel: net2280 0000:05:00.0: setup
80.06 v0100 i0000 l0012 ep_cfg 00000000
Jan 10 21:30:54 (none) user.debug kernel: net2280 0000:05:00.0: write ep0
fifo (IN) 18 bytes (short) req cf98ba80
Jan 10 21:30:54 (none) user.debug kernel: g_ether gadget: setup complete
--> 0, 0/18
Jan 10 21:30:54 (none) user.debug kernel: net2280 0000:05:00.0: setup
00.09 v0002 i0000 l0000 ep_cfg 00040400
Jan 10 21:30:54 (none) user.info kernel: g_ether gadget: super-speed
config #2: RNDIS
Jan 10 21:30:54 (none) user.debug kernel: g_ether gadget: init rndis
Jan 10 21:30:54 (none) user.debug kernel: g_ether gadget: RNDIS RX/TX
early activation ...
Jan 10 21:30:54 (none) user.debug kernel: net2280 0000:05:00.0: enabled
ep-a (ep1in-bulk) dma max 0400
Jan 10 21:30:54 (none) user.debug kernel: net2280 0000:05:00.0: enabled
ep-b (ep1out-bulk) dma max 0400
Jan 10 21:30:54 (none) user.debug kernel: usb0: qlen 10
Jan 10 21:30:54 (none) user.debug kernel: g_ether gadget: rndis_open
Jan 10 21:30:54 (none) user.debug kernel: rndis_set_param_medium: 0 8519680
Jan 10 21:30:54 (none) user.debug kernel: usb0: eth_start
Jan 10 21:30:54 (none) user.debug kernel: rndis_set_param_dev:
Jan 10 21:30:54 (none) user.debug kernel: net2280 0000:05:00.0: ep0 status
ack
Jan 10 21:30:54 (none) user.debug kernel: net2280 0000:05:00.0: setup
21.00 v0000 i0000 l0018 ep_cfg 00040400
Jan 10 21:30:54 (none) user.debug kernel: g_ether gadget: non-core control
req21.00 v0000 i0000 l24
Jan 10 21:30:54 (none) user.debug kernel: g_ether gadget: rndis req21.00
v0000 i0000 l24
Jan 10 21:30:54 (none) user.debug kernel: net2280 0000:05:00.0: read ep0
fifo (OUT) 24 bytes (short) req cf98ba80 24/24
Jan 10 21:30:54 (none) user.debug kernel: rndis_msg_parser: RNDIS_MSG_INIT
Jan 10 21:30:54 (none) user.debug kernel: g_ether gadget: notify/0 --> -22
Jan 10 21:30:54 (none) user.debug kernel: net2280 0000:05:00.0: ep-a clear
halt
Jan 10 21:30:54 (none) user.debug kernel: net2280 0000:05:00.0: ep-b clear
halt
Jan 10 21:30:54 (none) user.debug kernel: net2280 0000:05:00.0: setup
21.00 v0000 i0000 l0018 ep_cfg 00040400
Jan 10 21:30:54 (none) user.debug kernel: g_ether gadget: non-core control
req21.00 v0000 i0000 l24
Jan 10 21:30:54 (none) user.debug kernel: g_ether gadget: rndis req21.00
v0000 i0000 l24
Jan 10 21:30:54 (none) user.debug kernel: net2280 0000:05:00.0: read ep0
fifo (OUT) 24 bytes (short) req cf98ba80 24/24
Jan 10 21:30:54 (none) user.debug kernel: rndis_msg_parser: RNDIS_MSG_INIT
Jan 10 21:30:54 (none) user.debug kernel: g_ether gadget: notify/0 --> -22
Jan 10 21:30:59 (none) user.debug kernel: net2280 0000:05:00.0: setup
00.09 v0000 i0000 l0000 ep_cfg 00040400
Jan 10 21:30:59 (none) user.debug kernel: g_ether gadget: reset config
Jan 10 21:30:59 (none) user.debug kernel: g_ether gadget: rndis deactivated
Jan 10 21:30:59 (none) user.debug kernel: usb0: gether_disconnect
Jan 10 21:30:59 (none) user.debug kernel: net2280 0000:05:00.0: disabled
dma ep-a
Jan 10 21:30:59 (none) user.debug kernel: usb0: rx shutdown, code -108
Jan 10 21:30:59 (none) user.debug kernel: usb0: rx shutdown, code -108
Jan 10 21:30:59 (none) user.debug kernel: usb0: rx shutdown, code -108
Jan 10 21:30:59 (none) user.debug kernel: usb0: rx shutdown, code -108
Jan 10 21:30:59 (none) user.debug kernel: usb0: rx shutdown, code -108
Jan 10 21:30:59 (none) user.debug kernel: usb0: rx shutdown, code -108
Jan 10 21:30:59 (none) user.debug kernel: usb0: rx shutdown, code -108
Jan 10 21:30:59 (none) user.debug kernel: usb0: rx shutdown, code -108
Jan 10 21:30:59 (none) user.debug kernel: usb0: rx shutdown, code -108
Jan 10 21:30:59 (none) user.debug kernel: usb0: rx shutdown, code -108
Jan 10 21:30:59 (none) user.debug kernel: net2280 0000:05:00.0: disabled
dma ep-b
Jan 10 21:30:59 (none) user.info kernel: g_ether gadget: super-speed
config #0: unconfigured
Jan 10 21:30:59 (none) user.debug kernel: net2280 0000:05:00.0: ep0 status
ack
Jan 10 21:30:59 (none) user.debug kernel: g_ether gadget: suspend



Syslog:
net2280 0000:05:00.0: enabling device (0140 -> 0142)
net2280 0000:05:00.0: Failed to enable MSI mode
net2280 0000:05:00.0: PLX NET228x/USB338x USB Peripheral Controller
net2280 0000:05:00.0: irq 83, pci mem d08a0000, chip rev 00ab
net2280 0000:05:00.0: version: 2005 Sept 27/v3.0; dma enabled enhanced mode
udc 0000:05:00.0: registering UDC driver [g_ether]
using random self ethernet address
using random host ethernet address
usb0: HOST MAC 9e:51:09:72:76:be
usb0: MAC b2:84:29:98:52:11
using random self ethernet address
using random host ethernet address
g_ether gadget: adding config #2 'RNDIS'/c03c2fb0
rndis_register: configNr = 0
g_ether gadget: adding 'rndis'/cf9576c0 to config 'RNDIS'/c03c2fb0
rndis_set_param_medium: 0 0
g_ether gadget: RNDIS: super speed IN/ep-a OUT/ep-b NOTIFY/ep-e
g_ether gadget: cfg 2/c03c2fb0 speeds: super high full
g_ether gadget: interface 0 = rndis/cf9576c0
g_ether gadget: interface 1 = rndis/cf9576c0
g_ether gadget: adding config #1 'CDC Ethernet (ECM)'/c03c2f04
g_ether gadget: adding 'cdc_ethernet'/cf957840 to config 'CDC Ethernet
(ECM)'/c03c2f04
g_ether gadget: CDC Ethernet: super speed IN/ep-a OUT/ep-b NOTIFY/ep-e
g_ether gadget: cfg 1/c03c2f04 speeds: super high full
g_ether gadget: interface 0 = cdc_ethernet/cf957840
g_ether gadget: interface 1 = cdc_ethernet/cf957840
g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
g_ether gadget: g_ether ready
net2280 0000:05:00.0: Defect 7374 workaround soft will NOT operate
net2280 0000:05:00.0: It will operate on cold-reboot and SS connect






______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________