From linas@austin.ibm.com Tue Dec 12 16:29:33 2006 Date: Tue, 12 Dec 2006 18:29:15 -0600 From: Linas Vepstas To: gregkh@suse.de, akpm@osdl.org Cc: linux-kernel@vger.kernel.org, linux-pci@atrey.karlin.mff.cuni.cz Subject: PCI: Use newly defined PCI channel offline routine Message-ID: <20061213002915.GA27870@austin.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline From: Linas Vepstas Use newly minted routine to access the PCI channel state. Signed-off-by: Linas Vepstas Signed-off-by: Greg Kroah-Hartman --- drivers/net/e1000/e1000_main.c | 2 +- drivers/net/ixgb/ixgb_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- gregkh-2.6.orig/drivers/net/e1000/e1000_main.c +++ gregkh-2.6/drivers/net/e1000/e1000_main.c @@ -3602,7 +3602,7 @@ e1000_update_stats(struct e1000_adapter */ if (adapter->link_speed == 0) return; - if (pdev->error_state && pdev->error_state != pci_channel_io_normal) + if (pci_channel_offline(pdev)) return; spin_lock_irqsave(&adapter->stats_lock, flags); --- gregkh-2.6.orig/drivers/net/ixgb/ixgb_main.c +++ gregkh-2.6/drivers/net/ixgb/ixgb_main.c @@ -1609,7 +1609,7 @@ ixgb_update_stats(struct ixgb_adapter *a struct pci_dev *pdev = adapter->pdev; /* Prevent stats update while adapter is being reset */ - if (pdev->error_state && pdev->error_state != pci_channel_io_normal) + if (pci_channel_offline(pdev)) return; if((netdev->flags & IFF_PROMISC) || (netdev->flags & IFF_ALLMULTI) ||