1. 14 2月, 2014 29 次提交
  2. 13 2月, 2014 1 次提交
  3. 23 1月, 2014 3 次提交
  4. 14 1月, 2014 1 次提交
    • M
      tty/serial: at91: disable uart timer at start of shutdown · 8bc661bf
      Marek Roszko 提交于
      The uart timer will schedule a tasklet when it fires. It is possible that it
      can fire inside _shutdown before it is killed in the dma and pdc cleanup
      routines. This causes a tasklet that exists after the port is shutdown, so when
      the kernel finally executes it, it panics as the tty port is NULL.
      
      This is a somewhat rare condition but its possible if a program keeps on
      opening/closing the port. It has been observed in particular with systemd
      boot messages that were causing a kernel panic because of this behavior.
      
      Moving the timer deletion to the beginning of the function stops a tasklet from
      being scheduled unexpectedly.
      Signed-off-by: NMarek Roszko <mark.roszko@gmail.com>
      Cc: stable <stable@vger.kernel.org> # v3.12
      [nicolas.ferre@atmel.com: modify commit message, call setup_timer() in any case]
      Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8bc661bf
  5. 13 1月, 2014 2 次提交
  6. 09 1月, 2014 1 次提交
  7. 08 1月, 2014 3 次提交
    • S
      serial: 8250: enable UART_BUG_NOMSR for Tegra · 3685f19e
      Stephen Warren 提交于
      Tegra chips have 4 or 5 identical UART modules embedded. UARTs C..E have
      their MODEM-control signals tied off to a static state. However UARTs A
      and B can optionally route those signals to/from package pins, depending
      on the exact pinmux configuration.
      
      When these signals are not routed to package pins, false interrupts may
      trigger either temporarily, or permanently, all while not showing up in
      the IIR; it will read as NO_INT. This will eventually lead to the UART
      IRQ being disabled due to unhandled interrupts. When this happens, the
      kernel may print e.g.:
      
          irq 68: nobody cared (try booting with the "irqpoll" option)
      
      In order to prevent this, enable UART_BUG_NOMSR. This prevents
      UART_IER_MSI from being enabled, which prevents the false interrupts
      from triggering.
      
      In practice, this is not needed under any of the following conditions:
      
      * On Tegra chips after Tegra30, since the HW bug has apparently been
        fixed.
      
      * On UARTs C..E since their MODEM control signals are tied to the correct
        static state which doesn't trigger the issue.
      
      * On UARTs A..B if the MODEM control signals are routed out to package
        pins, since they will then carry valid signals.
      
      However, we ignore these exceptions for now, since they are only relevant
      if a board actually hooks up more than a 4-wire UART, and no currently
      supported board does this. If we ever support a board that does, we can
      refine the algorithm that enables UART_BUG_NOMSR to take those exceptions
      into account, and/or read a flag from DT/... that indicates that the
      board has hooked up and pinmux'd more than a 4-wire UART.
      
      Reported-by: Olof Johansson <olof@lixom.net> # autotester
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3685f19e
    • M
      tty/serial: at91: reset rx_ring when port is shutdown · bb7e73c5
      Mark Deneen 提交于
      When using RX DMA, the driver won't pass any data to the uart layer
      until the buffer is flipped. When the port is shutdown, the dma buffers
      are unmapped, but the head and tail of the ring buffer are not reseted.
      Since the serial console will keep the port open, this will only
      present itself when the uart is not shared.
      
      To reproduce the issue, with an unpatched driver, run a getty on /dev/ttyS0
      with no serial console and exit. Getty will exit, and when the new one returns
      you will be unable to log in.  If you hold down a key long enough to fill the
      DMA buffer and flip it, you can then log in.
      Signed-off-by: NMark Deneen <mdeneen@gmail.com>
      Acked-by: NLeilei Zhao <leilei.zhao@atmel.com>
      [nicolas.ferre@atmel.com: adapt to mainline kernel, handle !DMA case]
      Cc: <stable@vger.kernel.org> # v3.12
      Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bb7e73c5
    • M
      tty/serial: at91: fix race condition in atmel_serial_remove · f50c995f
      Marek Roszko 提交于
      The _remove callback could be called when a tasklet is scheduled. tasklet_kill
      was called inside the function in order to free up any scheduled tasklets.
      However it was called after uart_remove_one_port which destroys tty references
      needed in the port for atmel_tasklet_func.
      Simply putting the tasklet_kill at the start of the function will prevent this
      conflict.
      Signed-off-by: NMarek Roszko <mark.roszko@gmail.com>
      Acked-by: NLeilei Zhao <leilei.zhao@atmel.com>
      Cc: <stable@vger.kernel.org> # v3.12
      Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f50c995f