cdc-acm: Add DISABLE_ECHO quirk for Microchip/SMSC chip
authorJoakim Tjernlund <joakim.tjernlund@infinera.com>
Fri, 5 Jun 2020 10:54:18 +0000 (12:54 +0200)
committerSasha Levin <sashal@kernel.org>
Tue, 30 Jun 2020 19:38:41 +0000 (15:38 -0400)
commit 03894573f2913181ee5aae0089f333b2131f2d4b upstream.

USB_DEVICE(0x0424, 0x274e) can send data before cdc_acm is ready,
causing garbage chars on the TTY causing stray input to the shell
and/or login prompt.

Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
Cc: stable@vger.kernel.org
Acked-by: Oliver Neukum <oneukum@suse.com>
Link: https://lore.kernel.org/r/20200605105418.22263-1-joakim.tjernlund@infinera.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/class/cdc-acm.c

index 5b0bffba4aac04d0390921ef33f7d3a4bc9c1896..2dc563b61b88a482392b2ed5ee736a40b3eb7fa2 100644 (file)
@@ -1627,6 +1627,8 @@ static int acm_reset_resume(struct usb_interface *intf)
 
 static const struct usb_device_id acm_ids[] = {
        /* quirky and broken devices */
+       { USB_DEVICE(0x0424, 0x274e), /* Microchip Technology, Inc. (formerly SMSC) */
+         .driver_info = DISABLE_ECHO, }, /* DISABLE ECHO in termios flag */
        { USB_DEVICE(0x076d, 0x0006), /* Denso Cradle CU-321 */
        .driver_info = NO_UNION_NORMAL, },/* has no union descriptor */
        { USB_DEVICE(0x17ef, 0x7000), /* Lenovo USB modem */