1. 04 1月, 2014 21 次提交
  2. 03 12月, 2013 1 次提交
  3. 02 11月, 2013 12 次提交
  4. 18 9月, 2013 1 次提交
    • F
      USB: pl2303: distinguish between original and cloned HX chips · 7d26a78f
      Frank Schäfer 提交于
      According to Prolific, several (unauthorized) cheap and less functional
      clones of the PL2303HX chip are in circulation. [1]
      I've had the chance to test such a cloned device and it turned out that
      it doesn't support any baud rates above 115200 baud (original: 6 Mbaud)
      It also doesn't support the divisior based baud rate encoding method,
      so no continuous baud rate adjustment is possible.
      Nevertheless, these devices have been working (unintentionally) with
      the driver up to commit 61fa8d69 ("pl2303: also use the divisor based
      baud rate encoding method for baud rates < 115200 with HX chips"), and
      this commit broke support for them.
      Fortunately, it is pretty simple to distinguish between the original
      and the cloned HX chips, so I've added a check and an extra chip type
      to keep the clones working.
      The same check is used by the latest Prolific Windows driver, so it
      should be solid.
      
      [1] http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=225&pcid=41Signed-off-by: NFrank Schäfer <fschaefer.oss@googlemail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7d26a78f
  5. 15 8月, 2013 3 次提交
    • F
      pl2303: improve the chip type detection/distinction · 034d1527
      Frank Schäfer 提交于
      The driver currently knows about 3 different PL2303 chip types:
      The two legacy chip types type_0 and type_1 (PL2303H ?) and the HX
      type.
      The device distinction is currently completely based on the examination
      of the USB descriptors.
      During the last years, Prolific has introduced further PL2303 chips,
      such as the HXD (HX rev. D), TA (which replaced the X/HX chips), SA,
      RA, EA and TB variants.
      Unfortunately, all these new chips are currently detected as HX chips,
      because they are all using the same bMaxPacketSize0 = 0x40 value in the
      USB device descriptor.
      
      At this point it is not clear if these chips are really working with
      the driver, there are just some positive indicators (like device
      manufacturers claiming Linux support for these devices or commit
      8d48fdf6 "correctly handle baudrates above 115200" which should only
      be necessary for newer devices, ...)
      
      For a complete support of all devices, we need to distinguish between
      them, because they differ in several functional aspects, such  as the
      maximum supported baud rate (HXD, TB, EA: 12Mbps, HX, TA: 6Mbps,
      RA: 1Mbps, SA: 115.2kbps), handshaking line support, RS422/485 and
      GPIO ports support (currently not supported by the driver).
      And there might be further differences that we don't know yet.
      
      This patch improves the chip type detection by evaluating the bcdDevice
      value of the device descriptor. The values are taken from the
      datasheets and are safe to use because manufacturers can't change them:
      
      3.00: X/HX, TA
      4.00: HXD, EA, RA, SA
      5.00: TB
      
      The rest of the device descriptors is completely identical, so no
      further distinction is possible this way.
      Anyway, Prolifics "checkChipVersion.exe"-tool is definitely able to
      distinguish for example between the X/HX and the TA chips, so there
      must be a possibility to improve the distinction further...
      Signed-off-by: NFrank Schäfer <fschaefer.oss@googlemail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      034d1527
    • F
      pl2303: improve the chip type information output on startup · a77a8c23
      Frank Schäfer 提交于
      The chip type distinction is getting more and more relevant and
      complicating, so always print the chip type.
      Printing a name string is also much better than just printing an
      internal index number.
      Signed-off-by: NFrank Schäfer <fschaefer.oss@googlemail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a77a8c23
    • F
      pl2303: simplify the else-if contruct for type_1 chips in pl2303_startup() · 73b583af
      Frank Schäfer 提交于
      There is no need for two else-if constructs for the type_1 chip
      detection in pl2303_startup(), so merge them.
      Signed-off-by: NFrank Schäfer <fschaefer.oss@googlemail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      73b583af
  6. 13 8月, 2013 2 次提交
    • F
      usb: pl2303: add two comments concerning the supported baud rates with HX chips · c23bda36
      Frank Schäfer 提交于
      I've found some new datasheets which describe some additionally
      supported standard baud rates and I've verified them with my HX
      (rev. 3A) device. But adding support for individual (chip type
      specific) baud rates would add a good amount of extra code (especially
      when support for further chips will be added to the driver one day),
      which makes no sense as long as we are not using the direct baud rate
      encoding method for newer chips.
      So for now, just drop a comment about these additionally supported baud
      rates.
      
      The second comment is about the baud rate differences between the two
      encoding methods. In theory, we could optimize the code a bit by
      comparing the resulting baud rates of both methods and selecting the
      one which is closer to the requested baud rate. But that seems to be a
      bit overkill, because the differences are very small and the device
      likely uses the same baud rate generator for both methods so that the
      resulting baud rate would be the same.
      Signed-off-by: NFrank Schäfer <fschaefer.oss@googlemail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c23bda36
    • F
      usb: pl2303: also use the divisor based baud rate encoding method for baud... · 61fa8d69
      Frank Schäfer 提交于
      usb: pl2303: also use the divisor based baud rate encoding method for baud rates < 115200 with HX chips
      
      Now that the divisor based baud rate encoding method has been fixed and
      extended, it can also be used for baud rates < 115200 baud with HX
      chips.
      This makes it possible to adjust the baud rate almost continuously
      instead of just beeing able to select between 16 fixed standard values.
      
      Tested with a PL2303HX 04463A (week 46, 2004, rev 3A).
      Signed-off-by: NFrank Schäfer <fschaefer.oss@googlemail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      61fa8d69