Skip to contentSkip to conversation

Subject: [PATCH 1/2]: e100 disable device on PCI error

PATCH New Linas Vepstas 2 participants 3 messages Jun 29, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

A recent patch in -mm3 titled
"gregkh-pci-pci-don-t-enable-device-if-already-enabled.patch"
causes pci_enable_device() to be a no-op if the kernel thinks that the device is already enabled. This change breaks the PCI error recovery mechanism in the e100 device driver, since, after PCI slot reset, the card is no longer enabled. This is a trivial fix for this problem. Tested.

Please submit uptream.

----

 drivers/net/e100.c |    1 +
 1 file changed, 1 insertion(+)
drivers/net/e100.c +1 -0
Index: linux-2.6.17-mm3/drivers/net/e100.c
===================================================================
@@ -2742,6 +2742,7 @@ static pci_ers_result_t e100_io_error_de
 	/* Detach; put netif into state similar to hotplug unplug. */
 	netif_poll_enable(netdev);
 	netif_device_detach(netdev);
+	pci_disable_device(pdev);
 
 	/* Request a slot reset. */
 	return PCI_ERS_RESULT_NEED_RESET;
#1 lore raw

PATCH 2/2 : e1000 disable device on PCI error

Same as last patch, but for the e1000 gigabit card.

A recent patch in -mm3 titled
"gregkh-pci-pci-don-t-enable-device-if-already-enabled.patch"
causes pci_enable_device() to be a no-op if the kernel thinks that the device is already enabled. This change breaks the PCI error recovery mechanism in the e1000 device driver, since, after PCI slot reset, the card is no longer enabled. This is a trivial fix for this problem. Tested.

Please submit uptream.

----

 drivers/net/e1000/e1000_main.c |    1 +
 1 file changed, 1 insertion(+)
drivers/net/e1000/e1000_main.c +1 -0
Index: linux-2.6.17-mm3/drivers/net/e1000/e1000_main.c
===================================================================
@@ -4640,6 +4640,7 @@ static pci_ers_result_t e1000_io_error_d
 
 	if (netif_running(netdev))
 		e1000_down(adapter);
+	pci_disable_device(pdev);
 
 	/* Request a slot slot reset. */
 	return PCI_ERS_RESULT_NEED_RESET;
#2 lore raw
In reply to Linas Vepstas
Quoted 7 lines · Linas Vepstas

A recent patch in -mm3 titled
"gregkh-pci-pci-don-t-enable-device-if-already-enabled.patch"
causes pci_enable_device() to be a no-op if the kernel thinks
that the device is already enabled. This change breaks the
PCI error recovery mechanism in the e100 device driver, since, after PCI slot reset, the card is no longer enabled. This is a trivial fix for this problem. Tested.

Please submit uptream.

Ack!

I'm preparing a set of e100 patches at the moment, and will include this one with them.

Cheers,

Auke

Quoted 23 lines

----

 drivers/net/e100.c |    1 +
 1 file changed, 1 insertion(+)

Index: linux-2.6.17-mm3/drivers/net/e100.c
===================================================================

drivers/net/e100.c +1 -1
@@ -2742,6 +2742,7 @@ static pci_ers_result_t e100_io_error_de
 	/* Detach; put netif into state similar to hotplug unplug. */
 	netif_poll_enable(netdev);
 	netif_device_detach(netdev);
+	pci_disable_device(pdev);
 
 	/* Request a slot reset. */
 	return PCI_ERS_RESULT_NEED_RESET;
-

To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html