1. 08 1月, 2014 1 次提交
    • M
      tty/serial: at91: Handle shutdown more safely · 0cc7c6c7
      Marek Roszko 提交于
      Interrupts were being cleaned up late in the shutdown handler, it is possible
      that an interrupt can occur and schedule a tasklet that runs after the port is
      cleaned up. There is a null dereference due to this race condition with the
      following stacktrace:
      
      [<c02092b0>] (atmel_tasklet_func+0x514/0x814) from [<c001fd34>] (tasklet_action+0x70/0xa8)
      [<c001fd34>] (tasklet_action+0x70/0xa8) from [<c001f60c>] (__do_softirq+0x90/0x144)
      [<c001f60c>] (__do_softirq+0x90/0x144) from [<c001fa18>] (irq_exit+0x40/0x4c)
      [<c001fa18>] (irq_exit+0x40/0x4c) from [<c000e298>] (handle_IRQ+0x64/0x84)
      [<c000e298>] (handle_IRQ+0x64/0x84) from [<c000d6c0>] (__irq_svc+0x40/0x50)
      [<c000d6c0>] (__irq_svc+0x40/0x50) from [<c0208060>] (atmel_rx_dma_release+0x88/0xb8)
      [<c0208060>] (atmel_rx_dma_release+0x88/0xb8) from [<c0209740>] (atmel_shutdown+0x104/0x160)
      [<c0209740>] (atmel_shutdown+0x104/0x160) from [<c0205e8c>] (uart_port_shutdown+0x2c/0x38)
      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>
      0cc7c6c7
  2. 18 10月, 2013 3 次提交
  3. 01 8月, 2013 1 次提交
  4. 30 7月, 2013 7 次提交
  5. 27 7月, 2013 1 次提交
  6. 25 7月, 2013 1 次提交
  7. 25 6月, 2013 1 次提交
  8. 16 3月, 2013 1 次提交
  9. 16 1月, 2013 2 次提交
    • J
      TTY: switch tty_flip_buffer_push · 2e124b4a
      Jiri Slaby 提交于
      Now, we start converting tty buffer functions to actually use
      tty_port. This will allow us to get rid of the need of tty in many
      call sites. Only tty_port will needed and hence no more
      tty_port_tty_get in those paths.
      
      Now, the one where most of tty_port_tty_get gets removed:
      tty_flip_buffer_push.
      
      IOW we also closed all the races in drivers not using tty_port_tty_get
      at all yet.
      
      Also we move tty_flip_buffer_push declaration from include/linux/tty.h
      to include/linux/tty_flip.h to all others while we are changing it
      anyway.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2e124b4a
    • J
      TTY: switch tty_insert_flip_string · 05c7cd39
      Jiri Slaby 提交于
      Now, we start converting tty buffer functions to actually use
      tty_port. This will allow us to get rid of the need of tty in many
      call sites. Only tty_port will needed and hence no more
      tty_port_tty_get in those paths.
      
      tty_insert_flip_string this time.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      05c7cd39
  10. 22 11月, 2012 3 次提交
  11. 16 11月, 2012 1 次提交
  12. 06 11月, 2012 1 次提交
  13. 13 10月, 2012 1 次提交
  14. 10 4月, 2012 1 次提交
    • S
      tty/serial: atmel_serial: fix RS485 half-duplex problem · 57c36868
      Siftar, Gabe 提交于
      On our custom board, we are using RS485 in half-duplex mode on an AT91SAM9G45.
      SER_RS485_RX_DURING_TX is not set as we do not want to receive the data we
      transmit (our transceiver will receive transmitted data).
      Although the current driver attempts to disable and enable the receiver at the
      appropriate points, incoming data is still loaded into the receive register
      causing our code to receive the very last byte that was sent once the receiver
      is enabled.
      
      I ran this by Atmel support and they wrote: "The issue comes from the fact
      that you disable the PDC/DMA Reception and not the USART Reception channel. In
      your case, the[n] you will still receive data into the USART_RHR register, and
      maybe you [h]ave the overrun flag set. So please disable the USART reception
      channel."
      
      The following patch should force the driver to enable/disable the receiver via
      RXEN/RXDIS fields of the USART control register. It fixed the issue I was
      having.
      Signed-off-by: NGabe Siftar <gabe.siftar@getingeusa.com>
      [nicolas.ferre@atmel.com: slightly modify commit message]
      Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      57c36868
  15. 23 2月, 2012 1 次提交
  16. 05 1月, 2012 1 次提交
  17. 16 11月, 2011 2 次提交
  18. 19 10月, 2011 5 次提交
  19. 25 8月, 2011 1 次提交
  20. 23 8月, 2011 1 次提交
  21. 08 8月, 2011 1 次提交
  22. 25 6月, 2011 1 次提交
    • J
      atmel_serial: fix internal port num · deba1a0d
      Jean-Christophe PLAGNIOL-VILLARD 提交于
      the atmel_ports is link to the console number and not the device id
      
      this was not detected on at91 as we always register the dbgu on the console
      as ttyS0
      
      tested on at91sam9263 by setting the dbgu as ttyS1 and use as console
      
      diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
      index 70e5646..9b8a14f 100644
      - a/arch/arm/mach-at91/board-sam9263ek.c
      + b/arch/arm/mach-at91/board-sam9263ek.c
      @@ -58,14 +58,14 @@ static void __init ek_init_early(void)
              /* Initialize processor: 16.367 MHz crystal */
              at91_initialize(16367660);
      
      -       /* DBGU on ttyS0. (Rx & Tx only) */
      -       at91_register_uart(0, 0, 0);
      +       /* DBGU on ttyS1. (Rx & Tx only) */
      +       at91_register_uart(0, 1, 0);
      
      -       /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */
      -       at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
      +       /* USART0 on ttyS0. (Rx, Tx, RTS, CTS) */
      +       at91_register_uart(AT91SAM9263_ID_US0, 0, ATMEL_UART_CTS | ATMEL_UART_RTS);
      
      -       /* set serial console to ttyS0 (ie, DBGU) */
      -       at91_set_serial_console(0);
      +       /* set serial console to ttyS1 (ie, DBGU) */
      +       at91_set_serial_console(1);
       }
      
       /*
      Signed-off-by: NJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
      Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
      Cc: Alan Cox <alan@linux.intel.com>
      Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
      deba1a0d
  23. 25 5月, 2011 1 次提交
  24. 20 4月, 2011 1 次提交