From patchwork Sat May 29 03:24:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 102998 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4T3Mf0P020224 for ; Sat, 29 May 2010 03:22:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754938Ab0E2DWi (ORCPT ); Fri, 28 May 2010 23:22:38 -0400 Received: from mms3.broadcom.com ([216.31.210.19]:2783 "EHLO MMS3.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754856Ab0E2DWh (ORCPT ); Fri, 28 May 2010 23:22:37 -0400 Received: from [10.9.200.131] by MMS3.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.3.2)); Fri, 28 May 2010 20:22:31 -0700 X-Server-Uuid: B55A25B1-5D7D-41F8-BC53-C57E7AD3C201 Received: from mail-irva-12.broadcom.com (10.11.16.101) by IRVEXCHHUB01.corp.ad.broadcom.com (10.9.200.131) with Microsoft SMTP Server id 8.2.247.2; Fri, 28 May 2010 20:22:32 -0700 Received: from dell (dhcp-10-12-136-109.broadcom.com [10.12.136.109]) by mail-irva-12.broadcom.com (Postfix) with ESMTP id 761AB69CA8; Fri, 28 May 2010 20:22:31 -0700 (PDT) From: "Michael Chan" To: davem@davemloft.net cc: netdev@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH] bnx2: Fix IRQ failures during kdump. Date: Fri, 28 May 2010 20:24:22 -0700 Message-ID: <1275103462-8527-1-git-send-email-mchan@broadcom.com> X-Mailer: git-send-email 1.5.5.GIT MIME-Version: 1.0 X-WSS-ID: 601E57FD31G139968704-01-01 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sat, 29 May 2010 03:22:42 +0000 (UTC) diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 188e356..1b8ba14 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -58,8 +58,8 @@ #include "bnx2_fw.h" #define DRV_MODULE_NAME "bnx2" -#define DRV_MODULE_VERSION "2.0.15" -#define DRV_MODULE_RELDATE "May 4, 2010" +#define DRV_MODULE_VERSION "2.0.16" +#define DRV_MODULE_RELDATE "May 28, 2010" #define FW_MIPS_FILE_06 "bnx2/bnx2-mips-06-5.0.0.j6.fw" #define FW_RV2P_FILE_06 "bnx2/bnx2-rv2p-06-5.0.0.j3.fw" #define FW_MIPS_FILE_09 "bnx2/bnx2-mips-09-5.0.0.j15.fw" @@ -7877,7 +7877,6 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) } pci_set_master(pdev); - pci_save_state(pdev); bp->pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM); if (bp->pm_cap == 0) { @@ -7953,6 +7952,16 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) bp->flags |= BNX2_FLAG_MSI_CAP; } + /* When going from a crashed kernel to a kdump kernel without PCI + * reset, MSI/MSI-X may still be enabled. We need to disable + * MSI/MSI-X and enable INTX because the kdump driver may operate + * the device in a different IRQ mode. + */ + if (bp->flags & (BNX2_FLAG_MSI_CAP | BNX2_FLAG_MSIX_CAP)) { + pci_msi_off(pdev); + pci_intx(pdev, 1); + } + /* 5708 cannot support DMA addresses > 40-bit. */ if (CHIP_NUM(bp) == CHIP_NUM_5708) persist_dma_mask = dma_mask = DMA_BIT_MASK(40); @@ -8188,6 +8197,8 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) bp->timer.data = (unsigned long) bp; bp->timer.function = bnx2_timer; + pci_save_state(pdev); + return 0; err_out_unmap: diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 1df7c50..a46b49d 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -2294,6 +2294,7 @@ void pci_msi_off(struct pci_dev *dev) pci_write_config_word(dev, pos + PCI_MSIX_FLAGS, control); } } +EXPORT_SYMBOL(pci_msi_off); #ifndef HAVE_ARCH_PCI_SET_DMA_MAX_SEGMENT_SIZE int pci_set_dma_max_seg_size(struct pci_dev *dev, unsigned int size)