All of lore.kernel.org
 help / color / mirror / Atom feed
* ConfigFS: bcdUSB forced to 0x0210
@ 2020-09-29  2:40 Sid Spry
  2020-09-29  6:33 ` Felipe Balbi
  0 siblings, 1 reply; 6+ messages in thread
From: Sid Spry @ 2020-09-29  2:40 UTC (permalink / raw)
  To: linux-usb

Hi, I can't enable USB3 with e.g. f_ncm because bcdUSB is always reset to 0x0210:

$ sudo sh -c 'echo "0x0300" > /sys/kernel/config/usb_gadget/g11/bcdUSB'
$ cat /sys/kernel/config/usb_gadget/g11/bcdUSB 
0x0300
$ sudo sh -c 'echo "fe800000.usb" > /sys/kernel/config/usb_gadget/g11/UDC'
$ cat /sys/kernel/config/usb_gadget/g11/bcdUSB 
0x0210
$ tree /sys/kernel/config/usb_gadget/g11
/sys/kernel/config/usb_gadget/g11
├── bcdDevice
├── bcdUSB
├── bDeviceClass
├── bDeviceProtocol
├── bDeviceSubClass
├── bMaxPacketSize0
├── configs
│   └── c.1
│       ├── bmAttributes
│       ├── MaxPower
│       ├── ncm.0 -> ../../../../usb_gadget/g11/functions/ncm.0
│       └── strings
│           └── 0x409
│               └── configuration
├── functions
│   └── ncm.0
│       ├── dev_addr
│       ├── host_addr
│       ├── ifname
│       ├── os_desc
│       │   └── interface.ncm
│       │       ├── compatible_id
│       │       └── sub_compatible_id
│       └── qmult
├── idProduct
├── idVendor
├── max_speed
├── os_desc
│   ├── b_vendor_code
│   ├── qw_sign
│   └── use
├── strings
│   └── 0x409
│       ├── manufacturer
│       ├── product
│       └── serialnumber
└── UDC

Board is a RK3399 based RockPro64.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ConfigFS: bcdUSB forced to 0x0210
  2020-09-29  2:40 ConfigFS: bcdUSB forced to 0x0210 Sid Spry
@ 2020-09-29  6:33 ` Felipe Balbi
  2020-09-29 23:16   ` Sid Spry
  0 siblings, 1 reply; 6+ messages in thread
From: Felipe Balbi @ 2020-09-29  6:33 UTC (permalink / raw)
  To: Sid Spry, linux-usb

[-- Attachment #1: Type: text/plain, Size: 1754 bytes --]


Hi,

"Sid Spry" <sid@aeam.us> writes:
> Hi, I can't enable USB3 with e.g. f_ncm because bcdUSB is always reset to 0x0210:
>
> $ sudo sh -c 'echo "0x0300" > /sys/kernel/config/usb_gadget/g11/bcdUSB'
> $ cat /sys/kernel/config/usb_gadget/g11/bcdUSB 
> 0x0300
> $ sudo sh -c 'echo "fe800000.usb" > /sys/kernel/config/usb_gadget/g11/UDC'
> $ cat /sys/kernel/config/usb_gadget/g11/bcdUSB 
> 0x0210
> $ tree /sys/kernel/config/usb_gadget/g11
> /sys/kernel/config/usb_gadget/g11
> ├── bcdDevice
> ├── bcdUSB
> ├── bDeviceClass
> ├── bDeviceProtocol
> ├── bDeviceSubClass
> ├── bMaxPacketSize0
> ├── configs
> │   └── c.1
> │       ├── bmAttributes
> │       ├── MaxPower
> │       ├── ncm.0 -> ../../../../usb_gadget/g11/functions/ncm.0
> │       └── strings
> │           └── 0x409
> │               └── configuration
> ├── functions
> │   └── ncm.0
> │       ├── dev_addr
> │       ├── host_addr
> │       ├── ifname
> │       ├── os_desc
> │       │   └── interface.ncm
> │       │       ├── compatible_id
> │       │       └── sub_compatible_id
> │       └── qmult
> ├── idProduct
> ├── idVendor
> ├── max_speed
> ├── os_desc
> │   ├── b_vendor_code
> │   ├── qw_sign
> │   └── use
> ├── strings
> │   └── 0x409
> │       ├── manufacturer
> │       ├── product
> │       └── serialnumber
> └── UDC
>
> Board is a RK3399 based RockPro64.

what's your max_speed?

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 857 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ConfigFS: bcdUSB forced to 0x0210
  2020-09-29  6:33 ` Felipe Balbi
@ 2020-09-29 23:16   ` Sid Spry
  2020-10-02  6:54     ` Felipe Balbi
  0 siblings, 1 reply; 6+ messages in thread
From: Sid Spry @ 2020-09-29 23:16 UTC (permalink / raw)
  To: Felipe Balbi, linux-usb

On Tue, Sep 29, 2020, at 1:33 AM, Felipe Balbi wrote:
> 
> Hi,
> 
> "Sid Spry" <sid@aeam.us> writes:
> > Hi, I can't enable USB3 with e.g. f_ncm because bcdUSB is always reset to 0x0210:
> >
> > $ sudo sh -c 'echo "0x0300" > /sys/kernel/config/usb_gadget/g11/bcdUSB'
> > $ cat /sys/kernel/config/usb_gadget/g11/bcdUSB 
> > 0x0300
> > $ sudo sh -c 'echo "fe800000.usb" > /sys/kernel/config/usb_gadget/g11/UDC'
> > $ cat /sys/kernel/config/usb_gadget/g11/bcdUSB 
> > 0x0210
> > $ tree /sys/kernel/config/usb_gadget/g11
> > /sys/kernel/config/usb_gadget/g11
> > ├── bcdDevice
> > ├── bcdUSB
> > ├── bDeviceClass
> > ├── bDeviceProtocol
> > ├── bDeviceSubClass
> > ├── bMaxPacketSize0
> > ├── configs
> > │   └── c.1
> > │       ├── bmAttributes
> > │       ├── MaxPower
> > │       ├── ncm.0 -> ../../../../usb_gadget/g11/functions/ncm.0
> > │       └── strings
> > │           └── 0x409
> > │               └── configuration
> > ├── functions
> > │   └── ncm.0
> > │       ├── dev_addr
> > │       ├── host_addr
> > │       ├── ifname
> > │       ├── os_desc
> > │       │   └── interface.ncm
> > │       │       ├── compatible_id
> > │       │       └── sub_compatible_id
> > │       └── qmult
> > ├── idProduct
> > ├── idVendor
> > ├── max_speed
> > ├── os_desc
> > │   ├── b_vendor_code
> > │   ├── qw_sign
> > │   └── use
> > ├── strings
> > │   └── 0x409
> > │       ├── manufacturer
> > │       ├── product
> > │       └── serialnumber
> > └── UDC
> >
> > Board is a RK3399 based RockPro64.
> 
> what's your max_speed?
> 

$ cat /sys/kernel/config/usb_gadget/g11/max_speed 
super-speed

Looks ok. From Windows, the xHCI driver reports that the device supports
super speed but chooses high speed. I can't see this info from a Linux host.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ConfigFS: bcdUSB forced to 0x0210
  2020-09-29 23:16   ` Sid Spry
@ 2020-10-02  6:54     ` Felipe Balbi
  2020-10-03  2:07       ` Sid Spry
  0 siblings, 1 reply; 6+ messages in thread
From: Felipe Balbi @ 2020-10-02  6:54 UTC (permalink / raw)
  To: Sid Spry, linux-usb

[-- Attachment #1: Type: text/plain, Size: 2364 bytes --]


Hi,

"Sid Spry" <sid@aeam.us> writes:
> On Tue, Sep 29, 2020, at 1:33 AM, Felipe Balbi wrote:
>> 
>> Hi,
>> 
>> "Sid Spry" <sid@aeam.us> writes:
>> > Hi, I can't enable USB3 with e.g. f_ncm because bcdUSB is always reset to 0x0210:
>> >
>> > $ sudo sh -c 'echo "0x0300" > /sys/kernel/config/usb_gadget/g11/bcdUSB'
>> > $ cat /sys/kernel/config/usb_gadget/g11/bcdUSB 
>> > 0x0300
>> > $ sudo sh -c 'echo "fe800000.usb" > /sys/kernel/config/usb_gadget/g11/UDC'
>> > $ cat /sys/kernel/config/usb_gadget/g11/bcdUSB 
>> > 0x0210
>> > $ tree /sys/kernel/config/usb_gadget/g11
>> > /sys/kernel/config/usb_gadget/g11
>> > ├── bcdDevice
>> > ├── bcdUSB
>> > ├── bDeviceClass
>> > ├── bDeviceProtocol
>> > ├── bDeviceSubClass
>> > ├── bMaxPacketSize0
>> > ├── configs
>> > │   └── c.1
>> > │       ├── bmAttributes
>> > │       ├── MaxPower
>> > │       ├── ncm.0 -> ../../../../usb_gadget/g11/functions/ncm.0
>> > │       └── strings
>> > │           └── 0x409
>> > │               └── configuration
>> > ├── functions
>> > │   └── ncm.0
>> > │       ├── dev_addr
>> > │       ├── host_addr
>> > │       ├── ifname
>> > │       ├── os_desc
>> > │       │   └── interface.ncm
>> > │       │       ├── compatible_id
>> > │       │       └── sub_compatible_id
>> > │       └── qmult
>> > ├── idProduct
>> > ├── idVendor
>> > ├── max_speed
>> > ├── os_desc
>> > │   ├── b_vendor_code
>> > │   ├── qw_sign
>> > │   └── use
>> > ├── strings
>> > │   └── 0x409
>> > │       ├── manufacturer
>> > │       ├── product
>> > │       └── serialnumber
>> > └── UDC
>> >
>> > Board is a RK3399 based RockPro64.
>> 
>> what's your max_speed?
>> 
>
> $ cat /sys/kernel/config/usb_gadget/g11/max_speed 
> super-speed
>
> Looks ok. From Windows, the xHCI driver reports that the device supports
> super speed but chooses high speed. I can't see this info from a Linux host.

It's probably failing Rx.Detect and falling back to high-speed. Which
USB Peripheral Controller is that?

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 857 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ConfigFS: bcdUSB forced to 0x0210
  2020-10-02  6:54     ` Felipe Balbi
@ 2020-10-03  2:07       ` Sid Spry
  2020-10-03  6:07         ` Felipe Balbi
  0 siblings, 1 reply; 6+ messages in thread
From: Sid Spry @ 2020-10-03  2:07 UTC (permalink / raw)
  To: Felipe Balbi, linux-usb

On Fri, Oct 2, 2020, at 1:54 AM, Felipe Balbi wrote:
> 
> Hi,
> 
> "Sid Spry" <sid@aeam.us> writes:
> > On Tue, Sep 29, 2020, at 1:33 AM, Felipe Balbi wrote:
> >> 
> >> Hi,
> >> 
> >> "Sid Spry" <sid@aeam.us> writes:
> >> > Hi, I can't enable USB3 with e.g. f_ncm because bcdUSB is always reset to 0x0210:
> >> >
> >> > $ sudo sh -c 'echo "0x0300" > /sys/kernel/config/usb_gadget/g11/bcdUSB'
> >> > $ cat /sys/kernel/config/usb_gadget/g11/bcdUSB 
> >> > 0x0300
> >> > $ sudo sh -c 'echo "fe800000.usb" > /sys/kernel/config/usb_gadget/g11/UDC'
> >> > $ cat /sys/kernel/config/usb_gadget/g11/bcdUSB 
> >> > 0x0210
> >> > $ tree /sys/kernel/config/usb_gadget/g11
> >> > /sys/kernel/config/usb_gadget/g11
> >> > ├── bcdDevice
> >> > ├── bcdUSB
> >> > ├── bDeviceClass
> >> > ├── bDeviceProtocol
> >> > ├── bDeviceSubClass
> >> > ├── bMaxPacketSize0
> >> > ├── configs
> >> > │   └── c.1
> >> > │       ├── bmAttributes
> >> > │       ├── MaxPower
> >> > │       ├── ncm.0 -> ../../../../usb_gadget/g11/functions/ncm.0
> >> > │       └── strings
> >> > │           └── 0x409
> >> > │               └── configuration
> >> > ├── functions
> >> > │   └── ncm.0
> >> > │       ├── dev_addr
> >> > │       ├── host_addr
> >> > │       ├── ifname
> >> > │       ├── os_desc
> >> > │       │   └── interface.ncm
> >> > │       │       ├── compatible_id
> >> > │       │       └── sub_compatible_id
> >> > │       └── qmult
> >> > ├── idProduct
> >> > ├── idVendor
> >> > ├── max_speed
> >> > ├── os_desc
> >> > │   ├── b_vendor_code
> >> > │   ├── qw_sign
> >> > │   └── use
> >> > ├── strings
> >> > │   └── 0x409
> >> > │       ├── manufacturer
> >> > │       ├── product
> >> > │       └── serialnumber
> >> > └── UDC
> >> >
> >> > Board is a RK3399 based RockPro64.
> >> 
> >> what's your max_speed?
> >> 
> >
> > $ cat /sys/kernel/config/usb_gadget/g11/max_speed 
> > super-speed
> >
> > Looks ok. From Windows, the xHCI driver reports that the device supports
> > super speed but chooses high speed. I can't see this info from a Linux host.
> 
> It's probably failing Rx.Detect and falling back to high-speed. Which
> USB Peripheral Controller is that?
> 

It's a dwc3. I recently found that if I plug the device into itself (there are two
dwc3, one on a C port, one on a female A port) the device enumerates at
superspeed with the NCM configfs driver. But connecting to my x86 machines
fails.

In an earlier thread I found that the type C port would not work with USB2
or 3 if in the "normal" direction (as opposed to "reversed").

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ConfigFS: bcdUSB forced to 0x0210
  2020-10-03  2:07       ` Sid Spry
@ 2020-10-03  6:07         ` Felipe Balbi
  0 siblings, 0 replies; 6+ messages in thread
From: Felipe Balbi @ 2020-10-03  6:07 UTC (permalink / raw)
  To: Sid Spry, linux-usb

[-- Attachment #1: Type: text/plain, Size: 3061 bytes --]


Hi,

"Sid Spry" <sid@aeam.us> writes:
>> >> "Sid Spry" <sid@aeam.us> writes:
>> >> > Hi, I can't enable USB3 with e.g. f_ncm because bcdUSB is always reset to 0x0210:
>> >> >
>> >> > $ sudo sh -c 'echo "0x0300" > /sys/kernel/config/usb_gadget/g11/bcdUSB'
>> >> > $ cat /sys/kernel/config/usb_gadget/g11/bcdUSB 
>> >> > 0x0300
>> >> > $ sudo sh -c 'echo "fe800000.usb" > /sys/kernel/config/usb_gadget/g11/UDC'
>> >> > $ cat /sys/kernel/config/usb_gadget/g11/bcdUSB 
>> >> > 0x0210
>> >> > $ tree /sys/kernel/config/usb_gadget/g11
>> >> > /sys/kernel/config/usb_gadget/g11
>> >> > ├── bcdDevice
>> >> > ├── bcdUSB
>> >> > ├── bDeviceClass
>> >> > ├── bDeviceProtocol
>> >> > ├── bDeviceSubClass
>> >> > ├── bMaxPacketSize0
>> >> > ├── configs
>> >> > │   └── c.1
>> >> > │       ├── bmAttributes
>> >> > │       ├── MaxPower
>> >> > │       ├── ncm.0 -> ../../../../usb_gadget/g11/functions/ncm.0
>> >> > │       └── strings
>> >> > │           └── 0x409
>> >> > │               └── configuration
>> >> > ├── functions
>> >> > │   └── ncm.0
>> >> > │       ├── dev_addr
>> >> > │       ├── host_addr
>> >> > │       ├── ifname
>> >> > │       ├── os_desc
>> >> > │       │   └── interface.ncm
>> >> > │       │       ├── compatible_id
>> >> > │       │       └── sub_compatible_id
>> >> > │       └── qmult
>> >> > ├── idProduct
>> >> > ├── idVendor
>> >> > ├── max_speed
>> >> > ├── os_desc
>> >> > │   ├── b_vendor_code
>> >> > │   ├── qw_sign
>> >> > │   └── use
>> >> > ├── strings
>> >> > │   └── 0x409
>> >> > │       ├── manufacturer
>> >> > │       ├── product
>> >> > │       └── serialnumber
>> >> > └── UDC
>> >> >
>> >> > Board is a RK3399 based RockPro64.
>> >> 
>> >> what's your max_speed?
>> >> 
>> >
>> > $ cat /sys/kernel/config/usb_gadget/g11/max_speed 
>> > super-speed
>> >
>> > Looks ok. From Windows, the xHCI driver reports that the device supports
>> > super speed but chooses high speed. I can't see this info from a Linux host.
>> 
>> It's probably failing Rx.Detect and falling back to high-speed. Which
>> USB Peripheral Controller is that?
>> 
>
> It's a dwc3. I recently found that if I plug the device into itself (there are two
> dwc3, one on a C port, one on a female A port) the device enumerates at
> superspeed with the NCM configfs driver. But connecting to my x86 machines
> fails.
>
> In an earlier thread I found that the type C port would not work with USB2
> or 3 if in the "normal" direction (as opposed to "reversed").

sounds like a board layout problem to me. Can you capture dwc3
tracepoints? More information here:
https://www.kernel.org/doc/html/latest/driver-api/usb/dwc3.html#reporting-bugs

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 857 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-10-03  6:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29  2:40 ConfigFS: bcdUSB forced to 0x0210 Sid Spry
2020-09-29  6:33 ` Felipe Balbi
2020-09-29 23:16   ` Sid Spry
2020-10-02  6:54     ` Felipe Balbi
2020-10-03  2:07       ` Sid Spry
2020-10-03  6:07         ` Felipe Balbi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.