diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2005-11-23 06:50:04 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-12-01 02:25:27 -0500 |
commit | 8ce51d69b755c39e714826899631629209896b70 (patch) | |
tree | 1ba9f46705d8c5f1eed3a27d1fd423799ced6a14 /drivers/net/ixp2000/ixpdev.c | |
parent | cffbfcaf00c4a36592fabd54ae9f960b552322b6 (diff) |
[PATCH] ixp2000: add netpoll support
Add netpoll support to the ixp2000 driver.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/ixp2000/ixpdev.c')
-rw-r--r-- | drivers/net/ixp2000/ixpdev.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/ixp2000/ixpdev.c b/drivers/net/ixp2000/ixpdev.c index 2ef8f8fa6c4a..0f7b8ab62d78 100644 --- a/drivers/net/ixp2000/ixpdev.c +++ b/drivers/net/ixp2000/ixpdev.c | |||
@@ -218,6 +218,15 @@ static irqreturn_t ixpdev_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
218 | return IRQ_HANDLED; | 218 | return IRQ_HANDLED; |
219 | } | 219 | } |
220 | 220 | ||
221 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
222 | static void ixpdev_poll_controller(struct net_device *dev) | ||
223 | { | ||
224 | disable_irq(IRQ_IXP2000_THDA0); | ||
225 | ixpdev_interrupt(IRQ_IXP2000_THDA0, dev, NULL); | ||
226 | enable_irq(IRQ_IXP2000_THDA0); | ||
227 | } | ||
228 | #endif | ||
229 | |||
221 | static int ixpdev_open(struct net_device *dev) | 230 | static int ixpdev_open(struct net_device *dev) |
222 | { | 231 | { |
223 | struct ixpdev_priv *ip = netdev_priv(dev); | 232 | struct ixpdev_priv *ip = netdev_priv(dev); |
@@ -268,6 +277,9 @@ struct net_device *ixpdev_alloc(int channel, int sizeof_priv) | |||
268 | dev->poll = ixpdev_poll; | 277 | dev->poll = ixpdev_poll; |
269 | dev->open = ixpdev_open; | 278 | dev->open = ixpdev_open; |
270 | dev->stop = ixpdev_close; | 279 | dev->stop = ixpdev_close; |
280 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
281 | dev->poll_controller = ixpdev_poll_controller; | ||
282 | #endif | ||
271 | 283 | ||
272 | dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM; | 284 | dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM; |
273 | dev->weight = 64; | 285 | dev->weight = 64; |