From: Linas Vepstas Date: Wed, 13 Dec 2006 00:29:15 +0000 (-0600) Subject: PCI: Use newly defined PCI channel offline routine X-Git-Tag: v2.6.21-rc1~92^2~28^2~34 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81b1955eef786c1b2fe29f6783543ce13d8b0bc4;p=linux-2.6 PCI: Use newly defined PCI channel offline routine Use newly minted routine to access the PCI channel state. Signed-off-by: Linas Vepstas Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index c6259c7127..8424a8e4cb 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -3602,7 +3602,7 @@ e1000_update_stats(struct e1000_adapter *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); diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index a083a91892..f2742179f1 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c @@ -1609,7 +1609,7 @@ ixgb_update_stats(struct ixgb_adapter *adapter) 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) ||