This project is mirrored from https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git. Pull mirroring updated .
  1. 08 Sep, 2021 1 commit
  2. 04 Aug, 2021 1 commit
  3. 30 Jul, 2021 1 commit
  4. 15 Jun, 2021 1 commit
  5. 10 May, 2021 1 commit
  6. 08 Apr, 2021 3 commits
    • Johan Hovold's avatar
      USB: serial: stop reporting legacy UART types · f64d74a5
      Johan Hovold authored
      
      
      The TIOCGSERIAL ioctl can be used to set and retrieve the UART type for
      legacy UARTs, but some USB serial drivers have been reporting back
      random types in order to "make user-space happy".
      
      Some applications have historically expected TIOCGSERIAL to be
      implemented, but judging from the Debian sources, the port type not
      being PORT_UNKNOWN is only used to check for the existence of legacy
      serial ports (ttySn).
      
      Drivers like ftdi_sio have been using PORT_UNKNOWN for twenty years (and
      option for 10 years) without anyone complaining so let's stop reporting
      back anything else.
      
      In the unlikely event that this do cause problems, this should be fixed
      tree-wide anyway (e.g. for all USB serial drivers and also CDC-ACM).
      Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      f64d74a5
    • Johan Hovold's avatar
      USB: serial: add generic support for TIOCSSERIAL · 01fd45f6
      Johan Hovold authored
      
      
      TIOCSSERIAL is a horrid, underspecified, legacy interface which for most
      serial devices is only useful for setting the close_delay and
      closing_wait parameters.
      
      The closing_wait parameter determines how long to wait for the transfer
      buffers to drain during close and the default timeout of 30 seconds may
      not be sufficient at low line speeds. In other cases, when for example
      flow is stopped, the default timeout may instead be too long.
      
      Add generic support for TIOCSSERIAL and TIOCGSERIAL with handling of the
      three common parameters close_delay, closing_wait and line for the
      benefit of all USB serial drivers while still allowing drivers to
      implement further functionality through the existing callbacks.
      
      This currently includes a few drivers that report their base baud clock
      rate even if that is really only of interest when setting custom
      divisors through the deprecated ASYNC_SPD_CUST interface; an interface
      which only the FTDI driver actually implements.
      
      Some drivers have also been reporting back a fake UART type, something
      which should no longer be needed and will be dropped by a follow-on
      patch.
      Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      01fd45f6
    • Johan Hovold's avatar
      USB: serial: pl2303: fix TIOCGSERIAL implementation · 5b489012
      Johan Hovold authored
      
      
      TIOCSSERIAL is a horrid, underspecified, legacy interface which for most
      serial devices is only useful for setting the close_delay and
      closing_wait parameters.
      
      The port parameter is used to set the I/O port and does not make any
      sense to use for USB serial devices.
      
      The baud_base parameter could be used to set the UART base clock when it
      could not be detected but might as well be left unset when it is not
      known.
      
      The close_delay and closing_wait parameters returned by TIOCGSERIAL are
      specified in centiseconds. The driver does not yet support changing
      these, but let's report back the default values actually used (0.5 and
      30 seconds, respectively).
      Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      5b489012
  7. 17 Mar, 2021 6 commits
  8. 09 Feb, 2021 1 commit
  9. 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
  10. 29 Sep, 2020 1 commit
  11. 09 Jul, 2020 1 commit
  12. 12 Mar, 2020 1 commit
  13. 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
  14. 20 Jun, 2019 1 commit
  15. 21 May, 2019 1 commit
  16. 03 Apr, 2019 2 commits
  17. 17 Jan, 2019 1 commit
  18. 18 Dec, 2018 1 commit
  19. 13 Oct, 2018 1 commit
  20. 02 Aug, 2018 1 commit
  21. 22 May, 2018 1 commit
  22. 25 Jan, 2018 1 commit
  23. 04 Nov, 2017 3 commits
  24. 10 Aug, 2017 1 commit
  25. 28 Mar, 2017 2 commits
  26. 16 Mar, 2017 1 commit
  27. 31 Jan, 2017 1 commit
  28. 16 Jan, 2017 1 commit
  29. 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