]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
vxge: return PCI_ERS_RESULT_DISCONNECT on permanent failure
authorDean Nelson <dnelson@redhat.com>
Fri, 31 Jul 2009 09:14:03 +0000 (09:14 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 2 Aug 2009 06:12:12 +0000 (23:12 -0700)
PCI drivers that implement the struct pci_error_handlers' error_detected
callback should return PCI_ERS_RESULT_DISCONNECT if the state passed in is
pci_channel_io_perm_failure. This patch fixes the issue for vxge.

Signed-off-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxge/vxge-main.c

index 7b5402b50d0aecf23c38002cdab3d3b5fb5e82ec..335140d2834a5a4351e7d8bab85d9bc3484dd265 100644 (file)
@@ -3956,6 +3956,9 @@ static pci_ers_result_t vxge_io_error_detected(struct pci_dev *pdev,
 
        netif_device_detach(netdev);
 
+       if (state == pci_channel_io_perm_failure)
+               return PCI_ERS_RESULT_DISCONNECT;
+
        if (netif_running(netdev)) {
                /* Bring down the card, while avoiding PCI I/O */
                do_vxge_close(netdev, 0);