* [PATCH RFC] USB: cdc-acm: Fix bit overlap and move quirk definitions to header
@ 2026-05-06 9:32 Wentao Guan
2026-05-21 14:55 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Wentao Guan @ 2026-05-06 9:32 UTC (permalink / raw)
To: oneukum; +Cc: carvsdriver, gregkh, linux-usb, linux-kernel, Wentao Guan, stable
The VENDOR_CLASS_DATA_IFACE and ALWAYS_POLL_CTRL quirk flags added in
commit f58752ebcb35 ("USB: cdc-acm: Add quirks for Yoga Book 9 14IAH10
INGENIC touchscreen") were placed inside the acm_ctrl_msg() function
rather than in the header with the other quirk flags. Then, their
values (BIT(9) and BIT(10)) collided with NO_UNION_12 which is already
BIT(9).
Move the definitions to drivers/usb/class/cdc-acm.h where they belong
and shift them to BIT(10) and BIT(11) to avoid the overlap.
Fixes: f58752ebcb35 ("USB: cdc-acm: Add quirks for Yoga Book 9 14IAH10 INGENIC touchscreen")
Cc: stable@vger.kernel.org
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
---
drivers/usb/class/cdc-acm.c | 2 --
drivers/usb/class/cdc-acm.h | 2 ++
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index c024011dc336a..d64751c42c2bc 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -114,8 +114,6 @@ static int acm_ctrl_msg(struct acm *acm, int request, int value,
int retval;
retval = usb_autopm_get_interface(acm->control);
-#define VENDOR_CLASS_DATA_IFACE BIT(9) /* data interface uses vendor-specific class */
-#define ALWAYS_POLL_CTRL BIT(10) /* keep ctrl URB active even without an open TTY */
if (retval)
return retval;
diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h
index 25fd5329a8781..01f448a783c03 100644
--- a/drivers/usb/class/cdc-acm.h
+++ b/drivers/usb/class/cdc-acm.h
@@ -115,3 +115,5 @@ struct acm {
#define DISABLE_ECHO BIT(7)
#define MISSING_CAP_BRK BIT(8)
#define NO_UNION_12 BIT(9)
+#define VENDOR_CLASS_DATA_IFACE BIT(10) /* data interface uses vendor-specific class */
+#define ALWAYS_POLL_CTRL BIT(11) /* keep ctrl URB active even without an open TTY */
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH RFC] USB: cdc-acm: Fix bit overlap and move quirk definitions to header
2026-05-06 9:32 [PATCH RFC] USB: cdc-acm: Fix bit overlap and move quirk definitions to header Wentao Guan
@ 2026-05-21 14:55 ` Greg KH
2026-05-21 15:03 ` Wentao Guan
0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2026-05-21 14:55 UTC (permalink / raw)
To: Wentao Guan; +Cc: oneukum, carvsdriver, linux-usb, linux-kernel, stable
On Wed, May 06, 2026 at 05:32:13PM +0800, Wentao Guan wrote:
> The VENDOR_CLASS_DATA_IFACE and ALWAYS_POLL_CTRL quirk flags added in
> commit f58752ebcb35 ("USB: cdc-acm: Add quirks for Yoga Book 9 14IAH10
> INGENIC touchscreen") were placed inside the acm_ctrl_msg() function
> rather than in the header with the other quirk flags. Then, their
> values (BIT(9) and BIT(10)) collided with NO_UNION_12 which is already
> BIT(9).
>
> Move the definitions to drivers/usb/class/cdc-acm.h where they belong
> and shift them to BIT(10) and BIT(11) to avoid the overlap.
>
> Fixes: f58752ebcb35 ("USB: cdc-acm: Add quirks for Yoga Book 9 14IAH10 INGENIC touchscreen")
> Cc: stable@vger.kernel.org
Why is this needed for stable? What bug does this "fix"?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH RFC] USB: cdc-acm: Fix bit overlap and move quirk definitions to header
2026-05-21 14:55 ` Greg KH
@ 2026-05-21 15:03 ` Wentao Guan
2026-05-22 4:45 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Wentao Guan @ 2026-05-21 15:03 UTC (permalink / raw)
To: Greg KH; +Cc: oneukum, carvsdriver, linux-usb, linux-kernel, stable
> On Wed, May 06, 2026 at 05:32:13PM +0800, Wentao Guan wrote:
> > The VENDOR_CLASS_DATA_IFACE and ALWAYS_POLL_CTRL quirk flags added in
> > commit f58752ebcb35 ("USB: cdc-acm: Add quirks for Yoga Book 9 14IAH10
> > INGENIC touchscreen") were placed inside the acm_ctrl_msg() function
> > rather than in the header with the other quirk flags. Then, their
> > values (BIT(9) and BIT(10)) collided with NO_UNION_12 which is already
> > BIT(9).
> >
> > Move the definitions to drivers/usb/class/cdc-acm.h where they belong
> > and shift them to BIT(10) and BIT(11) to avoid the overlap.
> >
> > Fixes: f58752ebcb35 ("USB: cdc-acm: Add quirks for Yoga Book 9 14IAH10 INGENIC touchscreen")
> > Cc: stable@vger.kernel.org
>
> Why is this needed for stable? What bug does this "fix"?
I see that there is a bug that NO_UNION_12 and VENDOR_CLASS_DATA_IFACE use same bit.
BRs
Wentao Guan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH RFC] USB: cdc-acm: Fix bit overlap and move quirk definitions to header
2026-05-21 15:03 ` Wentao Guan
@ 2026-05-22 4:45 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2026-05-22 4:45 UTC (permalink / raw)
To: Wentao Guan; +Cc: oneukum, carvsdriver, linux-usb, linux-kernel, stable
On Thu, May 21, 2026 at 11:03:02PM +0800, Wentao Guan wrote:
> > On Wed, May 06, 2026 at 05:32:13PM +0800, Wentao Guan wrote:
> > > The VENDOR_CLASS_DATA_IFACE and ALWAYS_POLL_CTRL quirk flags added in
> > > commit f58752ebcb35 ("USB: cdc-acm: Add quirks for Yoga Book 9 14IAH10
> > > INGENIC touchscreen") were placed inside the acm_ctrl_msg() function
> > > rather than in the header with the other quirk flags. Then, their
> > > values (BIT(9) and BIT(10)) collided with NO_UNION_12 which is already
> > > BIT(9).
> > >
> > > Move the definitions to drivers/usb/class/cdc-acm.h where they belong
> > > and shift them to BIT(10) and BIT(11) to avoid the overlap.
> > >
> > > Fixes: f58752ebcb35 ("USB: cdc-acm: Add quirks for Yoga Book 9 14IAH10 INGENIC touchscreen")
> > > Cc: stable@vger.kernel.org
> >
> > Why is this needed for stable? What bug does this "fix"?
> I see that there is a bug that NO_UNION_12 and VENDOR_CLASS_DATA_IFACE use same bit.
Then send this as a non-RFC patch, as obviously we can not take RFC
patches :)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-05-22 4:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-06 9:32 [PATCH RFC] USB: cdc-acm: Fix bit overlap and move quirk definitions to header Wentao Guan
2026-05-21 14:55 ` Greg KH
2026-05-21 15:03 ` Wentao Guan
2026-05-22 4:45 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox