提交 f2532b04 编写于 作者: E Emmanuel Grumbach 提交者: Johannes Berg

iwlwifi: pcie: don't disable L1 for newest NICs

In newest NICs (7000 family and up), L1 is supported, so
avoid to disable it.
Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
上级 e126b5d9
...@@ -99,6 +99,7 @@ static const struct iwl_base_params iwl7000_base_params = { ...@@ -99,6 +99,7 @@ static const struct iwl_base_params iwl7000_base_params = {
.wd_timeout = IWL_LONG_WD_TIMEOUT, .wd_timeout = IWL_LONG_WD_TIMEOUT,
.max_event_log_size = 512, .max_event_log_size = 512,
.shadow_reg_enable = true, .shadow_reg_enable = true,
.pcie_l1_allowed = true,
}; };
static const struct iwl_ht_params iwl7000_ht_params = { static const struct iwl_ht_params iwl7000_ht_params = {
......
...@@ -152,6 +152,7 @@ struct iwl_base_params { ...@@ -152,6 +152,7 @@ struct iwl_base_params {
unsigned int wd_timeout; unsigned int wd_timeout;
u32 max_event_log_size; u32 max_event_log_size;
const bool shadow_reg_enable; const bool shadow_reg_enable;
const bool pcie_l1_allowed;
}; };
/* /*
......
...@@ -1418,10 +1418,16 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev, ...@@ -1418,10 +1418,16 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
spin_lock_init(&trans_pcie->reg_lock); spin_lock_init(&trans_pcie->reg_lock);
init_waitqueue_head(&trans_pcie->ucode_write_waitq); init_waitqueue_head(&trans_pcie->ucode_write_waitq);
/* W/A - seems to solve weird behavior. We need to remove this if we if (!cfg->base_params->pcie_l1_allowed) {
* don't want to stay in L1 all the time. This wastes a lot of power */ /*
pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1 | * W/A - seems to solve weird behavior. We need to remove this
PCIE_LINK_STATE_CLKPM); * if we don't want to stay in L1 all the time. This wastes a
* lot of power.
*/
pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S |
PCIE_LINK_STATE_L1 |
PCIE_LINK_STATE_CLKPM);
}
if (pci_enable_device(pdev)) { if (pci_enable_device(pdev)) {
err = -ENODEV; err = -ENODEV;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册