Thread (25 messages) 25 messages, 7 authors, 2016-03-14

Re: [PATCH] tty: serial: sc16is7xx: implemented our own oneshot-like handling

From: Thomas Gleixner <hidden>
Date: 2016-03-13 10:25:05
Also in: linux-serial

Possibly related (same subject, not in this thread)

On Fri, 11 Mar 2016, Sean Nyekjaer wrote:
 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);
Aside of the lack of a changelog. This is completely bogus. You disable the
same interrupt a gazillion of times. 
 	queue_kthread_work(&s->kworker, &s->irq_work);
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help