netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Subject: [PATCH 1/2]: e100 disable device on PCI error
@ 2006-06-29 20:06 Linas Vepstas
  2006-06-29 20:11 ` [PATCH 2/2]: e1000 " Linas Vepstas
  2006-06-29 20:19 ` Subject: [PATCH 1/2]: e100 " Auke Kok
  0 siblings, 2 replies; 3+ messages in thread
From: Linas Vepstas @ 2006-06-29 20:06 UTC (permalink / raw)
  To: Jesse Brandeburg, Rajesh Shah, Ronciak, John, Grant Grundler,
	bibo,mao
  Cc: linux-kernel, linux-pci, netdev, akpm


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.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>

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

Index: linux-2.6.17-mm3/drivers/net/e100.c
===================================================================
--- linux-2.6.17-mm3.orig/drivers/net/e100.c	2006-06-27 11:39:08.000000000 -0500
+++ linux-2.6.17-mm3/drivers/net/e100.c	2006-06-29 14:18:40.000000000 -0500
@@ -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;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2]: e1000 disable device on PCI error
  2006-06-29 20:06 Subject: [PATCH 1/2]: e100 disable device on PCI error Linas Vepstas
@ 2006-06-29 20:11 ` Linas Vepstas
  2006-06-29 20:19 ` Subject: [PATCH 1/2]: e100 " Auke Kok
  1 sibling, 0 replies; 3+ messages in thread
From: Linas Vepstas @ 2006-06-29 20:11 UTC (permalink / raw)
  To: Jesse Brandeburg, Rajesh Shah, Ronciak, John, Grant Grundler,
	bibo,mao
  Cc: linux-kernel, linux-pci, netdev, akpm


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.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>

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

Index: linux-2.6.17-mm3/drivers/net/e1000/e1000_main.c
===================================================================
--- linux-2.6.17-mm3.orig/drivers/net/e1000/e1000_main.c	2006-06-27 12:30:02.000000000 -0500
+++ linux-2.6.17-mm3/drivers/net/e1000/e1000_main.c	2006-06-29 14:52:29.000000000 -0500
@@ -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;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Subject: [PATCH 1/2]: e100 disable device on PCI error
  2006-06-29 20:06 Subject: [PATCH 1/2]: e100 disable device on PCI error Linas Vepstas
  2006-06-29 20:11 ` [PATCH 2/2]: e1000 " Linas Vepstas
@ 2006-06-29 20:19 ` Auke Kok
  1 sibling, 0 replies; 3+ messages in thread
From: Auke Kok @ 2006-06-29 20:19 UTC (permalink / raw)
  To: Linas Vepstas
  Cc: Jesse Brandeburg, Rajesh Shah, Ronciak, John, Grant Grundler,
	bibo,mao, linux-kernel, linux-pci, netdev, akpm

Linas Vepstas wrote:
> 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


> 
> Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
> 
> ----
>  drivers/net/e100.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> Index: linux-2.6.17-mm3/drivers/net/e100.c
> ===================================================================
> --- linux-2.6.17-mm3.orig/drivers/net/e100.c	2006-06-27 11:39:08.000000000 -0500
> +++ linux-2.6.17-mm3/drivers/net/e100.c	2006-06-29 14:18:40.000000000 -0500
> @@ -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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-06-29 20:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-29 20:06 Subject: [PATCH 1/2]: e100 disable device on PCI error Linas Vepstas
2006-06-29 20:11 ` [PATCH 2/2]: e1000 " Linas Vepstas
2006-06-29 20:19 ` Subject: [PATCH 1/2]: e100 " Auke Kok

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).