]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ixgbe: save and restore pcie/msi state to support EEH recovery
authorWendy Xiong <wendyx@us.ibm.com>
Wed, 23 Apr 2008 18:09:24 +0000 (11:09 -0700)
committerJeff Garzik <jgarzik@redhat.com>
Fri, 25 Apr 2008 06:07:13 +0000 (02:07 -0400)
To enable EEH support for pci-express network adapters, pcie/msi state
needs to be saved and restored for that adapter.

Tested this EEH patch with Intel 10G pci-express ixgbe adapter.

Signed-off-by: Wendy Xiong <wendyx@us.ibm.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/net/ixgbe/ixgbe_main.c

index cb371a8c24a72244092b4353757a1e886dd4d91a..7b859220c255b3b81017f156548df2dcca2f32e7 100644 (file)
@@ -3431,6 +3431,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
        }
 
        pci_set_master(pdev);
+       pci_save_state(pdev);
 
 #ifdef CONFIG_NETDEVICES_MULTIQUEUE
        netdev = alloc_etherdev_mq(sizeof(struct ixgbe_adapter), MAX_TX_QUEUES);
@@ -3721,6 +3722,7 @@ static pci_ers_result_t ixgbe_io_slot_reset(struct pci_dev *pdev)
                return PCI_ERS_RESULT_DISCONNECT;
        }
        pci_set_master(pdev);
+       pci_restore_state(pdev);
 
        pci_enable_wake(pdev, PCI_D3hot, 0);
        pci_enable_wake(pdev, PCI_D3cold, 0);