compat-drivers: fix collateral-evolutions/network/09-threaded-irq.patch
authorLuis R. Rodriguez <mcgrof@do-not-panic.com>
Tue, 26 Mar 2013 23:14:42 +0000 (16:14 -0700)
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>
Tue, 26 Mar 2013 23:19:10 +0000 (16:19 -0700)
Manual edits required due to some context changes. The change
in question that caused this is

commit 97236a0656034ef8512ded648cfaa3d7282534e8
Author: Luciano Coelho <coelho@ti.com>
Date:   Fri Mar 8 09:41:53 2013 +0200

    wlcore: move handling from hardirq to the irq thread function

    Spin locks and completions are expensive in hard IRQ context and cause
    problems with RT kernels.  In RT kernels, both spin locks and
    completions can schedule(), so we can't use them in hard irq context.

    Move handling code into the irq thread function to avoid that.

Reported-by: Gregoire Gentil <gregoire@alwaysinnovating.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
patches/collateral-evolutions/network/09-threaded-irq.patch

index 8bc51978ad7bafaff079a43f07b7147aac1b8725..1c02cedc0c1789df74a361bbe910c23083200f51 100644 (file)
@@ -116,7 +116,7 @@ thread in process context as well.
        }
 --- a/drivers/net/wireless/ti/wlcore/main.c
 +++ b/drivers/net/wireless/ti/wlcore/main.c
-@@ -5995,14 +5995,25 @@ static void wlcore_nvs_cb(const struct f
+@@ -6054,11 +6054,22 @@ static void wlcore_nvs_cb(const struct f
        wl->platform_quirks = pdata->platform_quirks;
        wl->if_ops = pdev_data->if_ops;
  
@@ -135,14 +135,11 @@ thread in process context as well.
 +                                        irqflags,
 +                                        pdev->name, wl);
 +#else
-       ret = request_threaded_irq(wl->irq, wl12xx_hardirq, wlcore_irq,
-                                  irqflags,
-                                  pdev->name, wl);
+       ret = request_threaded_irq(wl->irq, NULL, wlcore_irq,
+                                  irqflags, pdev->name, wl);
 +#endif
        if (ret < 0) {
-               wl1271_error("request_irq() failed: %d", ret);
-               goto out_free_nvs;
-@@ -6077,7 +6088,11 @@ out_unreg:
+@@ -6135,7 +6145,11 @@ out_unreg:
        wl1271_unregister_hw(wl);
  
  out_irq:
@@ -154,7 +151,7 @@ thread in process context as well.
  
  out_free_nvs:
        kfree(wl->nvs);
-@@ -6123,7 +6138,12 @@ int wlcore_remove(struct platform_device
+@@ -6181,7 +6195,12 @@ int wlcore_remove(struct platform_device
                disable_irq_wake(wl->irq);
        }
        wl1271_unregister_hw(wl);