[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210111130049.813369506@linuxfoundation.org>
Date: Mon, 11 Jan 2021 14:00:51 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Alexander Duyck <alexander.duyck@...il.com>,
Mario Limonciello <mario.limonciello@...l.com>,
Yijun Shen <Yijun.shen@...l.com>,
Tony Nguyen <anthony.l.nguyen@...el.com>
Subject: [PATCH 5.10 027/145] e1000e: Only run S0ix flows if shutdown succeeded
From: Mario Limonciello <mario.limonciello@...l.com>
[ Upstream commit 808e0d8832cc81738f3e8df12dff0688352baf50 ]
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@...il.com>
Reviewed-by: Alexander Duyck <alexander.duyck@...il.com>
Signed-off-by: Mario Limonciello <mario.limonciello@...l.com>
Tested-by: Yijun Shen <Yijun.shen@...l.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@...el.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/net/ethernet/intel/e1000e/netdev.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -6970,13 +6970,14 @@ static __maybe_unused int e1000e_pm_susp
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;
}
Powered by blists - more mailing lists