Skip to contentSkip to conversation

e1000: Reset all functions after a PCI error

PATCH In review Linas Vepstas 2 participants 2 messages Oct 17, 2006 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 e1000: Reset all functions after a PCI error

Please apply and forward upstream.

--linas

During the handling of the PCI error recovery sequence, the current e1000 driver erroneously blocks a device reset for any but the first PCI function. It shouldn't -- this is a cut-n-paste error from a different driver (which tolerated only one hardware reset per hardware card).

Cc Jesse Brandeburg <[email protected]>
Cc Auke Kok <[email protected]>

----

 drivers/net/e1000/e1000_main.c |    4 ----
 1 file changed, 4 deletions(-)
drivers/net/e1000/e1000_main.c +0 -4
Index: linux-2.6.19-rc1-git11/drivers/net/e1000/e1000_main.c
===================================================================
@@ -4914,10 +4914,6 @@ static pci_ers_result_t e1000_io_slot_re
 	pci_enable_wake(pdev, PCI_D3hot, 0);
 	pci_enable_wake(pdev, PCI_D3cold, 0);
 
-	/* Perform card reset only on one instance of the card */
-	if (PCI_FUNC (pdev->devfn) != 0)
-		return PCI_ERS_RESULT_RECOVERED;
-
 	e1000_reset(adapter);
 	E1000_WRITE_REG(&adapter->hw, WUS, ~0);
 
#1 lore raw
Quoted 1 line · Linas Vepstas

Please apply and forward upstream.

ACK

Jeff, please apply on top of today's fixes.

Auke

Quoted 30 lines

--linas

During the handling of the PCI error recovery sequence,
the current e1000 driver erroneously blocks a device reset
for any but the first PCI function. It shouldn't -- this is a cut-n-paste error from a different driver (which tolerated only one hardware reset per hardware card).

Cc Jesse Brandeburg <[email protected]>
Cc Auke Kok <[email protected]>

----

 drivers/net/e1000/e1000_main.c |    4 ----
 1 file changed, 4 deletions(-)

Index: linux-2.6.19-rc1-git11/drivers/net/e1000/e1000_main.c
===================================================================

drivers/net/e1000/e1000_main.c +0 -4
@@ -4914,10 +4914,6 @@ static pci_ers_result_t e1000_io_slot_re
 	pci_enable_wake(pdev, PCI_D3hot, 0);
 	pci_enable_wake(pdev, PCI_D3cold, 0);
 
-	/* Perform card reset only on one instance of the card */
-	if (PCI_FUNC (pdev->devfn) != 0)
-		return PCI_ERS_RESULT_RECOVERED;
-
 	e1000_reset(adapter);
 	E1000_WRITE_REG(&adapter->hw, WUS, ~0);