summaryrefslogtreecommitdiff
path: root/recipes-kernel/linux/linux-at91-5.4.81/linux-5.4-cdc-acm-ignore-exar-devices.patch
blob: b4d68e5675bbedccc66829ad58896045f7573a46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From 37e541cbd166fcfd7a736d25ced4938647c9a167 Mon Sep 17 00:00:00 2001
From: Mykyta Dorokhin <mykyta.dorokhin@globallogic.com>
Date: Tue, 12 Jan 2021 23:20:37 +0200
Subject: [PATCH] linux-5.4-cdc-acm-ignore-exar-devices

---
 drivers/usb/class/cdc-acm.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 16c98e7..422f216 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -1174,8 +1174,10 @@ static int acm_probe(struct usb_interface *intf,
 	/* normal quirks */
 	quirks = (unsigned long)id->driver_info;
 
-	if (quirks == IGNORE_DEVICE)
+	if (quirks == IGNORE_DEVICE) {
+		dev_dbg(&intf->dev, "Ignoring device\n");
 		return -ENODEV;
+	}
 
 	memset(&h, 0x00, sizeof(struct usb_cdc_parsed_header));
 
@@ -1937,6 +1939,20 @@ static int acm_pre_reset(struct usb_interface *intf)
 	.driver_info = SEND_ZERO_PACKET,
 	},
 
+	/* Ignore Exar XR21V141X usb serial chips
+	 * This elminates conflicting with the Exar vizzini driver.
+	 * The ACM driver cannot use features in the Exar chip,
+	 * such as setting the baud rate. */
+	{USB_DEVICE(0x04e2, 0x1410),
+	.driver_info = IGNORE_DEVICE,
+	},
+	{USB_DEVICE(0x04e2, 0x1412),
+	.driver_info = IGNORE_DEVICE,
+	},
+	{USB_DEVICE(0x04e2, 0x1414),
+	.driver_info = IGNORE_DEVICE,
+	},
+
 	/* control interfaces without any protocol set */
 	{ USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM,
 		USB_CDC_PROTO_NONE) },
-- 
1.9.1