]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/blob - rt-patches/0305-sc16is7xx-Drop-bogus-use-of-IRQF_ONESHOT.patch
WAR:media:i2c:ov5693: add flip and mirror setting
[hercules2020/nv-tegra/linux-4.4.git] / rt-patches / 0305-sc16is7xx-Drop-bogus-use-of-IRQF_ONESHOT.patch
1 From 50a03d3fbfe4bf1db18c4fc78c63b023a3372f69 Mon Sep 17 00:00:00 2001
2 From: Josh Cartwright <joshc@ni.com>
3 Date: Thu, 18 Feb 2016 11:26:12 -0600
4 Subject: [PATCH 305/365] sc16is7xx: Drop bogus use of IRQF_ONESHOT
5
6 The use of IRQF_ONESHOT when registering an interrupt handler with
7 request_irq() is non-sensical.
8
9 Not only that, it also prevents the handler from being threaded when it
10 otherwise should be w/ IRQ_FORCED_THREADING is enabled.  This causes the
11 following deadlock observed by Sean Nyekjaer on -rt:
12
13 Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
14 [..]
15    rt_spin_lock_slowlock from (queue_kthread_work+0x18/0x74)
16    queue_kthread_work) from (sc16is7xx_irq+0x10/0x18 [sc16is7xx])
17    sc16is7xx_irq [sc16is7xx]) from (handle_irq_event_percpu+0x70/0x158)
18    handle_irq_event_percpu) from (handle_irq_event+0x68/0xa8)
19    handle_irq_event) from (handle_level_irq+0x10c/0x184)
20    handle_level_irq) from (generic_handle_irq+0x2c/0x3c)
21    generic_handle_irq) from (mxc_gpio_irq_handler+0x3c/0x108)
22    mxc_gpio_irq_handler) from (mx3_gpio_irq_handler+0x80/0xcc)
23    mx3_gpio_irq_handler) from (generic_handle_irq+0x2c/0x3c)
24    generic_handle_irq) from (__handle_domain_irq+0x7c/0xe8)
25    __handle_domain_irq) from (gic_handle_irq+0x24/0x5c)
26    gic_handle_irq) from (__irq_svc+0x40/0x88)
27    (__irq_svc) from (rt_spin_unlock+0x1c/0x68)
28    (rt_spin_unlock) from (kthread_worker_fn+0x104/0x17c)
29    (kthread_worker_fn) from (kthread+0xd0/0xe8)
30    (kthread) from (ret_from_fork+0x14/0x2c)
31
32 Fixes: 9e6f4ca3e567 ("sc16is7xx: use kthread_worker for tx_work and irq")
33 Reported-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
34 Signed-off-by: Josh Cartwright <joshc@ni.com>
35 Cc: linux-rt-users@vger.kernel.org
36 Cc: Jakub Kicinski <moorray3@wp.pl>
37 Cc: stable@vger.kernel.org
38 Cc: linux-serial@vger.kernel.org
39 Link: http://lkml.kernel.org/r/1455816372-13989-1-git-send-email-joshc@ni.com
40 Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
41 ---
42  drivers/tty/serial/sc16is7xx.c | 2 +-
43  1 file changed, 1 insertion(+), 1 deletion(-)
44
45 diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
46 index cc86c34..ac51f0d 100644
47 --- a/drivers/tty/serial/sc16is7xx.c
48 +++ b/drivers/tty/serial/sc16is7xx.c
49 @@ -1230,7 +1230,7 @@ static int sc16is7xx_probe(struct device *dev,
50  
51         /* Setup interrupt */
52         ret = devm_request_irq(dev, irq, sc16is7xx_irq,
53 -                              IRQF_ONESHOT | flags, dev_name(dev), s);
54 +                              flags, dev_name(dev), s);
55         if (!ret)
56                 return 0;
57  
58 -- 
59 2.7.4
60