DORMANTno replies

[patch 2/2] e1000 disable device on PCI error

From: <hidden>
Date: 2006-08-15 06:17:27

From: Linas Vepstas <redacted>

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.

Signed-off-by: Linas Vepstas <redacted>
Cc: John Ronciak <redacted>
Cc: Jesse Brandeburg <redacted>
Cc: Jeff Kirsher <redacted>
Cc: Auke Kok <redacted>
Cc: Jeff Garzik <redacted>
Signed-off-by: Andrew Morton <redacted>
---

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

diff -puN drivers/net/e1000/e1000_main.c~e1000-disable-device-on-pci-error drivers/net/e1000/e1000_main.c
--- a/drivers/net/e1000/e1000_main.c~e1000-disable-device-on-pci-error
+++ a/drivers/net/e1000/e1000_main.c
@@ -4782,6 +4782,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;
_
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help