1. 11 9月, 2014 2 次提交
  2. 05 8月, 2014 1 次提交
  3. 02 8月, 2014 1 次提交
  4. 28 7月, 2014 5 次提交
  5. 24 7月, 2014 2 次提交
  6. 23 7月, 2014 2 次提交
  7. 19 7月, 2014 1 次提交
  8. 18 7月, 2014 12 次提交
  9. 12 7月, 2014 5 次提交
  10. 11 7月, 2014 9 次提交
    • P
      serial: arc_uart: Use uart_circ_empty() for open-coded comparison · 99ecb001
      Peter Hurley 提交于
      Replace open-coded test for empty tx ring buffer with equivalent
      helper function, uart_circ_empty(). No functional change.
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      99ecb001
    • P
      serial: Test for no tx data on tx restart · c557d392
      Peter Hurley 提交于
      Commit 717f3bba,
      'serial_core: Fix conditional start_tx on ring buffer not empty'
      exposes an incorrect assumption in several drivers' start_tx methods;
      the tx ring buffer can, in fact, be empty when restarting tx while
      performing flow control.
      
      Affected drivers:
      sunsab.c
      ip22zilog.c
      pmac_zilog.c
      sunzilog.c
      m32r_sio.c
      imx.c
      
      Other in-tree serial drivers either are not affected or already
      test for empty tx ring buffer before transmitting.
      
      Test for empty tx ring buffer in start_tx() method, after transmitting
      x_char (if applicable).
      Reported-by: NAaro Koskinen <aaro.koskinen@iki.fi>
      Cc: Seth Bollinger <sethb@digi.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Cc: stable <stable@vger.kernel.org> # 3.15
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c557d392
    • S
      tty: serial: msm: Support big-endian CPUs · 68252424
      Stephen Boyd 提交于
      To support big-endian CPUs use the string versions of the io
      read/write macros on the TX/RX fifos and the non-raw variants of
      the readl/writel macros throughout. This way we don't byteswap
      the characters coming from the fifos but we properly deal with
      the little-endian nature of the serial hardware while controlling
      it.
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      68252424
    • D
      serial: txx9: remove duplicate TXX9_SIFCR_TDIL_MASK define · db3a1a43
      Dan Carpenter 提交于
      The TXX9_SIFCR_TDIL_MASK define is cut and pasted twice so we can delete
      the second instance.
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      db3a1a43
    • P
      serial: blackfin: Fix CTS flow control · 8bd67d7d
      Peter Hurley 提交于
      blackfin uart port drivers mistakenly set the struct uart_port
      flags bit UPF_BUG_THRE (which only has meaning to the 8250 core)
      while trying to set ASYNC_CTS_FLOW.
      
      Uart port drivers can override termios settings based on actual
      hardware support in their .set_termios method; the serial core
      sets the appropriate port flags based on the overrides.
      Overriding only the initial termios settings is accomplished
      by only perform those overrides if the old termios parameter is
      NULL.
      
      CC: Sonic Zhang <sonic.zhang@analog.com>
      CC: adi-buildroot-devel@lists.sourceforge.net
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8bd67d7d
    • P
      tty: serial: Fix termios/port flags mismatch · c18b55fd
      Peter Hurley 提交于
      Uart port drivers may reconfigure termios settings based on available
      hardware support; set/clear ASYNC_CTS_FLOW and ASYNC_CHECK_CD _after_
      calling the port driver's .set_termios method.
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c18b55fd
    • P
      tty: Remove tty_hung_up_p() tests from tty drivers' open() · e359a4e3
      Peter Hurley 提交于
      Since at least before 2.6.30, it has not been possible to observe
      a hung up file pointer in a tty driver's open() method unless/until
      the driver open() releases the tty_lock() (eg., before blocking).
      
      This is because tty_open() adds the file pointer while holding
      the tty_lock() _and_ doesn't release the lock until after calling
      the tty driver's open() method. [ Before tty_lock(), this was
      lock_kernel(). ]
      
      Since __tty_hangup() first waits on the tty_lock() before
      enumerating and hanging up the open file pointers, either
      __tty_hangup() will wait for the tty_lock() or tty_open() will
      not yet have added the file pointer. For example,
      
      CPU 0                          |  CPU 1
                                     |
      tty_open                       |  __tty_hangup
        ..                           |    ..
        tty_lock                     |    ..
        tty_reopen                   |    tty_lock  / blocks
        ..                           |
        tty_add_file(tty, filp)      |
        ..                           |
        tty->ops->open(tty, filp)    |
          tty_port_open              |
            tty_port_block_til_ready |
              ..                     |
              while (1)              |
                ..                   |
                tty_unlock           |    / unblocks
                schedule             |    for each filp on tty->tty_files
                                     |      f_ops = tty_hung_up_fops;
                                     |    ..
                                     |    tty_unlock
                tty_lock             |
        ..                           |
        tty_unlock                   |
      
      Note that since tty_port_block_til_ready() and similar drop
      the tty_lock while blocking, when woken, the file pointer
      must then be tested for having been hung up.
      
      Also, fix bit-rotted drivers that used extra_count to track the
      port->count bump.
      
      CC: Mikael Starvik <starvik@axis.com>
      CC: Samuel Ortiz <samuel@sortiz.org>
      CC: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Acked-by: NJesper Nilsson <jesper.nilsson@axis.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e359a4e3
    • P
      serial: Use UPF_* constants with struct uart_port flags · 5fda7a0e
      Peter Hurley 提交于
      Fix ASYNC_* constant usage that should be the corresponding UPF_*
      constant.
      
      CC: Grant Likely <grant.likely@linaro.org>
      CC: Rob Herring <robh+dt@kernel.org>
      CC: devicetree@vger.kernel.org
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5fda7a0e
    • P
      tty: Move tty->closing from port lock critical section · ddc7b758
      Peter Hurley 提交于
      tty->closing informs the line discipline that the hardware will
      be shutting down imminently, and to disable further input other
      than soft flow control (but to still allow additional output).
      
      However, the tty lock is the necessary lock for preventing
      concurrent changes to tty->closing. As shown by the call-tree
      audit [1] of functions that modify tty->closing, the tty lock
      is already held for those functions.
      
      [1]
      Call-tree audit of functions that modify tty->closing
      * does not include call tree to tty_port_close(), tty_port_close_start(),
        or tty_port_close_end() which is already documented in
        'tty: Document locking for tty_port_close{,start,end}' that shows
        callers to those 3 functions hold the tty lock
      
      tty_release()
        tty->ops->close() --+
                            |
      __tty_hangup()        |
        tty->ops->close() --+
                            |
              mp_close():drivers/staging/sb105x/sb_pci_mp.c
              dngc_tty_close():drivers/staging/dgnc/dgnc_tty.c
              dgap_tty_close():drivers/staging/dgap/dgap_tty.c
              dgrp_tty_close():drivers/staging/dgrp/dgrp_tty.c
              rp_close():drivers/tty/rocket.c
              hvsi_close():drivers/tty/hvc/hvsi.c
              rs_close():drivers/tty/serial/68328serial.c
              rs_close():drivers/tty/serial/crisv10.c
              uart_close():drivers/tty/serial/serial_core.c
              isdn_tty_close():drivers/isdn/i4l/isdn_tty.c
              tty3215_close():drivers/s390/char/con3215.c
      
      tty_open()
        tty_ldisc_setup() ----+
                              |
      __tty_hangup()          |
        tty_ldisc_hangup() ---+
                              |
      tty_set_ldisc() --------+
        tty_ldisc_restore() --+
                              |
                              +- tty_ldisc_open()
                                   ld->ops->open() --+
                                                     |
                                                     +- n_tty_open()
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ddc7b758