diff mbox series

USB: serial: pl2303: fix GL type detection

Message ID 20210826110239.5269-1-robert.marko@sartura.hr
State New
Headers show
Series USB: serial: pl2303: fix GL type detection | expand

Commit Message

Robert Marko Aug. 26, 2021, 11:02 a.m. UTC
At least some PL2303GL have a bcdDevice of 0x405 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")
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
---
 drivers/usb/serial/pl2303.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Johan Hovold Aug. 26, 2021, 11:07 a.m. UTC | #1
On Thu, Aug 26, 2021 at 01:02:39PM +0200, Robert Marko wrote:
> At least some PL2303GL have a bcdDevice of 0x405 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")
> Signed-off-by: Robert Marko <robert.marko@sartura.hr>

Thanks for the patch, looks good.

Could you post the output of lsusb -v for your device as well for
completeness?

Johan
Robert Marko Aug. 26, 2021, 11:09 a.m. UTC | #2
On Thu, Aug 26, 2021 at 1:08 PM Johan Hovold <johan@kernel.org> wrote:
>
> On Thu, Aug 26, 2021 at 01:02:39PM +0200, Robert Marko wrote:
> > At least some PL2303GL have a bcdDevice of 0x405 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")
> > Signed-off-by: Robert Marko <robert.marko@sartura.hr>
>
> Thanks for the patch, looks good.
>
> Could you post the output of lsusb -v for your device as well for
> completeness?

Sure, here it is:
Bus 001 Device 003: ID 067b:23d3 Prolific Technology, Inc. USB-Serial Controller
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x067b Prolific Technology, Inc.
  idProduct          0x23d3
  bcdDevice            4.05
  iManufacturer           1 Prolific Technology Inc.
  iProduct                2 USB-Serial Controller
  iSerial                 3 DTBOb106315
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0027
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
Device Status:     0x0000
  (Bus Powered)

Regards,
Robert
>
> Johan
Johan Hovold Aug. 30, 2021, 7:23 a.m. UTC | #3
On Thu, Aug 26, 2021 at 01:09:20PM +0200, Robert Marko wrote:
> On Thu, Aug 26, 2021 at 1:08 PM Johan Hovold <johan@kernel.org> wrote:

> >

> > On Thu, Aug 26, 2021 at 01:02:39PM +0200, Robert Marko wrote:

> > > At least some PL2303GL have a bcdDevice of 0x405 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")

> > > Signed-off-by: Robert Marko <robert.marko@sartura.hr>

> >

> > Thanks for the patch, looks good.

> >

> > Could you post the output of lsusb -v for your device as well for

> > completeness?

> 

> Sure, here it is:

> Bus 001 Device 003: ID 067b:23d3 Prolific Technology, Inc. USB-Serial Controller


Thanks! Now applied.

Johan
diff mbox series

Patch

diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 2ce9cbf49e97..3b579966fe73 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -433,6 +433,7 @@  static int pl2303_detect_type(struct usb_serial *serial)
 		switch (bcdDevice) {
 		case 0x100:
 		case 0x305:
+		case 0x405:
 			/*
 			 * Assume it's an HXN-type if the device doesn't
 			 * support the old read request value.