* [PATCH] USB: cdc-acm: Add MISSING_CAP_BRK quirk for the CH347F
@ 2026-11-30 4:42 Weihong Guan
2026-11-30 4:46 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Weihong Guan @ 2026-11-30 4:42 UTC (permalink / raw)
To: Oliver Neukum, Greg Kroah-Hartman; +Cc: linux-usb, Weihong Guan, stable
The WCH CH347F (1a86:55de) presents its two UARTs as CDC ACM
interfaces whose descriptors advertise only line coding
(bmCapabilities 0x02), yet it carries out SEND_BREAK: on (0xffff)
then off (0) drives a BREAK on the UART. Since 66aad7d8d3ec ("usb:
cdc-acm: return correct error code on unsupported break"), cdc-acm
refuses TIOCSBRK on such a device with -EOPNOTSUPP, so
tcsendbreak() fails.
The CH343 had the same trouble and got MISSING_CAP_BRK in
14ae24cba291 ("usb: cdc-acm: Restore CAP_BRK functionnality to
CH343"). Give the CH347F the same quirk. Match its control
interfaces by class: its interface 4 is vendor-specific (SPI, I2C,
JTAG), and a plain USB_DEVICE() entry has cdc-acm probe it and fail.
Tested on a CH347F EVT board, each UART wired to a CH583 whose
serial bootloader is entered by a BREAK: without the quirk
tcsendbreak() fails with -EOPNOTSUPP on both ttyACMs; with it the
BREAK reaches the CH583 every time on either UART, and the
bootloader's test suite passes on each, 61 of 61.
Fixes: 66aad7d8d3ec ("usb: cdc-acm: return correct error code on unsupported break")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-5.5
Signed-off-by: Weihong Guan <weihong.guan@gmail.com>
---
drivers/usb/class/cdc-acm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 4a0c7806f..665cfc645 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -2074,6 +2074,9 @@ static const struct usb_device_id acm_ids[] = {
/* CH343 supports CAP_BRK, but doesn't advertise it */
{ USB_DEVICE(0x1a86, 0x55d3), .driver_info = MISSING_CAP_BRK, },
+ /* CH347F likewise; not its vendor interface */
+ { USB_DEVICE_INTERFACE_CLASS(0x1a86, 0x55de, USB_CLASS_COMM),
+ .driver_info = MISSING_CAP_BRK, },
/*
* Lenovo Yoga Book 9 14IAH10 (83KJ) — INGENIC 17EF:6161 touchscreen
--
2.47.3
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] USB: cdc-acm: Add MISSING_CAP_BRK quirk for the CH347F
2026-11-30 4:42 [PATCH] USB: cdc-acm: Add MISSING_CAP_BRK quirk for the CH347F Weihong Guan
@ 2026-11-30 4:46 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-11-30 4:46 UTC (permalink / raw)
To: Weihong Guan; +Cc: linux-usb
> The WCH CH347F (1a86:55de) presents its two UARTs as CDC ACM
> interfaces whose descriptors advertise only line coding
> (bmCapabilities 0x02), yet it carries out SEND_BREAK: on (0xffff)
> then off (0) drives a BREAK on the UART. Since 66aad7d8d3ec ("usb:
> cdc-acm: return correct error code on unsupported break"), cdc-acm
> refuses TIOCSBRK on such a device with -EOPNOTSUPP, so
> tcsendbreak() fails.
>
> The CH343 had the same trouble and got MISSING_CAP_BRK in
> 14ae24cba291 ("usb: cdc-acm: Restore CAP_BRK functionnality to
> CH343"). Give the CH347F the same quirk. Match its control
> interfaces by class: its interface 4 is vendor-specific (SPI, I2C,
> JTAG), and a plain USB_DEVICE() entry has cdc-acm probe it and fail.
>
> Tested on a CH347F EVT board, each UART wired to a CH583 whose
> serial bootloader is entered by a BREAK: without the quirk
> tcsendbreak() fails with -EOPNOTSUPP on both ttyACMs; with it the
> BREAK reaches the CH583 every time on either UART, and the
> bootloader's test suite passes on each, 61 of 61.
>
> Fixes: 66aad7d8d3ec ("usb: cdc-acm: return correct error code on unsupported break")
> Cc: stable@vger.kernel.org
> Assisted-by: Claude:claude-opus-5.5
> Signed-off-by: Weihong Guan <weihong.guan@gmail.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261130044249.178335-1-weihong.guan@gmail.com?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-30 4:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 4:42 [PATCH] USB: cdc-acm: Add MISSING_CAP_BRK quirk for the CH347F Weihong Guan
2026-11-30 4:46 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox