Re: [PATCH v3 0/2] Add support for MaxLinear/Exar USB to serial converters

From: Mauro Carvalho Chehab
Date: Fri Jun 05 2020 - 07:14:03 EST


Em Fri, 1 May 2020 00:19:22 +0530
mani@xxxxxxxxxx escreveu:

> From: Manivannan Sadhasivam <mani@xxxxxxxxxx>
>
> Hello,
>
> This series adds support for MaxLinear/Exar USB to serial converters.
> This driver only supports XR21V141X series but it can easily be extended
> to other series in future.
>
> This driver is inspired from the initial one submitted by Patong Yang:
>
> https://patchwork.kernel.org/patch/10543261/
>
> While the initial driver was a custom tty USB driver exposing whole
> new serial interface ttyXRUSBn, this version is completely based on USB
> serial core thus exposing the interfaces as ttyUSBn. This will avoid
> the overhead of exposing a new USB serial interface which the userspace
> tools are unaware of.

Hmm... I guess you also need the enclosed patch, to ensure that cdc_acm
won't try to hijack it, when the Kernel is built with both drivers.

Thanks,
Mauro

[PATCH] usb: cdc-acm: ignore Exar XR21V141X when serial driver is
built

The RTS/CTS line discipline for this device doesn't follow
the standard. So, in order to properly support TX, a separate
driver is needed.

Ensure that cdc_acm will ignore it during probe time, if the
Kernel is built with support for it.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>

diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index ded8d93834ca..f87288834ded 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -1889,7 +1889,11 @@ static const struct usb_device_id acm_ids[] = {
.driver_info = IGNORE_DEVICE,
},
#endif
-
+#if IS_ENABLED(CONFIG_USB_SERIAL_XR)
+ { USB_DEVICE(0x04e2, 0x1410), /* XR21V141X uses a different rts/cts discipline */
+ .driver_info = IGNORE_DEVICE,
+ },
+#endif
/*Samsung phone in firmware update mode */
{ USB_DEVICE(0x04e8, 0x685d),
.driver_info = IGNORE_DEVICE,