Commit 81b1955e authored by Linas Vepstas's avatar Linas Vepstas Committed by Greg Kroah-Hartman

PCI: Use newly defined PCI channel offline routine

Use newly minted routine to access the PCI channel state.
Signed-off-by: default avatarLinas Vepstas <linas@linas.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a7369f1f
...@@ -3602,7 +3602,7 @@ e1000_update_stats(struct e1000_adapter *adapter) ...@@ -3602,7 +3602,7 @@ e1000_update_stats(struct e1000_adapter *adapter)
*/ */
if (adapter->link_speed == 0) if (adapter->link_speed == 0)
return; return;
if (pdev->error_state && pdev->error_state != pci_channel_io_normal) if (pci_channel_offline(pdev))
return; return;
spin_lock_irqsave(&adapter->stats_lock, flags); spin_lock_irqsave(&adapter->stats_lock, flags);
......
...@@ -1609,7 +1609,7 @@ ixgb_update_stats(struct ixgb_adapter *adapter) ...@@ -1609,7 +1609,7 @@ ixgb_update_stats(struct ixgb_adapter *adapter)
struct pci_dev *pdev = adapter->pdev; struct pci_dev *pdev = adapter->pdev;
/* Prevent stats update while adapter is being reset */ /* 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; return;
if((netdev->flags & IFF_PROMISC) || (netdev->flags & IFF_ALLMULTI) || if((netdev->flags & IFF_PROMISC) || (netdev->flags & IFF_ALLMULTI) ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment