linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Richard Genoud <richard.genoud@gmail.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>,
	Alexandre Belloni <alexandre.belloni@free-electrons.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Cyrille Pitchen <cyrille.pitchen@atmel.com>,
	linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] BUG: atmel_serial: Interrupts not disabled on close
Date: Mon, 12 Sep 2016 16:12:45 +0200	[thread overview]
Message-ID: <20160912141245.u6h6ugvuybc2lr66@pengutronix.de> (raw)
In-Reply-To: <20160912133441.14597-1-richard.genoud@gmail.com>

On Mon, Sep 12, 2016 at 03:34:41PM +0200, Richard Genoud wrote:
> Since commit 18dfef9c7f87 ("serial: atmel: convert to irq handling
> provided mctrl-gpio"), interrupts from GPIOs are not disabled any more
> when the serial port is closed, leading to an oops when the one of the
> input pin is toggled (CTS/DSR/DCD/RNG).
> 
> This is only the case if those pins are used as GPIOs, i.e. declared
> like that:
> usart1: serial@f8020000 {
>         /* CTS and DTS will be handled by GPIO */
>         status = "okay";
>         rts-gpios = <&pioB 17 GPIO_ACTIVE_LOW>;
>         cts-gpios = <&pioB 16 GPIO_ACTIVE_LOW>;
>         dtr-gpios = <&pioB 14 GPIO_ACTIVE_LOW>;
>         dsr-gpios = <&pioC 31 GPIO_ACTIVE_LOW>;
>         rng-gpios = <&pioB 12 GPIO_ACTIVE_LOW>;
>         dcd-gpios = <&pioB 15 GPIO_ACTIVE_LOW>;
> };
> 
> That's because modem interrupts used to be freed in atmel_shutdown().
> After commit 18dfef9c7f87 ("serial: atmel: convert to irq handling
> provided mctrl-gpio"), this code was just removed.
> Calling atmel_disable_ms() disables the interrupts and everything works
> fine again.
> 
> Tested on at91sam9g35-cm
> 
> (This patch doesn't apply on -stable kernels, fixes for 4.4 and 4.7 will
> be sent after this one is applied.)
AFAIK this is no reason to not put stable on Cc. If then
$stablemaintainer fails to backport the change, he will contact you.

> Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
> Fixes: 18dfef9c7f87 ("serial: atmel: convert to irq handling provided mctrl-gpio")
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Thanks for caring
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

  reply	other threads:[~2016-09-12 14:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-12 13:34 [PATCH] BUG: atmel_serial: Interrupts not disabled on close Richard Genoud
2016-09-12 14:12 ` Uwe Kleine-König [this message]
2016-09-12 15:22 ` Nicolas Ferre
2016-09-15 10:33   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160912141245.u6h6ugvuybc2lr66@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=cyrille.pitchen@atmel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=nicolas.ferre@atmel.com \
    --cc=richard.genoud@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).