Skip to content

Commit

Permalink
PCI: Use newly defined PCI channel offline routine
Browse files Browse the repository at this point in the history
Use newly minted routine to access the PCI channel state.

Signed-off-by: Linas Vepstas <linas@linas.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Linas Vepstas authored and Greg Kroah-Hartman committed Feb 7, 2007
1 parent a7369f1 commit 81b1955
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/net/e1000/e1000_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ixgb/ixgb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) ||
Expand Down

0 comments on commit 81b1955

Please sign in to comment.