From: Kevin Hao <kexin.hao@windriver.com>
To: Jeff Garzik <jgarzik@redhat.com>, Chris Snook <csnook@redhat.com>,
Jay Cliburn <jacliburn@bellsouth.net>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] net: add net poll support for atl2 driver
Date: Sat, 20 Sep 2008 15:56:44 +0800 [thread overview]
Message-ID: <1221897404-20290-1-git-send-email-kexin.hao@windriver.com> (raw)
Add netconsole support for Atheros L2 10/100 network device.
Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
---
drivers/net/atlx/atl2.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c
index d548a67..b2995ac 100644
--- a/drivers/net/atlx/atl2.c
+++ b/drivers/net/atlx/atl2.c
@@ -1327,6 +1327,15 @@ static void atl2_setup_pcicmd(struct pci_dev *pdev)
pci_write_config_dword(pdev, REG_PM_CTRLSTAT, 0);
}
+#ifdef CONFIG_NET_POLL_CONTROLLER
+static void atl2_poll_controller(struct net_device *netdev)
+{
+ disable_irq(netdev->irq);
+ atl2_intr(netdev->irq, netdev);
+ enable_irq(netdev->irq);
+}
+#endif
+
/*
* atl2_probe - Device Initialization Routine
* @pdev: PCI device information struct
@@ -1410,6 +1419,9 @@ static int __devinit atl2_probe(struct pci_dev *pdev,
netdev->do_ioctl = &atl2_ioctl;
atl2_set_ethtool_ops(netdev);
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ netdev->poll_controller = atl2_poll_controller;
+#endif
#ifdef HAVE_TX_TIMEOUT
netdev->tx_timeout = &atl2_tx_timeout;
netdev->watchdog_timeo = 5 * HZ;
--
1.5.6.2.220.g44701
next reply other threads:[~2008-09-20 7:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-20 7:56 Kevin Hao [this message]
2008-09-25 23:45 ` Jay Cliburn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1221897404-20290-1-git-send-email-kexin.hao@windriver.com \
--to=kexin.hao@windriver.com \
--cc=csnook@redhat.com \
--cc=jacliburn@bellsouth.net \
--cc=jgarzik@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®