All of lore.kernel.org
 help / color / mirror / Atom feed
From: Huisung Kang <hs1218.kang@samsung.com>
To: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org
Cc: gregkh@suse.de, kgene.kim@samsung.com
Subject: [PATCH] serial: samsung: disable irq before calling free_irq
Date: Sat, 11 Feb 2012 12:12:33 +0900	[thread overview]
Message-ID: <018301cce86a$ff609980$fe21cc80$@samsung.com> (raw)

From: Kisang Lee <kisang80.lee@samsung.com>

Pending UART irq may trigger spurious handling and may lead to
softlockup. This patch will fix following softlockup.

Signed-off-by: Kisang Lee <kisang80.lee@samsung.com>
Signed-off-by: Huisung Kang <hs1218.kang@samsung.com>
---
 drivers/tty/serial/samsung.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
index c55e5fb..9067299 100644
--- a/drivers/tty/serial/samsung.c
+++ b/drivers/tty/serial/samsung.c
@@ -425,15 +425,19 @@ static void s3c24xx_serial_shutdown(struct uart_port *port)
 	struct s3c24xx_uart_port *ourport = to_ourport(port);
 
 	if (ourport->tx_claimed) {
-		if (!s3c24xx_serial_has_interrupt_mask(port))
+		if (!s3c24xx_serial_has_interrupt_mask(port)) {
+			disable_irq(ourport->tx_irq);
 			free_irq(ourport->tx_irq, ourport);
+		}
 		tx_enabled(port) = 0;
 		ourport->tx_claimed = 0;
 	}
 
 	if (ourport->rx_claimed) {
-		if (!s3c24xx_serial_has_interrupt_mask(port))
+		if (!s3c24xx_serial_has_interrupt_mask(port)) {
+			disable_irq(ourport->rx_irq);
 			free_irq(ourport->rx_irq, ourport);
+		}
 		ourport->rx_claimed = 0;
 		rx_enabled(port) = 0;
 	}
-- 
1.7.1

WARNING: multiple messages have this Message-ID (diff)
From: hs1218.kang@samsung.com (Huisung Kang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] serial: samsung: disable irq before calling free_irq
Date: Sat, 11 Feb 2012 12:12:33 +0900	[thread overview]
Message-ID: <018301cce86a$ff609980$fe21cc80$@samsung.com> (raw)

From: Kisang Lee <kisang80.lee@samsung.com>

Pending UART irq may trigger spurious handling and may lead to
softlockup. This patch will fix following softlockup.

Signed-off-by: Kisang Lee <kisang80.lee@samsung.com>
Signed-off-by: Huisung Kang <hs1218.kang@samsung.com>
---
 drivers/tty/serial/samsung.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
index c55e5fb..9067299 100644
--- a/drivers/tty/serial/samsung.c
+++ b/drivers/tty/serial/samsung.c
@@ -425,15 +425,19 @@ static void s3c24xx_serial_shutdown(struct uart_port *port)
 	struct s3c24xx_uart_port *ourport = to_ourport(port);
 
 	if (ourport->tx_claimed) {
-		if (!s3c24xx_serial_has_interrupt_mask(port))
+		if (!s3c24xx_serial_has_interrupt_mask(port)) {
+			disable_irq(ourport->tx_irq);
 			free_irq(ourport->tx_irq, ourport);
+		}
 		tx_enabled(port) = 0;
 		ourport->tx_claimed = 0;
 	}
 
 	if (ourport->rx_claimed) {
-		if (!s3c24xx_serial_has_interrupt_mask(port))
+		if (!s3c24xx_serial_has_interrupt_mask(port)) {
+			disable_irq(ourport->rx_irq);
 			free_irq(ourport->rx_irq, ourport);
+		}
 		ourport->rx_claimed = 0;
 		rx_enabled(port) = 0;
 	}
-- 
1.7.1

             reply	other threads:[~2012-02-11  3:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-11  3:12 Huisung Kang [this message]
2012-02-11  3:12 ` [PATCH] serial: samsung: disable irq before calling free_irq Huisung Kang
2012-02-11 19:55 ` Russell King - ARM Linux
2012-02-11 19:55   ` Russell King - ARM Linux

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='018301cce86a$ff609980$fe21cc80$@samsung.com' \
    --to=hs1218.kang@samsung.com \
    --cc=gregkh@suse.de \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.