Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: serial: pl2303: fix type detection for odd device

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>

+3
+3
drivers/usb/serial/pl2303.c
··· 420 420 bcdUSB = le16_to_cpu(desc->bcdUSB); 421 421 422 422 switch (bcdUSB) { 423 + case 0x101: 424 + /* USB 1.0.1? Let's assume they meant 1.1... */ 425 + fallthrough; 423 426 case 0x110: 424 427 switch (bcdDevice) { 425 428 case 0x300: