zephyr/samples/subsys
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
..
bindesc samples bindesc: Add runtime test and change default to native_sim 2023-11-20 12:02:48 +01:00
canbus samples/subsys: Use hwmv2 native targets identifiers 2024-03-15 16:13:12 +01:00
console hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
debug arch posix fuzzing: Move kconfig options to sample 2024-05-02 20:46:03 +03:00
display samples: display: lvgl: add esp32-s3-touch-lcd-1.28 config 2024-04-25 15:12:35 +02:00
edac doc: samples: edac: add syntax highlight to code blocks 2023-10-18 15:51:22 +03:00
fs samples: littlefs: add support for H3ULCB and Salvator XS M3 2024-05-01 10:55:11 -04:00
input boards: rename and update esp32 related conf and overlay files 2024-04-23 15:36:13 +02:00
ipc samples: ipc: static_vrings add NXP boards support 2024-04-30 08:57:01 +02:00
llext hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
logging Bluetooth: Samples: Remove uses of auto name in AD 2024-04-23 12:42:24 +02:00
lorawan samples: subsys: lorawan: class_a: remove clock sync and multicast 2024-05-02 16:54:43 +02:00
mgmt sample: mgmt: hawkbit: sign image by default 2024-05-02 22:41:27 +01:00
modbus samples: net: Change to use CONFIG_POSIX_API 2024-03-27 13:40:13 -05:00
nvs samples: subsys: nvs fix hard fault when running on stm32 targets 2024-04-11 09:08:52 +02:00
pm hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
portability hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
rtio/sensor_batch_processing samples: Switch integration_platforms from native_posix to native_sim 2023-11-20 12:02:48 +01:00
sensing sensing: Fix initializer compile-time constant 2024-01-24 10:32:10 +01:00
settings boards: rename and update esp32 related conf and overlay files 2024-04-23 15:36:13 +02:00
shell samples shell_module: Avoid setting incompatible options 2024-04-26 16:19:39 +02:00
sip_svc samples: sip_svc: Add support for intel_socfpga_agilex5_socdk 2023-09-15 09:26:49 +02:00
task_wdt hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
testsuite samples: pytest: add README 2023-12-14 10:12:21 +01:00
tracing tests: Fix missed renames 2024-04-10 11:50:29 +02:00
usb usb: device: Do not claim to be USB 3.2 device 2024-05-06 14:54:23 +01:00
usb_c samples: usb-c: sink: Add support for WeAct STM32G431 core 2023-11-21 09:54:02 +01:00
video samples: net: Change to use CONFIG_POSIX_API 2024-03-27 13:40:13 -05:00
zbus samples/subsys/zbus/uart_bridge: Add missing overlays for native_sim 2024-04-18 12:20:14 +02:00
subsys.rst doc: samples: Fix incorrect maxdepth for some toctrees 2023-09-26 12:02:54 +02:00