USB: cdc-acm: Fix bit overlap and move quirk definitions to header
Subsystems (3)
RFC PATCH 1/1 USB: cdc-acm: Fix bit overlap and move quirk definitions to header
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.
--- drivers/usb/class/cdc-acm.c | 2 -- drivers/usb/class/cdc-acm.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/usb/class/cdc-acm.c +0 -2
@@ -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;
drivers/usb/class/cdc-acm.h +2 -0
@@ -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 */
Signature · 1 line
2.30.2
Greg KH
maintainerQuoted 7 lines · Wentao Guan
The
VENDOR_CLASS_DATA_IFACEandALWAYS_POLL_CTRLquirk flags added in commitf58752ebcb35("USB: cdc-acm: Add quirks for Yoga Book 9 14IAH10 INGENIC touchscreen") were placed inside theacm_ctrl_msg()function rather than in the header with the other quirk flags. Then, their values (BIT(9) and BIT(10)) collided withNO_UNION_12which is already BIT(9).
Quoted 5 lines
Move the definitions to
drivers/usb/class/cdc-acm.hwhere 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")
Why is this needed for stable? What bug does this "fix"?
thanks,
greg k-h
Quoted 8 lines · Wentao Guan
Quoted 7 lines
The
VENDOR_CLASS_DATA_IFACEandALWAYS_POLL_CTRLquirk flags added in commitf58752ebcb35("USB: cdc-acm: Add quirks for Yoga Book 9 14IAH10 INGENIC touchscreen") were placed inside theacm_ctrl_msg()function rather than in the header with the other quirk flags. Then, their values (BIT(9) and BIT(10)) collided withNO_UNION_12which is already BIT(9).
Quoted 7 lines
Quoted 5 lines
Move the definitions to
drivers/usb/class/cdc-acm.hwhere 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")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
Greg KH
maintainerQuoted 8 lines · Wentao Guan
Quoted 8 lines · Wentao Guan
Quoted 7 lines
The
VENDOR_CLASS_DATA_IFACEandALWAYS_POLL_CTRLquirk flags added in commitf58752ebcb35("USB: cdc-acm: Add quirks for Yoga Book 9 14IAH10 INGENIC touchscreen") were placed inside theacm_ctrl_msg()function rather than in the header with the other quirk flags. Then, their values (BIT(9) and BIT(10)) collided withNO_UNION_12which is already BIT(9).
Quoted 8 lines
Quoted 7 lines
Quoted 5 lines
Move the definitions to
drivers/usb/class/cdc-acm.hwhere 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")Why is this needed for stable? What bug does this "fix"?
I see that there is a bug that
NO_UNION_12andVENDOR_CLASS_DATA_IFACEuse same bit.
Then send this as a non-RFC patch, as obviously we can not take RFC patches :)