summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/i40evf
diff options
context:
space:
mode:
authorPaweł Jabłoński <pawel.jablonski@intel.com>2018-05-10 05:59:49 -0700
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2018-05-14 07:05:16 -0700
commit27392e57189e6e6f77e78fe9aeb3a2c7e2ccbdf4 (patch)
tree6566efc8ebab6fe733566e297626719ea9308f5f /drivers/net/ethernet/intel/i40evf
parentc79756cb5f084736b138da9319a02f7c72644548 (diff)
downloadtalos-obmc-linux-27392e57189e6e6f77e78fe9aeb3a2c7e2ccbdf4.tar.gz
talos-obmc-linux-27392e57189e6e6f77e78fe9aeb3a2c7e2ccbdf4.zip
i40evf: Fix a hardware reset support in VF driver
This patch fixes a hardware reset support in VF driver. It is needed because when a hardware reset is detected adapter->state is in __I40EVF_RESETTING state before i40evf_reset_task is called. Without this patch unloading VF driver after a hardware reset ends with a system crash. Signed-off-by: Paweł Jabłoński <pawel.jablonski@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40evf')
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40evf_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 95a222d7ae43..a7b87f935411 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -1925,7 +1925,8 @@ continue_reset:
* ndo_open() returning, so we can't assume it means all our open
* tasks have finished, since we're not holding the rtnl_lock here.
*/
- running = (adapter->state == __I40EVF_RUNNING);
+ running = ((adapter->state == __I40EVF_RUNNING) ||
+ (adapter->state == __I40EVF_RESETTING));
if (running) {
netif_carrier_off(netdev);
OpenPOWER on IntegriCloud