i40e: don't clear suspended state until we finish resuming
authorJacob Keller <jacob.e.keller@intel.com>
Fri, 14 Jul 2017 13:27:04 +0000 (09:27 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 29 Sep 2017 19:51:00 +0000 (12:51 -0700)
commit401586c2b9bb16147f3dcc64d3596013625e2c44
treefc85c801141a8f3f0be1a7df46224930cfee4555
parent0e5d3da400558b7d30586a2cc1afe02276445636
i40e: don't clear suspended state until we finish resuming

When handling suspend and resume callbacks we want to make sure that (a)
we don't suspend again if we're already suspended and (b) we don't
resume again if we're already resuming. Lets make sure we test_and_set
the __I40E_SUSPENDED bit in i40e_suspend which ensures that a suspend
call when already suspended will exit early. Additionally, if
__I40E_SUSPENDED is not set when we begin resuming, exit early as well.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_main.c