USB: serial: pl2303: fix GT type detection
authorJohan Hovold <johan@kernel.org>
Wed, 4 Aug 2021 09:31:00 +0000 (11:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Aug 2021 11:32:13 +0000 (13:32 +0200)
commit 3212a99349cee5fb611d3ffcf0e65bc3cd6dcf2f upstream.

At least some PL2303GT have a bcdDevice of 0x305 instead of 0x100 as the
datasheet claims. Add it to the list of known release numbers for the
HXN (G) type.

Fixes: 894758d0571d ("USB: serial: pl2303: tighten type HXN (G) detection")
Reported-by: Vasily Khoruzhick <anarsoul@gmail.com>
Tested-by: Vasily Khoruzhick <anarsoul@gmail.com>
Cc: stable@vger.kernel.org # 5.13
Link: https://lore.kernel.org/r/20210804093100.24811-1-johan@kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/pl2303.c

index f9b69f7141be4b557dc2f1cb91769c3a4ddadd4c..2ce9cbf49e9745752f46e8be1c93714d21920be2 100644 (file)
@@ -432,6 +432,7 @@ static int pl2303_detect_type(struct usb_serial *serial)
        case 0x200:
                switch (bcdDevice) {
                case 0x100:
+               case 0x305:
                        /*
                         * Assume it's an HXN-type if the device doesn't
                         * support the old read request value.