zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.77k stars 6.57k forks source link

`CONFIG_USB_DEVICE_REMOTE_WAKEUP` gets default value `y` if not set #44251

Closed mmajchrzycki closed 2 years ago

mmajchrzycki commented 2 years ago

Describe the bug The config option CONFIG_USB_DEVICE_REMOTE_WAKEUP is getting the value y if not set in the project conf. However, the documentation says:

No defaults. Implicitly defaults to n.

As a result, the same firmware built with the new Zephyr gets additional bmAttributes

Remote Wakeup

This changes the behavior of the CDC ACM (see Impact).

To Reproduce Build: samples/subsys/usb/cdc_acm under Zephyr 2.7 and older and compare both .config files. An example for some Dev Kit will be delivered.

Expected behavior CONFIG_USB_DEVICE_REMOTE_WAKEUP should get n if not explicitly set to y

Impact At least on nRF53 devices, when CDC ACM is used as a console, on the Linux OS, the output printfs are not sent over CDC ACM after ~2,5 s of input inactivity. The USB device goes into suspend mode.

Environment (please complete the following information):

jfischer-no commented 2 years ago

Describe the bug The config option CONFIG_USB_DEVICE_REMOTE_WAKEUP is getting the value y if not set in the project conf. However, the documentation says:

No defaults. Implicitly defaults to n.

As a result, the same firmware built with the new Zephyr gets additional bmAttributes

Remote Wakeup

This changes the behavior of the CDC ACM (see Impact).

To Reproduce Build: samples/subsys/usb/cdc_acm under Zephyr 2.7 and older and compare both .config files. An example for some Dev Kit will be delivered.

You reference to Zephyr v2.7.0 (both documentation link and sample), but the behavior of configuration was changed after v2.7.0.

Expected behavior CONFIG_USB_DEVICE_REMOTE_WAKEUP should get n if not explicitly set to y

Impact At least on nRF53 devices, when CDC ACM is used as a console, on the Linux OS, the output printfs are not sent over CDC ACM after ~2,5 s of input inactivity. The USB device goes into suspend mode.

Environment (please complete the following information):

* OS: Linux tux 5.16.16-100.fc34.x86_64 [zephyr-master_fork #1](https://github.com/zephyrproject-rtos/zephyr/pull/1) SMP PREEMPT Sat Mar 19 13:54:08 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

* Toolchain: nRF Connect SDK 1.9.1

* Commit SHA or Version used: Zephyr 2.7.0 b05b8ad63acf30e08a570ce553831a06db27a2e0

Kconfig reference for nRF Connect SDK 1.9.1: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/kconfig/CONFIG_USB_DEVICE_REMOTE_WAKEUP.html?highlight=usb_device_remote_wakeup

Symbols that imply this symbol

Symbols that imply this symbol
    USB_NRFX

There is no bug in configuration or documentation, one can always disable USB_DEVICE_REMOTE_WAKEUP by CONFIG_USB_DEVICE_REMOTE_WAKEUP=n