1. 14 9月, 2016 1 次提交
  2. 02 9月, 2016 1 次提交
  3. 31 8月, 2016 2 次提交
  4. 26 6月, 2016 1 次提交
  5. 04 5月, 2016 1 次提交
  6. 01 5月, 2016 9 次提交
  7. 07 2月, 2016 1 次提交
  8. 29 1月, 2016 9 次提交
  9. 14 12月, 2015 2 次提交
  10. 18 10月, 2015 1 次提交
  11. 05 10月, 2015 1 次提交
    • M
      serial_core: support native endianness · d215d809
      Max Filippov 提交于
      There are three natural ways in which devices may be wired to the system:
      little endian (device receives correctly ordered bits of a word written
      by little-endian CPU to its register, but big-endian CPU needs to swap
      bytes of a word before writing it), big endian (same, but with big-endian
      CPU in more favourable position) and native endian (CPU of either
      endianness may do word-sized I/O without need for byteswapping).
      
      Adding an option for native endianness allows using single kernel command
      line for boards with native-endian serial ports on bi-endian
      architectures. This goes in parallel with 'native-endian' DTS attribute.
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d215d809
  12. 05 8月, 2015 2 次提交
  13. 24 7月, 2015 1 次提交
    • P
      serial: core: Fix crashes while echoing when closing · e144c58c
      Peter Hurley 提交于
      While closing, new rx data may be received after the input buffers
      have been flushed but before stop_rx() halts receiving [1]. The
      new data might not be processed by flush_to_ldisc() until after
      uart_shutdown() and normal input processing is re-enabled (ie.,
      tty->closing = 0). The race is outlined below:
      
      CPU 0                         | CPU 1
                                    |
      uart_close()                  |
         tty_port_close_start()     |
            tty->closing = 1        |
            tty_ldisc_flush()       |
                                    | => IRQ
                                    |   while (LSR & data ready)
                                    |      uart_insert_char()
                                    |   tty_flip_buffer_push()
                                    | <= EOI
         stop_rx()                  |   .
         uart_shutdown()            |   .
            free xmit.buf           |   .
         tty_port_tty_set(NULL)     |   .
         tty->closing = 0           |   .
                                    | flush_to_ldisc()
                                    |   n_tty_receive_buf_common()
                                    |      __receive_buf()
                                    |         ...
                                    |         commit_echoes()
                                    |            uart_flush_chars()
                                    |               __uart_start()
                                    | ** OOPS on port.tty deref **
         tty_ldisc_flush()          |
      
      Input processing must be prevented from echoing (tty->closing = 1)
      until _after_ the input buffers have been flushed again at the end
      of uart_close().
      
      [1] In fact, some input may actually be buffered _after_ stop_rx()
      since the rx interrupt may have already triggered but not yet been
      handled when stop_rx() disables rx interrupts.
      
      Fixes: 2e758910 ("serial: core: Flush ldisc after dropping port
      mutex in uart_close()")
      Reported-by: NRobert Elliott <elliott@hp.com>
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e144c58c
  14. 13 6月, 2015 1 次提交
  15. 01 6月, 2015 1 次提交
  16. 07 5月, 2015 1 次提交
  17. 28 4月, 2015 1 次提交
  18. 26 3月, 2015 2 次提交
  19. 07 3月, 2015 2 次提交