This project is mirrored from https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git. Pull mirroring updated .
  1. 17 Mar, 2021 4 commits
  2. 09 Feb, 2021 1 commit
  3. 18 Jan, 2021 1 commit
    • Johan Hovold's avatar
      USB: serial: pl2303: fix line-speed handling on newer chips · 979d9cbe
      Johan Hovold authored
      The latest chip family (HXN) apparently does not support setting the
      line speed using divisors and instead needs to use the direct encoding
      scheme for all rates.
      
      This specifically enables 50, 110, 134, 200 bps and other rates not
      supported by the original chip type.
      
      Fixes: ebd09f1c
      
       ("USB: serial: pl2303: add support for PL2303HXN")
      Cc: stable@vger.kernel.org      # 5.5
      Cc: Charles Yeh <charlesyeh522@gmail.com>
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      979d9cbe
  4. 29 Sep, 2020 1 commit
  5. 09 Jul, 2020 1 commit
  6. 12 Mar, 2020 1 commit
  7. 23 Oct, 2019 1 commit
    • Charles Yeh's avatar
      USB: serial: pl2303: add support for PL2303HXN · ebd09f1c
      Charles Yeh authored
      
      
      Prolific has developed a new USB to UART chip: PL2303HXN
      PL2303HXN : PL2303GC/PL2303GS/PL2303GT/PL2303GL/PL2303GE/PL2303GB
      The Vendor request used by the PL2303HXN (TYPE_HXN) is different from
      the existing PL2303 series (TYPE_HX & TYPE_01).
      Therefore, different Vendor requests are used to issue related commands.
      
      1. Added a new TYPE_HXN type in pl2303_type_data, and then executes
         new Vendor request,new flow control and other related instructions
         if TYPE_HXN is recognized.
      
      2. Because the new PL2303HXN only accept the new Vendor request,
         the old Vendor request cannot be accepted (the error message
         will be returned)
         So first determine the TYPE_HX or TYPE_HXN through
         PL2303_READ_TYPE_HX_STATUS in pl2303_startup.
      
        2.1 If the return message is "1", then the PL2303 is the existing
            TYPE_HX/ TYPE_01 series.
            The other settings in pl2303_startup are to continue execution.
        2.2 If the return message is "not 1", then the PL2303 is the new
            TYPE_HXN series.
            The other settings in pl2303_startup are ignored.
            (PL2303HXN will directly use the default value in the hardware,
             no need to add additional settings through the software)
      
      3. In pl2303_open: Because TYPE_HXN is different from the instruction of reset
         down/up stream used by TYPE_HX.
         Therefore, we will also execute different instructions here.
      
      4. In pl2303_set_termios: The UART flow control instructions used by
         TYPE_HXN/TYPE_HX/TYPE_01 are different.
         Therefore, we will also execute different instructions here.
      
      5. In pl2303_vendor_read & pl2303_vendor_write, since TYPE_HXN is different
         from the vendor request instruction used by TYPE_HX/TYPE_01,
         it will also execute different instructions here.
      
      6. In pl2303_update_reg: TYPE_HXN used different register for flow control.
         Therefore, we will also execute different instructions here.
      Signed-off-by: default avatarCharles Yeh <charlesyeh522@gmail.com>
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      ebd09f1c
  8. 20 Jun, 2019 1 commit
  9. 21 May, 2019 1 commit
  10. 03 Apr, 2019 2 commits
  11. 17 Jan, 2019 1 commit
  12. 18 Dec, 2018 1 commit
  13. 13 Oct, 2018 1 commit
  14. 02 Aug, 2018 1 commit
  15. 22 May, 2018 1 commit
  16. 25 Jan, 2018 1 commit
  17. 04 Nov, 2017 3 commits
  18. 10 Aug, 2017 1 commit
  19. 28 Mar, 2017 2 commits
  20. 16 Mar, 2017 1 commit
  21. 31 Jan, 2017 1 commit
  22. 16 Jan, 2017 1 commit
  23. 04 Jan, 2017 1 commit
    • Johan Hovold's avatar
      USB: serial: pl2303: fix NULL-deref at open · 76ab439e
      Johan Hovold authored
      Fix NULL-pointer dereference in open() should a type-0 or type-1 device
      lack the expected endpoints:
      
      Unable to handle kernel NULL pointer dereference at virtual address 00000030
      ...
      PC is at pl2303_open+0x38/0xec [pl2303]
      
      Note that a missing interrupt-in endpoint would have caused open() to
      fail.
      
      Fixes: 1da177e4
      
       ("Linux-2.6.12-rc2")
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      76ab439e
  24. 30 Jul, 2015 1 commit
    • Michał Pecio's avatar
      USB: pl2303: fix baud-rate divisor calculations · 49bda212
      Michał Pecio authored
      
      
      This commit fixes the following issues:
      
      1. The 9th bit of buf was believed to be the LSB of divisor's
      exponent, but the hardware interprets it as MSB (9th bit) of the
      mantissa. The exponent is actually one bit shorter and applies
      to base 4, not 2 as previously believed.
      
      2. Loop iterations doubled the exponent instead of incrementing.
      
      3. The exponent wasn't checked for overflow.
      
      4. The function returned requested rate instead of actual rate.
      
      Due to issue #2, the old code deviated from the wrong formula
      described in #1 and actually yielded correct rates when divisor
      was lower than 4096 by using exponents of 0, 2 or 4 base-2,
      interpreted as 0, 1, 2 base-4 with the 9th mantissa bit clear.
      However, at 93.75 kbaud or less the rate turned out too slow
      due to #2 or too fast due to #2 and #3.
      
      I tested this patch by sending and validating 0x00,0x01,..,0xff
      to an FTDI dongle at 234, 987, 2401, 9601, 31415, 115199, 250k,
      500k, 750k, 1M, 1.5M, 3M+1 baud. All rates passed.
      
      I also used pv to check speed at some rates unsupported by FTDI:
      45 (the lowest possible), 2M, 4M, 5M and 6M-1. Looked sane.
      Signed-off-by: default avatarMichal Pecio <michal.pecio@gmail.com>
      Fixes: 399aa9a7
      
       ("USB: pl2303: use divisors for unsupported baud
      rates")
      Cc: stable <stable@vger.kernel.org> # v3.18
      [johan: update summary ]
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      49bda212
  25. 29 Apr, 2015 1 commit
  26. 26 Feb, 2015 1 commit
  27. 01 Sep, 2014 1 commit
  28. 18 Aug, 2014 1 commit
  29. 16 Apr, 2014 1 commit
  30. 08 Jan, 2014 1 commit
  31. 03 Jan, 2014 3 commits