From: Weihong Guan <weihong.guan@gmail.com>
To: Oliver Neukum <oneukum@suse.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org, Weihong Guan <weihong.guan@gmail.com>,
stable@vger.kernel.org
Subject: [PATCH] USB: cdc-acm: Add MISSING_CAP_BRK quirk for the CH347F
Date: Mon, 30 Nov 2026 04:42:45 +0000 [thread overview]
Message-ID: <20261130044249.178335-1-weihong.guan@gmail.com> (raw)
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
next reply other threads:[~2026-11-30 4:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 4:42 Weihong Guan [this message]
2026-11-30 4:46 ` [PATCH] USB: cdc-acm: Add MISSING_CAP_BRK quirk for the CH347F sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261130044249.178335-1-weihong.guan@gmail.com \
--to=weihong.guan@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=oneukum@suse.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox