diff options
| author | Hirokazu Takata <takata@linux-m32r.org> | 2005-01-06 09:44:33 -0500 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2005-01-06 09:44:33 -0500 |
| commit | ff46939b6b930c019d8cb690f4778786e79322a1 (patch) | |
| tree | 669e3b16dafe2bcc673d80366b7fd8fb4f940b02 | |
| parent | 87475e1fe3a2a3f1643f3e60716e1d7bcf4ccd50 (diff) | |
[PATCH] net: netconsole support for smc91x
Signed-off-by: Hayato Fujiwara <fujiwara@linux-m32r.org>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
| -rw-r--r-- | drivers/net/smc91x.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c index 9b75be8b971e..fb9935b670ac 100644 --- a/drivers/net/smc91x.c +++ b/drivers/net/smc91x.c @@ -1333,6 +1333,19 @@ static irqreturn_t smc_interrupt(int irq, void *dev_id, struct pt_regs *regs) return IRQ_HANDLED; } +#ifdef CONFIG_NET_POLL_CONTROLLER +/* + * Polling receive - used by netconsole and other diagnostic tools + * to allow network i/o with interrupts disabled. + */ +static void smc_poll_controller(struct net_device *dev) +{ + disable_irq(dev->irq); + smc_interrupt(dev->irq, dev, NULL); + enable_irq(dev->irq); +} +#endif + /* Our watchdog timed out. Called by the networking layer */ static void smc_timeout(struct net_device *dev) { @@ -1912,6 +1925,9 @@ static int __init smc_probe(struct net_device *dev, unsigned long ioaddr) dev->get_stats = smc_query_statistics; dev->set_multicast_list = smc_set_multicast_list; dev->ethtool_ops = &smc_ethtool_ops; +#ifdef CONFIG_NET_POLL_CONTROLLER + dev->poll_controller = smc_poll_controller; +#endif tasklet_init(&lp->tx_task, smc_hardware_send_pkt, (unsigned long)dev); INIT_WORK(&lp->phy_configure, smc_phy_configure, dev); |
