aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/xen-netback/netback.c
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2016-09-22 11:06:25 +0200
committerDavid S. Miller <davem@davemloft.net>2016-09-22 08:26:24 -0400
commit0364a8824c020f12e2d5e9fad963685b58f7574e (patch)
tree42bc8abc5f8c7e1b243bed56bf309ff55ebbe144 /drivers/net/xen-netback/netback.c
parentnet: ethernet: mediatek: get out of potential invalid pointer access (diff)
downloadlinux-dev-0364a8824c020f12e2d5e9fad963685b58f7574e.tar.xz
linux-dev-0364a8824c020f12e2d5e9fad963685b58f7574e.zip
xen-netback: switch to threaded irq for control ring
Instead of open coding it use the threaded irq mechanism in xen-netback. Signed-off-by: Juergen Gross <jgross@suse.com> Acked-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/xen-netback/netback.c')
-rw-r--r--drivers/net/xen-netback/netback.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
index edbae0b1e8f0..3d0c989384b5 100644
--- a/drivers/net/xen-netback/netback.c
+++ b/drivers/net/xen-netback/netback.c
@@ -2359,24 +2359,14 @@ static bool xenvif_ctrl_work_todo(struct xenvif *vif)
return 0;
}
-int xenvif_ctrl_kthread(void *data)
+irqreturn_t xenvif_ctrl_irq_fn(int irq, void *data)
{
struct xenvif *vif = data;
- for (;;) {
- wait_event_interruptible(vif->ctrl_wq,
- xenvif_ctrl_work_todo(vif) ||
- kthread_should_stop());
- if (kthread_should_stop())
- break;
-
- while (xenvif_ctrl_work_todo(vif))
- xenvif_ctrl_action(vif);
+ while (xenvif_ctrl_work_todo(vif))
+ xenvif_ctrl_action(vif);
- cond_resched();
- }
-
- return 0;
+ return IRQ_HANDLED;
}
static int __init netback_init(void)