Commit c31e5bb0 authored by Andrew Morton's avatar Andrew Morton Committed by Jeff Garzik

[PATCH] net: Netconsole poll support for 3c509

From: Con Kolivas <kernel@kolivas.org>

This patch provides poll support to allow netconsole to work with 3c509
network cards.

Status: Compiled, debugged and tested working by Michael Buesch.
Signed-off-by: default avatarCon Kolivas <kernel@kolivas.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent 3ffe7a53
...@@ -209,6 +209,9 @@ static int el3_pm_callback(struct pm_dev *pdev, pm_request_t rqst, void *data); ...@@ -209,6 +209,9 @@ static int el3_pm_callback(struct pm_dev *pdev, pm_request_t rqst, void *data);
#if defined(CONFIG_EISA) || defined(CONFIG_MCA) #if defined(CONFIG_EISA) || defined(CONFIG_MCA)
static int el3_device_remove (struct device *device); static int el3_device_remove (struct device *device);
#endif #endif
#ifdef CONFIG_NET_POLL_CONTROLLER
static void el3_poll_controller(struct net_device *dev);
#endif
#ifdef CONFIG_EISA #ifdef CONFIG_EISA
struct eisa_device_id el3_eisa_ids[] = { struct eisa_device_id el3_eisa_ids[] = {
...@@ -321,6 +324,9 @@ static int __init el3_common_init(struct net_device *dev) ...@@ -321,6 +324,9 @@ static int __init el3_common_init(struct net_device *dev)
dev->set_multicast_list = &set_multicast_list; dev->set_multicast_list = &set_multicast_list;
dev->tx_timeout = el3_tx_timeout; dev->tx_timeout = el3_tx_timeout;
dev->watchdog_timeo = TX_TIMEOUT; dev->watchdog_timeo = TX_TIMEOUT;
#ifdef CONFIG_NET_POLL_CONTROLLER
dev->poll_controller = el3_poll_controller;
#endif
SET_ETHTOOL_OPS(dev, &ethtool_ops); SET_ETHTOOL_OPS(dev, &ethtool_ops);
err = register_netdev(dev); err = register_netdev(dev);
...@@ -999,6 +1005,19 @@ el3_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -999,6 +1005,19 @@ el3_interrupt(int irq, void *dev_id, struct pt_regs *regs)
} }
#ifdef CONFIG_NET_POLL_CONTROLLER
/*
* Polling receive - used by netconsole and other diagnostic tools
* to allow network i/o with interrupts disabled.
*/
static void el3_poll_controller(struct net_device *dev)
{
disable_irq(dev->irq);
el3_interrupt(dev->irq, dev, NULL);
enable_irq(dev->irq);
}
#endif
static struct net_device_stats * static struct net_device_stats *
el3_get_stats(struct net_device *dev) el3_get_stats(struct net_device *dev)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment