lkml.org 
[lkml]   [2012]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[18/40] atmel_serial: fix spinlock lockup in RS485 code
    3.0-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Claudio Scordino <claudio@evidence.eu.com>

    commit dbf1115d3f8c7052788aa4e6e46abd27f3b3eeba upstream.

    Patch to fix a spinlock lockup in the driver that sometimes happens when the
    tasklet starts.

    Signed-off-by: Claudio Scordino <claudio@evidence.eu.com>
    Signed-off-by: Dave Bender <codehero@gmail.com>
    Tested-by: Dave Bender <codehero@gmail.com>
    Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
    Acked-by: Alan Cox <alan@linux.intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    drivers/tty/serial/atmel_serial.c | 5 +++--
    1 file changed, 3 insertions(+), 2 deletions(-)

    --- a/drivers/tty/serial/atmel_serial.c
    +++ b/drivers/tty/serial/atmel_serial.c
    @@ -199,8 +199,9 @@ void atmel_config_rs485(struct uart_port
    {
    struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
    unsigned int mode;
    + unsigned long flags;

    - spin_lock(&port->lock);
    + spin_lock_irqsave(&port->lock, flags);

    /* Disable interrupts */
    UART_PUT_IDR(port, atmel_port->tx_done_mask);
    @@ -231,7 +232,7 @@ void atmel_config_rs485(struct uart_port
    /* Enable interrupts */
    UART_PUT_IER(port, atmel_port->tx_done_mask);

    - spin_unlock(&port->lock);
    + spin_unlock_irqrestore(&port->lock, flags);

    }




    \
     
     \ /
      Last update: 2012-01-11 00:03    [W:0.019 / U:0.684 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site