[PATCH 34/58] iwlwifi: pcie: disable L1 Active after pci_enable_device
3.5.7.21 -stable review patch. If anyone has any objections, please let me know. -- From: Emmanuel Grumbach commit eabc4ac5d7606a57ee2b7308cb7323ea8f60183b upstream. As Arjan pointed out, we mustn't do anything related to PCI configuration until the device is properly enabled with pci_enable_device(). Reported-by: Arjan van de Ven Signed-off-by: Emmanuel Grumbach Signed-off-by: Johannes Berg [ luis: backported to 3.5: - file rename: drivers/net/wireless/iwlwifi/pcie/trans.c -> drivers/net/wireless/iwlwifi/iwl-trans-pcie.c ] Signed-off-by: Luis Henriques --- drivers/net/wireless/iwlwifi/iwl-trans-pcie.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c index 844d0f6..283b423 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c @@ -2107,16 +2107,16 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev, spin_lock_init(_pcie->irq_lock); init_waitqueue_head(_pcie->ucode_write_waitq); - /* W/A - seems to solve weird behavior. We need to remove this 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)) { err = -ENODEV; goto out_no_pci; } + /* W/A - seems to solve weird behavior. We need to remove this 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); + pci_set_master(pdev); err = pci_set_dma_mask(pdev, DMA_BIT_MASK(36)); -- 1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 34/58] iwlwifi: pcie: disable L1 Active after pci_enable_device
3.5.7.21 -stable review patch. If anyone has any objections, please let me know. -- From: Emmanuel Grumbach emmanuel.grumb...@intel.com commit eabc4ac5d7606a57ee2b7308cb7323ea8f60183b upstream. As Arjan pointed out, we mustn't do anything related to PCI configuration until the device is properly enabled with pci_enable_device(). Reported-by: Arjan van de Ven ar...@linux.intel.com Signed-off-by: Emmanuel Grumbach emmanuel.grumb...@intel.com Signed-off-by: Johannes Berg johannes.b...@intel.com [ luis: backported to 3.5: - file rename: drivers/net/wireless/iwlwifi/pcie/trans.c - drivers/net/wireless/iwlwifi/iwl-trans-pcie.c ] Signed-off-by: Luis Henriques luis.henriq...@canonical.com --- drivers/net/wireless/iwlwifi/iwl-trans-pcie.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c index 844d0f6..283b423 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c @@ -2107,16 +2107,16 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev, spin_lock_init(trans_pcie-irq_lock); init_waitqueue_head(trans_pcie-ucode_write_waitq); - /* W/A - seems to solve weird behavior. We need to remove this 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)) { err = -ENODEV; goto out_no_pci; } + /* W/A - seems to solve weird behavior. We need to remove this 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); + pci_set_master(pdev); err = pci_set_dma_mask(pdev, DMA_BIT_MASK(36)); -- 1.8.3.2 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/