zephyr/samples/subsys/usb
Tomasz Moń 2f24adbe0f usb: device: Do not claim to be USB 3.2 device
The bcdUSB value 0x0210 defined in USB 3.2 Specification indicates USB
3.2 device operating in one of the USB 2.0 modes. USB 2.0 Link Power
Management Addendum defines bcdUSB value 0x0201 to indicate that USB 2.0
device supports the request to read the BOS Descriptor.

The main difference between bcdUSB 0x0210 and 0x0201 is that the USB 3.2
device must support LPM, while USB 2.0 devices can (but are not required
to) support LPM.

The difference is respected by USB 3 Gen X Command Verifier (2.3.0.0)
Chapter 9 Tests [USB 2 devices], where the test behaves as follows:
  * For bcdUSB 0x0200:
      Checking Device Under Test for LPM L1 Compatibility...
      USB version of device is 2.00.
      DUT is NOT compatible with LPM.
      LPM is NOT required for DUT
      LPM is only supported in USB version 2.01 and above.

  * For bcdUSB 0x0201:
      Checking Device Under Test for LPM L1 Compatibility...
      USB version of device is 2.01.
      DUT IS compatible with LPM.
      LPM is NOT required for DUT
      USB 2.0 Extension Descriptor bmAttributes:
        LPM Capable = 0
        BESL and Alternate HIRD Supported = 0
        Baseline BESL Valid = 0
        Deep BESL Valid = 0
        Baseline BESL: 0d
        Deep BESL:  0d
      LPM is not supported

  * For bcdUSB 0x0210:
      Checking Device Under Test for LPM L1 Compatibility...
      USB version of device is 2.10.
      DUT IS compatible with LPM.
      LPM IS required for DUT
      USB 2.0 Extension Descriptor bmAttributes:
        LPM Capable = 0
        BESL and Alternate HIRD Supported = 0
        Baseline BESL Valid = 0
        Deep BESL Valid = 0
        Baseline BESL: 0d
        Deep BESL:  0d
      (USB: 9.6.2.1.6) Bit 1 in Attributes field of a USB 2.0 Extension
      descriptor returned in response to a GetDescriptor(BOS) request
      must be 1 for LS/FS/HS devices that support LPM L1.

The test fails when LPM bit is not set in USB 2.0 Extension Descriptor
only when bcdUSB is 0x0210. The test failure was incorrectly fixed in
commit 312429be3c ("usb: samples: Add Extension descriptor to webUSB
sample."). Properly fix the issue by changing bcdUSB to 0x0201 and
removing the false LPM support claim.

The false LPM claim was leading to device ceasing to work after some
time if there was no traffic from host to device (when the host is
likely to have executed the LPM L1 transition that was not properly
handled by the device).

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-05-06 14:54:23 +01:00
..
audio hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
cdc_acm flash: Move dependency on FLASH_PAGE_LAYOUT where it belongs 2024-04-10 10:01:40 +02:00
cdc_acm_composite
common usb: device_next: rename usbd_class_iter to usbd_class_node 2024-04-22 06:51:22 -07:00
console samples: usb: add message callback registration to the common code 2024-03-22 10:10:42 +01:00
dfu flash: Move dependency on FLASH_PAGE_LAYOUT where it belongs 2024-04-10 10:01:40 +02:00
hid samples/subsys: Use hwmv2 native targets identifiers 2024-03-15 16:13:12 +01:00
hid-cdc samples: use appropriate sys_randX_get() 2024-04-05 10:57:45 -05:00
hid-mouse
inf
mass samples: usb: add message callback registration to the common code 2024-03-22 10:10:42 +01:00
shell hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
testusb samples/subsys: Use hwmv2 native targets identifiers 2024-03-15 16:13:12 +01:00
uac2_explicit_feedback samples: usb: add message callback registration to the common code 2024-03-22 10:10:42 +01:00
webusb usb: device: Do not claim to be USB 3.2 device 2024-05-06 14:54:23 +01:00
usb.rst doc: samples: usb: Include only README to TOC 2023-09-25 09:48:01 +02:00