Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8ce51d69 authored by Lennert Buytenhek's avatar Lennert Buytenhek Committed by Jeff Garzik
Browse files

[PATCH] ixp2000: add netpoll support



Add netpoll support to the ixp2000 driver.

Signed-off-by: default avatarLennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent cffbfcaf
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
@@ -218,6 +218,15 @@ static irqreturn_t ixpdev_interrupt(int irq, void *dev_id, struct pt_regs *regs)
	return IRQ_HANDLED;
	return IRQ_HANDLED;
}
}


#ifdef CONFIG_NET_POLL_CONTROLLER
static void ixpdev_poll_controller(struct net_device *dev)
{
	disable_irq(IRQ_IXP2000_THDA0);
	ixpdev_interrupt(IRQ_IXP2000_THDA0, dev, NULL);
	enable_irq(IRQ_IXP2000_THDA0);
}
#endif

static int ixpdev_open(struct net_device *dev)
static int ixpdev_open(struct net_device *dev)
{
{
	struct ixpdev_priv *ip = netdev_priv(dev);
	struct ixpdev_priv *ip = netdev_priv(dev);
@@ -268,6 +277,9 @@ struct net_device *ixpdev_alloc(int channel, int sizeof_priv)
	dev->poll = ixpdev_poll;
	dev->poll = ixpdev_poll;
	dev->open = ixpdev_open;
	dev->open = ixpdev_open;
	dev->stop = ixpdev_close;
	dev->stop = ixpdev_close;
#ifdef CONFIG_NET_POLL_CONTROLLER
	dev->poll_controller = ixpdev_poll_controller;
#endif


	dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM;
	dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM;
	dev->weight = 64;
	dev->weight = 64;