diff mbox series

[I/J,K/Unstable,OEM-5.14/OEM-5.17,SRU,1/1] USB: serial: pl2303: fix type detection for odd device

Message ID 20220613061105.38683-2-po-hsu.lin@canonical.com
State New
Headers show
Series pl2303: fix type detection for odd device | expand

Commit Message

Po-Hsu Lin June 13, 2022, 6:11 a.m. UTC
From: Johan Hovold <johan@kernel.org>

BugLink: https://bugs.launchpad.net/bugs/1967493

At least one pl2303 device has a bcdUSB of 1.0.1 which most likely was
was intended as 1.1.

Allow bcdDevice 1.0.1 but interpret it as 1.1.

Fixes: 1e9faef4d26d ("USB: serial: pl2303: fix HX type detection")
Cc: stable@vger.kernel.org      # 5.13
Link: https://lore.kernel.org/linux-usb/CAJixRzqf4a9-ZKZDgWxicc_BpfdZVE9qqGmkiO7xEstOXUbGvQ@mail.gmail.com
Reported-by: Gary van der Merwe <gary.vandermerwe@fnb.co.za>
Link: https://lore.kernel.org/r/20220517161736.13313-1-johan@kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
(cherry picked from commit beeb68a71edc41648b6948d027b810c5acc7a2aa)
Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
---
 drivers/usb/serial/pl2303.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 257422b..94a3509 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -419,6 +419,9 @@  static int pl2303_detect_type(struct usb_serial *serial)
 	bcdUSB = le16_to_cpu(desc->bcdUSB);
 
 	switch (bcdUSB) {
+	case 0x101:
+		/* USB 1.0.1? Let's assume they meant 1.1... */
+		fallthrough;
 	case 0x110:
 		switch (bcdDevice) {
 		case 0x300: