Public bug reported:

Found this whilst developing a custom STM32 USB composite device using
CDCs. The custom USB device is based on the github TinyUSB stack.

Test Platform --> Ubuntu 25.10 6.17.0-6-generic using cutecom 0.60.0-RC1 serial 
terminal app.
The USB device appears as /dev/ttyACMn (where n = 1 .. 4).
In cutecom, the serial device is configured to open with baudrate 115200.

dmesg trace below was generated via dynamic debugging +p enabled for
module cdc_acm.

Doing the following sequence of operations causes the kernel cdc_acm
module to generate an inconsistent sequence of TinyUSB (cdc_device.c)
CDC_REQUEST_SET_LINE_CODING actions.

Using cutecom....
Open the device.
Close the device.
Open the device again.

On the 2nd open I would expect to see the same list of events as per the 1st 
open. Instead there is a rogue 
acm_tty_set_termios of baudrate 4000000.

The fact this is coming from the cdc_acm driver rules out the cause being 
cutecom or my TinyUSB device.
It is 100% repeatable.


In cutecom, Open the device... 
[ 3881.071694] cdc_acm 2-4.1.1.2:1.2: acm_ctrl_msg - rq 0x22, val 0x3, len 0x0, 
result 0
[ 3881.071852] cdc_acm 2-4.1.1.2:1.2: acm_tty_set_termios - set line: 115200 0 
0 8
[ 3881.076057] cdc_acm 2-4.1.1.2:1.2: acm_ctrl_msg - rq 0x20, val 0x0, len 0x7, 
result 7
[ 3881.080466] cdc_acm 2-4.1.1.2:1.2: acm_ctrl_msg - rq 0x22, val 0x2, len 0x0, 
result 0
[ 3881.084673] cdc_acm 2-4.1.1.2:1.2: acm_ctrl_msg - rq 0x22, val 0x0, len 0x0, 
result 0

In cutecom, Close the device... 
[ 3890.506614] cdc_acm 2-4.1.1.2:1.2: acm_tty_set_termios - set line: 9600 0 0 8
[ 3890.506979] cdc_acm 2-4.1.1.2:1.2: acm_ctrl_msg - rq 0x20, val 0x0, len 0x7, 
result 7
[ 3890.511178] cdc_acm 2-4.1.1.2:1.2: acm_ctrl_msg - rq 0x22, val 0x0, len 0x0, 
result 0
[ 3890.513169] cdc_acm 2-4.1.1.2:1.2: acm_ctrl_irq - urb shutting down with 
status: -2
[ 3890.515198] cdc_acm 2-4.1.1.2:1.3: acm_read_bulk_callback - urb shutting 
down with status: -2
[ 3890.517200] cdc_acm 2-4.1.1.2:1.3: acm_read_bulk_callback - urb shutting 
down with status: -2
[ 3890.519198] cdc_acm 2-4.1.1.2:1.3: acm_read_bulk_callback - urb shutting 
down with status: -2
[ 3890.521192] cdc_acm 2-4.1.1.2:1.3: acm_read_bulk_callback - urb shutting 
down with status: -2
[ 3890.523190] cdc_acm 2-4.1.1.2:1.3: acm_read_bulk_callback - urb shutting 
down with status: -2
[ 3890.525189] cdc_acm 2-4.1.1.2:1.3: acm_read_bulk_callback - urb shutting 
down with status: -2
[ 3890.527218] cdc_acm 2-4.1.1.2:1.3: acm_read_bulk_callback - urb shutting 
down with status: -2
[ 3890.529195] cdc_acm 2-4.1.1.2:1.3: acm_read_bulk_callback - urb shutting 
down with status: -2
[ 3890.531196] cdc_acm 2-4.1.1.2:1.3: acm_read_bulk_callback - urb shutting 
down with status: -2
[ 3890.533159] cdc_acm 2-4.1.1.2:1.3: acm_read_bulk_callback - urb shutting 
down with status: -2
[ 3890.535198] cdc_acm 2-4.1.1.2:1.3: acm_read_bulk_callback - urb shutting 
down with status: -2
[ 3890.537199] cdc_acm 2-4.1.1.2:1.3: acm_read_bulk_callback - urb shutting 
down with status: -2
[ 3890.539193] cdc_acm 2-4.1.1.2:1.3: acm_read_bulk_callback - urb shutting 
down with status: -2
[ 3890.541191] cdc_acm 2-4.1.1.2:1.3: acm_read_bulk_callback - urb shutting 
down with status: -2
[ 3890.543204] cdc_acm 2-4.1.1.2:1.3: acm_read_bulk_callback - urb shutting 
down with status: -2
[ 3890.545205] cdc_acm 2-4.1.1.2:1.3: acm_read_bulk_callback - urb shutting 
down with status: -2

In cutecom, Open the device... 
[ 3904.694254] cdc_acm 2-4.1.1.2:1.2: acm_ctrl_msg - rq 0x22, val 0x3, len 0x0, 
result 0
[ 3904.694281] cdc_acm 2-4.1.1.2:1.2: acm_tty_set_termios - set line: 115200 0 
0 8
[ 3904.698579] cdc_acm 2-4.1.1.2:1.2: acm_ctrl_msg - rq 0x20, val 0x0, len 0x7, 
result 7
THIS NEXT LINE IS INCORRECT AND SHOULDN'T HAPPEN
[ 3904.698707] cdc_acm 2-4.1.1.2:1.2: acm_tty_set_termios - set line: 4000000 0 
0 8
[ 3904.703036] cdc_acm 2-4.1.1.2:1.2: acm_ctrl_msg - rq 0x20, val 0x0, len 0x7, 
result 7
AND THIS ONE IS AN REPEAT OF THE ORIGINAL PROBABLY CAUSED DUE TO THE PRIMARY 
ERROR BEFOREHAND.
[ 3904.703071] cdc_acm 2-4.1.1.2:1.2: acm_tty_set_termios - set line: 115200 0 
0 8
[ 3904.707519] cdc_acm 2-4.1.1.2:1.2: acm_ctrl_msg - rq 0x20, val 0x0, len 0x7, 
result 7
[ 3904.711820] cdc_acm 2-4.1.1.2:1.2: acm_ctrl_msg - rq 0x22, val 0x2, len 0x0, 
result 0
[ 3904.715997] cdc_acm 2-4.1.1.2:1.2: acm_ctrl_msg - rq 0x22, val 0x0, len 0x0, 
result 0

** Affects: ubuntu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2136080

Title:
  Ubuntu 25.10 CDC_REQUEST_SET_LINE_CODING sequence contains incorrect
  baudrate

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+bug/2136080/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to