From: Kevin Hao Date: Tue, 15 Aug 2006 06:00:15 +0000 (-0700) Subject: [PATCH] net: Add netconsole support to dm9000 driver X-Git-Tag: v2.6.18-rc5~61^2~19 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2fd0e33f4f967022ef2f3249b6c512b309734384;p=linux-2.6 [PATCH] net: Add netconsole support to dm9000 driver Add netconsole support to dm9000 driver. Cc: Jeff Garzik Cc: Sascha Hauer Cc: Ben Dooks Signed-off-by: Andrew Morton Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c index 1b758b7071..3d76fa144c 100644 --- a/drivers/net/dm9000.c +++ b/drivers/net/dm9000.c @@ -339,6 +339,17 @@ static void dm9000_timeout(struct net_device *dev) spin_unlock_irqrestore(&db->lock,flags); } +#ifdef CONFIG_NET_POLL_CONTROLLER +/* + *Used by netconsole + */ +static void dm9000_poll_controller(struct net_device *dev) +{ + disable_irq(dev->irq); + dm9000_interrupt(dev->irq,dev,NULL); + enable_irq(dev->irq); +} +#endif /* dm9000_release_board * @@ -538,6 +549,9 @@ dm9000_probe(struct platform_device *pdev) ndev->stop = &dm9000_stop; ndev->get_stats = &dm9000_get_stats; ndev->set_multicast_list = &dm9000_hash_table; +#ifdef CONFIG_NET_POLL_CONTROLLER + ndev->poll_controller = &dm9000_poll_controller; +#endif #ifdef DM9000_PROGRAM_EEPROM program_eeprom(db);