1. 04 10月, 2017 2 次提交
  2. 29 8月, 2017 1 次提交
  3. 17 7月, 2017 1 次提交
  4. 24 5月, 2017 1 次提交
  5. 18 5月, 2017 2 次提交
  6. 31 3月, 2017 3 次提交
    • G
      serial: sh-sci: Fix (AUTO)RTS in sci_init_pins() · cfa6eb23
      Geert Uytterhoeven 提交于
      If a UART has dedicated RTS/CTS pins, and hardware control flow is
      disabled (or AUTORTS is not yet effective), changing any serial port
      configuration deasserts RTS, as .set_termios() calls sci_init_pins().
      
      To fix this, consider the current (AUTO)RTS state when (re)initializing
      the pins.  Note that for SCIFA/SCIFB, AUTORTS needs explicit
      configuration of the RTS# pin function, while (H)SCIF handles this
      automatically.
      
      Fixes: d2b9775d ("serial: sh-sci: Correct pin initialization on (H)SCIF")
      Fixes: e9d7a45a ("serial: sh-sci: Add pin initialization for SCIFA/SCIFB")
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      cfa6eb23
    • G
      serial: sh-sci: Fix late enablement of AUTORTS · 5f76895e
      Geert Uytterhoeven 提交于
      When changing hardware control flow for a UART with dedicated RTS/CTS
      pins, the new AUTORTS state is not immediately reflected in the
      hardware, but only when RTS is raised.  However, the serial core does
      not call .set_mctrl() after .set_termios(), hence AUTORTS may only
      become effective when the port is closed, and reopened later.
      Note that this problem does not happen when manually using stty to
      change CRTSCTS, as AUTORTS will work fine on next open.
      
      To fix this, call .set_mctrl() from .set_termios() when dedicated
      RTS/CTS pins are present, to refresh the AUTORTS or RTS state.
      This is similar to what other drivers supporting AUTORTS do (e.g.
      omap-serial).
      Reported-by: NBaumann, Christoph (C.) <cbaumann@visteon.com>
      Fixes: 33f50ffc ("serial: sh-sci: Fix support for hardware-assisted RTS/CTS")
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5f76895e
    • G
      serial: sh-sci: Fix hang in sci_reset() · e37f712f
      Geert Uytterhoeven 提交于
      When the .set_termios() callback resets the UART, it first waits (busy
      loops) until all characters in the transmit FIFO have been transmitted,
      to prevent a port configuration change from impacting these characters.
      
      However, if the UART has dedicated RTS/CTS hardware flow control
      enabled, these characters may have been stuck in the FIFO due to CTS not
      being asserted by the remote side.
      
        - When a new user opens the port, .set_termios() is called while
          transmission is still disabled, leading to an infinite loop:
      
      	NMI watchdog: BUG: soft lockup - CPU#0 stuck for 22s!
      
        - When an active user changes port configuration without waiting for
          the draining of the transmit FIFO, this may also block indefinitely,
          until CTS is asserted by the remote side.
      
      This has been observed with SCIFA (on r8a7740/armadillo), and SCIFB and
      HSCIF (on r8a7791/koelsch).
      
      To fix this, remove the code that waits for the draining of the transmit
      FIFO.
      Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e37f712f
  7. 14 3月, 2017 1 次提交
  8. 10 2月, 2017 1 次提交
  9. 06 2月, 2017 3 次提交
  10. 03 2月, 2017 2 次提交
  11. 27 1月, 2017 1 次提交
  12. 19 1月, 2017 11 次提交
  13. 12 1月, 2017 1 次提交
  14. 10 11月, 2016 1 次提交
  15. 02 9月, 2016 1 次提交
    • J
      tty: serial: constify uart_ops structures · 069a47e5
      Julia Lawall 提交于
      Check for uart_ops structures that are only stored in the ops field of a
      uart_port structure.  This field is declared const, so uart_ops structures
      that have this property can be declared as const also.
      
      The semantic patch that makes this change is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r disable optional_qualifier@
      identifier i;
      position p;
      @@
      static struct uart_ops i@p = { ... };
      
      @ok@
      identifier r.i;
      struct uart_port e;
      position p;
      @@
      e.ops = &i@p;
      
      @bad@
      position p != {r.p,ok.p};
      identifier r.i;
      struct uart_ops e;
      @@
      e@i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r.i;
      @@
      static
      +const
       struct uart_ops i = { ... };
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      069a47e5
  16. 27 6月, 2016 1 次提交
  17. 26 6月, 2016 7 次提交