diff mbox

[net-next,S4,07/15] i40evf: restore state

Message ID 1429229172-143692-8-git-send-email-catherine.sullivan@intel.com
State Accepted
Delegated to: Jeff Kirsher
Headers show

Commit Message

Catherine Sullivan April 17, 2015, 12:06 a.m. UTC
From: Mitch Williams <mitch.a.williams@intel.com>

If the netdev is closed when a reset occurs, the adapter state will be
left in the RESETTING state incorrectly. Correct this deficiency.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Change-ID: Ia0c5bf0449f7c81609f6f646e6b805f030d3360d
---
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

James Young May 5, 2015, 5:35 p.m. UTC | #1
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces@lists.osuosl.org] On
> Behalf Of Catherine Sullivan
> Sent: Thursday, April 16, 2015 5:06 PM
> To: intel-wired-lan@lists.osuosl.org
> Subject: [Intel-wired-lan] [net-next S4 07/15] i40evf: restore state
> 
> From: Mitch Williams <mitch.a.williams@intel.com>
> 
> If the netdev is closed when a reset occurs, the adapter state will be left in
> the RESETTING state incorrectly. Correct this deficiency.
> 
> Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
> Change-ID: Ia0c5bf0449f7c81609f6f646e6b805f030d3360d
> ---
>  drivers/net/ethernet/intel/i40evf/i40evf_main.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

My testing for this patch showed the issue as unresolved.
diff mbox

Patch

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 7c53aca..37e66ec 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -1624,7 +1624,8 @@  continue_reset:
 			goto reset_err;
 
 		i40evf_irq_enable(adapter, true);
-	}
+	} else
+		adapter->state = __I40EVF_DOWN;
 	return;
 reset_err:
 	dev_err(&adapter->pdev->dev, "failed to allocate resources during reinit\n");