]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
PCI: Use newly defined PCI channel offline routine
authorLinas Vepstas <linas@linas.org>
Wed, 13 Dec 2006 00:29:15 +0000 (18:29 -0600)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 7 Feb 2007 23:50:04 +0000 (15:50 -0800)
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>
drivers/net/e1000/e1000_main.c
drivers/net/ixgb/ixgb_main.c

index c6259c7127f6bb9aaa4dbda53ee783ed428c1e0e..8424a8e4cbb01109db622cde41fde22108998a5b 100644 (file)
@@ -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);
index a083a9189230d8f0a3dda97f7b3eba485862f1d1..f2742179f12099fb31796f748a5e86cfb18c0584 100644 (file)
@@ -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) ||