linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] tty: serial: sc16is7xx: implemented our own oneshot-like handling
@ 2016-03-13 19:05 Maarten Brock
  2016-03-14  6:17 ` Sean Nyekjær
  0 siblings, 1 reply; 12+ messages in thread
From: Maarten Brock @ 2016-03-13 19:05 UTC (permalink / raw)
  To: linux-serial
  Cc: Thomas Gleixner, Sean Nyekjaer, Josh Cartwright,
	Greg Kroah-Hartman, linux-rt-users, Jon Ringle

I also wonder why this driver doesn't use threaded interrupts, just like the
MAX310x driver it is based upon.

Maarten


> This driver should use a threaded interrupt instead of trying to emulate it
> via dis/enable_irq and a worker thread.
> 
> Then you simply call c16is7xx_port_irq() right from the interrupt routine
> and the core code deals with the interrupt mask/unmask automatically.
> 
> Thanks,
> 
> 	tglx

^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCH] tty: serial: sc16is7xx: implemented our own oneshot-like handling
@ 2016-03-11 10:34 Sean Nyekjaer
  2016-03-11 10:36 ` Sean Nyekjær
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Sean Nyekjaer @ 2016-03-11 10:34 UTC (permalink / raw)
  To: linux-serial
  Cc: Sean Nyekjaer, Josh Cartwright, Greg Kroah-Hartman,
	linux-rt-users, Jon Ringle, Thomas Gleixner

Signed-off-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
---
This patch depends on patch "sc16is7xx: drop bogus use of IRQF_ONESHOT" 

 drivers/tty/serial/sc16is7xx.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
index 73d46e2..96d1f3e 100644
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -706,13 +706,20 @@ static void sc16is7xx_ist(struct kthread_work *ws)
 	struct sc16is7xx_port *s = to_sc16is7xx_port(ws, irq_work);
 	int i;
 
-	for (i = 0; i < s->devtype->nr_uart; ++i)
+	for (i = 0; i < s->devtype->nr_uart; ++i) {
 		sc16is7xx_port_irq(s, i);
+		enable_irq(s->p[i].port.irq);
+	}
+
 }
 
 static irqreturn_t sc16is7xx_irq(int irq, void *dev_id)
 {
 	struct sc16is7xx_port *s = (struct sc16is7xx_port *)dev_id;
+	int i;
+
+	for (i = 0; i < s->devtype->nr_uart; ++i)
+		disable_irq_nosync(s->p[i].port.irq);
 
 	queue_kthread_work(&s->kworker, &s->irq_work);
 
-- 
2.7.2


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-03-14 23:13 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-13 19:05 [PATCH] tty: serial: sc16is7xx: implemented our own oneshot-like handling Maarten Brock
2016-03-14  6:17 ` Sean Nyekjær
  -- strict thread matches above, loose matches on Subject: below --
2016-03-11 10:34 Sean Nyekjaer
2016-03-11 10:36 ` Sean Nyekjær
2016-03-11 11:21   ` Sebastian Andrzej Siewior
2016-03-11 11:29     ` Sean Nyekjær
2016-03-11 11:33   ` Sean Nyekjær
2016-03-11 16:43 ` Greg Kroah-Hartman
2016-03-13 10:25 ` Thomas Gleixner
2016-03-14  6:21   ` Sean Nyekjær
2016-03-14  8:48     ` Thomas Gleixner
2016-03-14 23:13 ` Jakub Kiciński

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).