Skip to content

Commit

Permalink
e1000e: Only run S0ix flows if shutdown succeeded
Browse files Browse the repository at this point in the history
[ Upstream commit 808e0d8 ]

If the shutdown failed, the part will be thawed and running
S0ix flows will put it into an undefined state.

Reported-by: Alexander Duyck <alexander.duyck@gmail.com>
Reviewed-by: Alexander Duyck <alexander.duyck@gmail.com>
Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
Tested-by: Yijun Shen <Yijun.shen@dell.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Mario Limonciello authored and gregkh committed Jan 12, 2021
1 parent e3cbce8 commit 35a44ba
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions drivers/net/ethernet/intel/e1000e/netdev.c
Expand Up @@ -6970,13 +6970,14 @@ static __maybe_unused int e1000e_pm_suspend(struct device *dev)
e1000e_pm_freeze(dev);

rc = __e1000_shutdown(pdev, false);
if (rc)
if (rc) {
e1000e_pm_thaw(dev);

/* Introduce S0ix implementation */
if (hw->mac.type >= e1000_pch_cnp &&
!e1000e_check_me(hw->adapter->pdev->device))
e1000e_s0ix_entry_flow(adapter);
} else {
/* Introduce S0ix implementation */
if (hw->mac.type >= e1000_pch_cnp &&
!e1000e_check_me(hw->adapter->pdev->device))
e1000e_s0ix_entry_flow(adapter);
}

return rc;
}
Expand Down

0 comments on commit 35a44ba

Please sign in to comment.