Patchwork e1000e: io_error_detected callback should return PCI_ERS_RESULT_DISCONNECT on permanent failure

login
register
mail settings
Submitter Mike Mason
Date May 29, 2009, 9:16 p.m.
Message ID <4A2050B8.7050302@us.ibm.com>
Download mbox | patch
Permalink /patch/27857/
State Awaiting Upstream
Delegated to: David Miller
Headers show

Comments

Mike Mason - May 29, 2009, 9:16 p.m.
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.

Signed-off-by: Mike Mason <mmlnx@us.ibm.com> 


--
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
Jeff Kirsher - June 1, 2009, 11:43 p.m.
On Fri, May 29, 2009 at 2:16 PM, Mike Mason <mmlnx@us.ibm.com> wrote:
> 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.
>
> Signed-off-by: Mike Mason <mmlnx@us.ibm.com>
> --- a/drivers/net/e1000e/netdev.c       2009-05-23 14:47:00.000000000 -0700
> +++ b/drivers/net/e1000e/netdev.c       2009-05-29 13:43:24.000000000 -0700
> @@ -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);
>
> --

Looks good.

Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
David Miller - June 2, 2009, 1:26 a.m.
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Mon, 1 Jun 2009 16:43:39 -0700

> On Fri, May 29, 2009 at 2:16 PM, Mike Mason <mmlnx@us.ibm.com> wrote:
>> 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.
>>
>> Signed-off-by: Mike Mason <mmlnx@us.ibm.com>
>> --- a/drivers/net/e1000e/netdev.c       2009-05-23 14:47:00.000000000 -0700
>> +++ b/drivers/net/e1000e/netdev.c       2009-05-29 13:43:24.000000000 -0700
>> @@ -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);
>>
>> --
> 
> Looks good.
> 
> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

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

Thanks!
--
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

Patch

--- a/drivers/net/e1000e/netdev.c	2009-05-23 14:47:00.000000000 -0700
+++ b/drivers/net/e1000e/netdev.c	2009-05-29 13:43:24.000000000 -0700
@@ -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);