Skip to contentSkip to conversation

e1000e: io_error_detected callback should return PCI_ERS_RESULT_DISCONNECT on permanent failure

PATCH In review Mike Mason 3 participants 3 messages May 29, 2009 – Jun 2, 2009

Subsystems (2)
lore
Share & tools
lore

Mike Mason

author
#0 lore raw

PATCH 1/1 e1000e: io_error_detected callback should return PCI_ERS_RESULT_DISCONNECT on permanent failure

PCI drivers that implement the io_error_detected callback
should return PCI_ERS_RESULT_DISCONNECT if the state
passed in is pci_channel_io_perm_failure. This state is not checked in many of the network drivers.

This patch fixes the omission in the e1000e driver.

drivers/net/e1000e/netdev.c +0 -0
@@ -4616,6 +4616,9 @@ static pci_ers_result_t e1000_io_error_d
 
	netif_device_detach(netdev);

+ if (state == pci_channel_io_perm_failure)
+ return PCI_ERS_RESULT_DISCONNECT;
+

	if (netif_running(netdev))
		e1000e_down(adapter);
	pci_disable_device(pdev);
Acked-by on v1 1/1
#1 lore raw
Quoted 12 lines · Mike Mason

PCI drivers that implement the io_error_detected callback
should return PCI_ERS_RESULT_DISCONNECT if the state
passed in is pci_channel_io_perm_failure.  This state is not checked in many of the network drivers.

This patch fixes the omission in the e1000e driver.

drivers/net/e1000e/netdev.c       2009-05-29 13:43:24.000000000 -0700 renamed from drivers/net/e1000e/netdev.c       2009-05-23 14:47:00.000000000 -0700 +0 -0
@@ -4616,6 +4616,9 @@ static pci_ers_result_t e1000_io_error_d
 

drivers/net/e1000e/netdev.c       2009-05-29 13:43:24.000000000 -0700 static pci_ers_result_t e1000_io_error_d

Quoted 10 lines
drivers/net/e1000e/netdev.c       2009-05-29 13:43:24.000000000 -0700 renamed from drivers/net/e1000e/netdev.c       2009-05-23 14:47:00.000000000 -0700 +3 -1
        netif_device_detach(netdev);
 
+       if (state == pci_channel_io_perm_failure)
+               return PCI_ERS_RESULT_DISCONNECT;
+
        if (netif_running(netdev))
                e1000e_down(adapter);
        pci_disable_device(pdev);
 
--

Looks good.

Signature · 2 lines
Cheers,
Jeff
maintainer
#2 lore raw

From: Jeff Kirsher <[email protected]>
Date: Mon, 1 Jun 2009 16:43:39 -0700

Quoted 22 lines · Mike Mason
Quoted 21 lines

PCI drivers that implement the io_error_detected callback
should return PCI_ERS_RESULT_DISCONNECT if the state
passed in is pci_channel_io_perm_failure.  This state is not checked in many of the network drivers.

This patch fixes the omission in the e1000e driver.

drivers/net/e1000e/netdev.c       2009-05-29 13:43:24.000000000 -0700 renamed from drivers/net/e1000e/netdev.c       2009-05-23 14:47:00.000000000 -0700 +3 -0
@@ -4616,6 +4616,9 @@ static pci_ers_result_t e1000_io_error_d
 
        netif_device_detach(netdev);
 
+       if (state == pci_channel_io_perm_failure)
+               return PCI_ERS_RESULT_DISCONNECT;
+
        if (netif_running(netdev))
                e1000e_down(adapter);
        pci_disable_device(pdev);
Quoted 5 lines
Quoted 1 line

--

Looks good.

Jeff, can you simply queue this up into the next batch of Intel driver bits you send to me?

Thanks!