]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
iwlwifi: pcie: work around suspend/resume issue
authorJohannes Berg <johannes.berg@intel.com>
Tue, 9 May 2017 13:35:06 +0000 (15:35 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 23 Jun 2017 09:27:31 +0000 (12:27 +0300)
In some platforms, having the device enabled with certain radio
frontends causes the platform to not be able to resume properly
from suspend, regardless of the wakeup cause. This was traced to
a hardware issue with the integrated 9000-series A-step variant.
Set the right hardware bit to disable the problematic state.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/iwl-csr.h
drivers/net/wireless/intel/iwlwifi/pcie/trans.c

index 36fb201685986065d31c5a9289821d7aa8798f42..e239b1d92cf91bf3ad2ee3edd5a7b6f5c024b730 100644 (file)
 /* GIO Chicken Bits (PCI Express bus link power management) */
 #define CSR_GIO_CHICKEN_BITS    (CSR_BASE+0x100)
 
+/* host chicken bits */
+#define CSR_HOST_CHICKEN       (CSR_BASE + 0x204)
+#define CSR_HOST_CHICKEN_PM_IDLE_SRC_DIS_SB_PME        BIT(19)
+
 /* Analog phase-lock-loop configuration  */
 #define CSR_ANA_PLL_CFG         (CSR_BASE+0x20c)
 
index 233b6734c237636fcb9fc5f81fd1d7d89d4cf3c5..5778ba2278d1d6eaf7b051cd3b26be1d6f70c8ca 100644 (file)
@@ -3134,6 +3134,17 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
                }
        }
 
+       /*
+        * 9000-series integrated A-step has a problem with suspend/resume
+        * and sometimes even causes the whole platform to get stuck. This
+        * workaround makes the hardware not go into the problematic state.
+        */
+       if (trans->cfg->integrated &&
+           trans->cfg->device_family == IWL_DEVICE_FAMILY_9000 &&
+           CSR_HW_REV_STEP(trans->hw_rev) == SILICON_A_STEP)
+               iwl_set_bit(trans, CSR_HOST_CHICKEN,
+                           CSR_HOST_CHICKEN_PM_IDLE_SRC_DIS_SB_PME);
+
        trans->hw_rf_id = iwl_read32(trans, CSR_HW_RF_ID);
 
        iwl_pcie_set_interrupt_capa(pdev, trans);