Skip to content

Commit 2e7256f

Browse files
Sasha Neftindavem330
authored andcommitted
e1000e: Check the PCIm state
Complete to commit def4ec6 ("e1000e: PCIm function state support") Check the PCIm state only on CSME systems. There is no point to do this check on non CSME systems. This patch fixes a generation a false-positive warning: "Error in exiting dmoff" Fixes: def4ec6 ("e1000e: PCIm function state support") Signed-off-by: Sasha Neftin <[email protected]> Tested-by: Dvora Fuxbrumer <[email protected]> Signed-off-by: Tony Nguyen <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent fd7ce28 commit 2e7256f

File tree

1 file changed

+13
-11
lines changed
  • drivers/net/ethernet/intel/e1000e

1 file changed

+13
-11
lines changed

drivers/net/ethernet/intel/e1000e/netdev.c

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5223,18 +5223,20 @@ static void e1000_watchdog_task(struct work_struct *work)
52235223
pm_runtime_resume(netdev->dev.parent);
52245224

52255225
/* Checking if MAC is in DMoff state*/
5226-
pcim_state = er32(STATUS);
5227-
while (pcim_state & E1000_STATUS_PCIM_STATE) {
5228-
if (tries++ == dmoff_exit_timeout) {
5229-
e_dbg("Error in exiting dmoff\n");
5230-
break;
5231-
}
5232-
usleep_range(10000, 20000);
5226+
if (er32(FWSM) & E1000_ICH_FWSM_FW_VALID) {
52335227
pcim_state = er32(STATUS);
5234-
5235-
/* Checking if MAC exited DMoff state */
5236-
if (!(pcim_state & E1000_STATUS_PCIM_STATE))
5237-
e1000_phy_hw_reset(&adapter->hw);
5228+
while (pcim_state & E1000_STATUS_PCIM_STATE) {
5229+
if (tries++ == dmoff_exit_timeout) {
5230+
e_dbg("Error in exiting dmoff\n");
5231+
break;
5232+
}
5233+
usleep_range(10000, 20000);
5234+
pcim_state = er32(STATUS);
5235+
5236+
/* Checking if MAC exited DMoff state */
5237+
if (!(pcim_state & E1000_STATUS_PCIM_STATE))
5238+
e1000_phy_hw_reset(&adapter->hw);
5239+
}
52385240
}
52395241

52405242
/* update snapshot of PHY registers on LSC */

0 commit comments

Comments
 (0)