Skip to content

Commit e086ba2

Browse files
vlifshtsJeff Kirsher
authored andcommitted
e1000e: disable s0ix entry and exit flows for ME systems
Since ME systems do not support SLP_S0 in S0ix state, and S0ix entry and exit flows may cause errors on them it is best to avoid using e1000e_s0ix_entry_flow and e1000e_s0ix_exit_flow functions. This was done by creating a struct of all devices that comes with ME and by checking if the current device has ME. Signed-off-by: Vitaly Lifshits <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent f298010 commit e086ba2

File tree

1 file changed

+43
-2
lines changed
  • drivers/net/ethernet/intel/e1000e

1 file changed

+43
-2
lines changed

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

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,45 @@ static const struct e1000_reg_info e1000_reg_info_tbl[] = {
107107
{0, NULL}
108108
};
109109

110+
struct e1000e_me_supported {
111+
u16 device_id; /* supported device ID */
112+
};
113+
114+
static const struct e1000e_me_supported me_supported[] = {
115+
{E1000_DEV_ID_PCH_LPT_I217_LM},
116+
{E1000_DEV_ID_PCH_LPTLP_I218_LM},
117+
{E1000_DEV_ID_PCH_I218_LM2},
118+
{E1000_DEV_ID_PCH_I218_LM3},
119+
{E1000_DEV_ID_PCH_SPT_I219_LM},
120+
{E1000_DEV_ID_PCH_SPT_I219_LM2},
121+
{E1000_DEV_ID_PCH_LBG_I219_LM3},
122+
{E1000_DEV_ID_PCH_SPT_I219_LM4},
123+
{E1000_DEV_ID_PCH_SPT_I219_LM5},
124+
{E1000_DEV_ID_PCH_CNP_I219_LM6},
125+
{E1000_DEV_ID_PCH_CNP_I219_LM7},
126+
{E1000_DEV_ID_PCH_ICP_I219_LM8},
127+
{E1000_DEV_ID_PCH_ICP_I219_LM9},
128+
{E1000_DEV_ID_PCH_CMP_I219_LM10},
129+
{E1000_DEV_ID_PCH_CMP_I219_LM11},
130+
{E1000_DEV_ID_PCH_CMP_I219_LM12},
131+
{E1000_DEV_ID_PCH_TGP_I219_LM13},
132+
{E1000_DEV_ID_PCH_TGP_I219_LM14},
133+
{E1000_DEV_ID_PCH_TGP_I219_LM15},
134+
{0}
135+
};
136+
137+
static bool e1000e_check_me(u16 device_id)
138+
{
139+
struct e1000e_me_supported *id;
140+
141+
for (id = (struct e1000e_me_supported *)me_supported;
142+
id->device_id; id++)
143+
if (device_id == id->device_id)
144+
return true;
145+
146+
return false;
147+
}
148+
110149
/**
111150
* __ew32_prepare - prepare to write to MAC CSR register on certain parts
112151
* @hw: pointer to the HW structure
@@ -6916,7 +6955,8 @@ static int e1000e_pm_suspend(struct device *dev)
69166955
e1000e_pm_thaw(dev);
69176956

69186957
/* Introduce S0ix implementation */
6919-
if (hw->mac.type >= e1000_pch_cnp)
6958+
if (hw->mac.type >= e1000_pch_cnp &&
6959+
!e1000e_check_me(hw->adapter->pdev->device))
69206960
e1000e_s0ix_entry_flow(adapter);
69216961

69226962
return rc;
@@ -6931,7 +6971,8 @@ static int e1000e_pm_resume(struct device *dev)
69316971
int rc;
69326972

69336973
/* Introduce S0ix implementation */
6934-
if (hw->mac.type >= e1000_pch_cnp)
6974+
if (hw->mac.type >= e1000_pch_cnp &&
6975+
!e1000e_check_me(hw->adapter->pdev->device))
69356976
e1000e_s0ix_exit_flow(adapter);
69366977

69376978
rc = __e1000_resume(pdev);

0 commit comments

Comments
 (0)