[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <550C21F1.5030404@samsung.com>
Date: Fri, 20 Mar 2015 14:34:41 +0100
From: Sylwester Nawrocki <s.nawrocki@...sung.com>
To: Javier Martinez Canillas <javier.martinez@...labora.co.uk>,
Robert Baldyga <r.baldyga@...sung.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.cz>, Olof Johansson <olof@...om.net>,
Doug Anderson <dianders@...omium.org>,
linux-samsung-soc@...r.kernel.org, linux-serial@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] serial: samsung: Clear operation mode on UART shutdown
On 13/03/15 12:38, Javier Martinez Canillas wrote:
> Exynos serial ports operate either in a DMA-based or interrupt-based
> modes. In DMA-based mode, the UART generates a transfer data request
> and a Transmission (Tx) interrupt in interrupt-based mode.
>
> The Tx IRQ is only unmasked in interrupt-based mode and it was done
> in s3c24xx_serial_start_tx(). Commit ba019a3e2ad5 ("serial: samsung:
> remove redundant interrupt enabling") removed the IRQ enable on that
> function since it is enabled when the mode is set in enable_tx_pio().
>
> The problem is that enable_tx_pio() is only called if the port mode
> has not been set before but the mode was not cleared on .shutdown().
>
> So if the UART was shutdown and then started up again, the mode set
> will remain and the Tx IRQ won't be unmasked.
>
> This caused a hang on at least Exynos5250, Exynos5420 and Exynos5800
> when the system is rebooted or powered off.
>
> Fixes: ba019a3e2ad5 ("serial: samsung: remove redundant interrupt enabling")
> Signed-off-by: Javier Martinez Canillas <javier.martinez@...labora.co.uk>
> ---
>
> I noticed this issue on an Exynos5250 Snow, Exynos5420 Peach Pit and Exynos
> 5800 Peach Pi Chromebooks. This patch fixes the issue on all of them.
>
> The offending commit landed in v4.0-rc1 so this fix is -rc material.
>
> drivers/tty/serial/samsung.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
> index af821a908720..cf08876922f1 100644
> --- a/drivers/tty/serial/samsung.c
> +++ b/drivers/tty/serial/samsung.c
> @@ -963,6 +963,7 @@ static void s3c24xx_serial_shutdown(struct uart_port *port)
> free_irq(ourport->tx_irq, ourport);
> tx_enabled(port) = 0;
> ourport->tx_claimed = 0;
> + ourport->tx_mode = 0;
> }
The patch looks good to me, Robert could you comment on that?
Reviewed-by: Sylwester Nawrocki <s.nawrocki@...sung.com>
--
Thanks,
Sylwester
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists