From patchwork Sat Sep 20 07:56:44 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hao X-Patchwork-Id: 698 X-Patchwork-Delegate: jgarzik@pobox.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 3CDA2DDECA for ; Sat, 20 Sep 2008 17:58:07 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751087AbYITH5u (ORCPT ); Sat, 20 Sep 2008 03:57:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751043AbYITH5u (ORCPT ); Sat, 20 Sep 2008 03:57:50 -0400 Received: from mail.windriver.com ([147.11.1.11]:40488 "EHLO mail.wrs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750957AbYITH5t (ORCPT ); Sat, 20 Sep 2008 03:57:49 -0400 Received: from localhost.localdomain (pek-cc-pb02l [128.224.160.32]) by mail.wrs.com (8.13.6/8.13.6) with ESMTP id m8K7ujjO020890; Sat, 20 Sep 2008 00:56:46 -0700 (PDT) From: Kevin Hao To: Jeff Garzik , Chris Snook , Jay Cliburn , 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 Message-Id: <1221897404-20290-1-git-send-email-kexin.hao@windriver.com> X-Mailer: git-send-email 1.5.6.2.220.g44701 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add netconsole support for Atheros L2 10/100 network device. Signed-off-by: Kevin Hao Acked-by: Jay Cliburn --- 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;