linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: gregkh@linuxfoundation.org
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jiri Slaby <jslaby@suse.cz>,
	Andrei Pistirica <andrei.pistirica@microchip.com>
Subject: [PATCH 11/11] serial: pic32: restore disabled irqs in pic32_uart_startup()
Date: Tue,  3 May 2022 08:31:22 +0200	[thread overview]
Message-ID: <20220503063122.20957-12-jslaby@suse.cz> (raw)
In-Reply-To: <20220503063122.20957-1-jslaby@suse.cz>

pic32_uart_startup() disables interrupts by local_irq_save(). But the
function never enables them. The serial core only holds a mutex, so irqs
are not restored.

So how could this driver work? This irq handling was already present in
the driver's initial commit 157b9394709ed (serial: pic32_uart: Add PIC32
UART driver).

So is it a candidate for removal? Anyone has a contact to the author:
Andrei Pistirica (I believe the one below -- @microchip.com -- will
bounce)? Or to someone else @microchip.com?

Cc: Andrei Pistirica <andrei.pistirica@microchip.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/tty/serial/pic32_uart.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/tty/serial/pic32_uart.c b/drivers/tty/serial/pic32_uart.c
index c5584628f8c4..b399aac530fe 100644
--- a/drivers/tty/serial/pic32_uart.c
+++ b/drivers/tty/serial/pic32_uart.c
@@ -564,6 +564,8 @@ static int pic32_uart_startup(struct uart_port *port)
 	/* enable all interrupts and eanable uart */
 	pic32_uart_en_and_unmask(port);
 
+	local_irq_restore(flags);
+
 	enable_irq(sport->irq_rx);
 
 	return 0;
-- 
2.36.0


      parent reply	other threads:[~2022-05-03  6:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03  6:31 [PATCH 00/11] serial: pic32: cleanup Jiri Slaby
2022-05-03  6:31 ` [PATCH 01/11] serial: pic32: remove unused items from the header Jiri Slaby
2022-05-03  6:31 ` [PATCH 02/11] serial: pic32: move header content to .c Jiri Slaby
2022-05-03  6:31 ` [PATCH 03/11] serial: pic32: remove constants from struct pic32_sport Jiri Slaby
2022-05-03  6:31 ` [PATCH 04/11] serial: pic32: simplify clk handling Jiri Slaby
2022-05-03  6:31 ` [PATCH 05/11] serial: pic32: simplify pic32_sport::enable_tx_irq handling Jiri Slaby
2022-05-03  6:31 ` [PATCH 06/11] serial: pic32: remove pic32_get_port() macro Jiri Slaby
2022-05-03  6:31 ` [PATCH 07/11] serial: pic32: convert to_pic32_sport() to an inline Jiri Slaby
2022-05-03  6:31 ` [PATCH 08/11] serial: pic32: don't assign pic32_sport::cts_gpio twice Jiri Slaby
2022-05-03  6:31 ` [PATCH 09/11] serial: pic32: don't zero members of kzalloc-ated structure Jiri Slaby
2022-05-03  6:31 ` [PATCH 10/11] serial: pic32: free up irq names correctly Jiri Slaby
2022-05-03  6:31 ` Jiri Slaby [this message]

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=20220503063122.20957-12-jslaby@suse.cz \
    --to=jslaby@suse.cz \
    --cc=andrei.pistirica@microchip.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@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 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).