iwlagn: invoke L0S workaround for 6000/1000 series
authorBen Cahill <ben.m.cahill@intel.com>
Fri, 30 Oct 2009 21:36:07 +0000 (14:36 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 2 Nov 2009 20:39:45 +0000 (15:39 -0500)
Invoke workaround to avoid instability in L0->L0S->L1 transition on PCIe bus.
Workaround disables L0S state so device moves directly from L0->L1.
Workaround needed on all devices since and including 4965; add to 6000/1000.

Describe bug and workaround better in comments.

Signed-off-by: Ben Cahill <ben.m.cahill@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-1000.c
drivers/net/wireless/iwlwifi/iwl-6000.c
drivers/net/wireless/iwlwifi/iwl-core.c

index 3a645e485dda1224041fa35f76d653088c695ef7..1e387b9dce1ea368c48e037a211711b4aed692d4 100644 (file)
@@ -164,7 +164,7 @@ struct iwl_cfg iwl1000_bgn_cfg = {
        .valid_tx_ant = ANT_A,
        .valid_rx_ant = ANT_AB,
        .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
-       .set_l0s = false,
+       .set_l0s = true,
        .use_bsm = false,
        .max_ll_items = OTP_MAX_LL_ITEMS_1000,
        .shadow_ram_support = false,
@@ -190,7 +190,7 @@ struct iwl_cfg iwl1000_bg_cfg = {
        .valid_tx_ant = ANT_A,
        .valid_rx_ant = ANT_AB,
        .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL,
-       .set_l0s = false,
+       .set_l0s = true,
        .use_bsm = false,
        .max_ll_items = OTP_MAX_LL_ITEMS_1000,
        .shadow_ram_support = false,
index 32466d38d1aead9e57c8b661ec9dbbd01144964b..2f841a8576e0e625755b6f214cd3c0b3bc43d825 100644 (file)
@@ -299,7 +299,7 @@ struct iwl_cfg iwl6000h_2agn_cfg = {
        .valid_tx_ant = ANT_AB,
        .valid_rx_ant = ANT_AB,
        .pll_cfg_val = 0,
-       .set_l0s = false,
+       .set_l0s = true,
        .use_bsm = false,
        .pa_type = IWL_PA_HYBRID,
        .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
@@ -329,7 +329,7 @@ struct iwl_cfg iwl6000h_2abg_cfg = {
        .valid_tx_ant = ANT_AB,
        .valid_rx_ant = ANT_AB,
        .pll_cfg_val = 0,
-       .set_l0s = false,
+       .set_l0s = true,
        .use_bsm = false,
        .pa_type = IWL_PA_HYBRID,
        .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
@@ -358,7 +358,7 @@ struct iwl_cfg iwl6000h_2bg_cfg = {
        .valid_tx_ant = ANT_AB,
        .valid_rx_ant = ANT_AB,
        .pll_cfg_val = 0,
-       .set_l0s = false,
+       .set_l0s = true,
        .use_bsm = false,
        .pa_type = IWL_PA_HYBRID,
        .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
@@ -390,7 +390,7 @@ struct iwl_cfg iwl6000i_2agn_cfg = {
        .valid_tx_ant = ANT_BC,
        .valid_rx_ant = ANT_BC,
        .pll_cfg_val = 0,
-       .set_l0s = false,
+       .set_l0s = true,
        .use_bsm = false,
        .pa_type = IWL_PA_INTERNAL,
        .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
@@ -420,7 +420,7 @@ struct iwl_cfg iwl6000i_2abg_cfg = {
        .valid_tx_ant = ANT_BC,
        .valid_rx_ant = ANT_BC,
        .pll_cfg_val = 0,
-       .set_l0s = false,
+       .set_l0s = true,
        .use_bsm = false,
        .pa_type = IWL_PA_INTERNAL,
        .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
@@ -449,7 +449,7 @@ struct iwl_cfg iwl6000i_2bg_cfg = {
        .valid_tx_ant = ANT_BC,
        .valid_rx_ant = ANT_BC,
        .pll_cfg_val = 0,
-       .set_l0s = false,
+       .set_l0s = true,
        .use_bsm = false,
        .pa_type = IWL_PA_INTERNAL,
        .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
@@ -478,7 +478,7 @@ struct iwl_cfg iwl6050_2agn_cfg = {
        .valid_tx_ant = ANT_AB,
        .valid_rx_ant = ANT_AB,
        .pll_cfg_val = 0,
-       .set_l0s = false,
+       .set_l0s = true,
        .use_bsm = false,
        .pa_type = IWL_PA_SYSTEM,
        .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
@@ -508,7 +508,7 @@ struct iwl_cfg iwl6050_2abg_cfg = {
        .valid_tx_ant = ANT_AB,
        .valid_rx_ant = ANT_AB,
        .pll_cfg_val = 0,
-       .set_l0s = false,
+       .set_l0s = true,
        .use_bsm = false,
        .pa_type = IWL_PA_SYSTEM,
        .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
@@ -537,7 +537,7 @@ struct iwl_cfg iwl6000_3agn_cfg = {
        .valid_tx_ant = ANT_ABC,
        .valid_rx_ant = ANT_ABC,
        .pll_cfg_val = 0,
-       .set_l0s = false,
+       .set_l0s = true,
        .use_bsm = false,
        .pa_type = IWL_PA_SYSTEM,
        .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
@@ -567,7 +567,7 @@ struct iwl_cfg iwl6050_3agn_cfg = {
        .valid_tx_ant = ANT_ABC,
        .valid_rx_ant = ANT_ABC,
        .pll_cfg_val = 0,
-       .set_l0s = false,
+       .set_l0s = true,
        .use_bsm = false,
        .pa_type = IWL_PA_SYSTEM,
        .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
index 4808f66611608a7b281767f1631e661bc1eecc13..addc9ad5a5c6809a35edee75cfe09946b25372cd 100644 (file)
@@ -1430,8 +1430,12 @@ int iwl_apm_init(struct iwl_priv *priv)
                                    CSR_HW_IF_CONFIG_REG_BIT_HAP_WAKE_L1A);
 
        /*
-        * HW bug W/A - costs negligible power consumption ...
-        * Check if BIOS (or OS) enabled L1-ASPM on this device
+        * HW bug W/A for instability in PCIe bus L0->L0S->L1 transition.
+        * Check if BIOS (or OS) enabled L1-ASPM on this device.
+        * If so (likely), disable L0S, so device moves directly L0->L1;
+        *    costs negligible amount of power savings.
+        * If not (unlikely), enable L0S, so there is at least some
+        *    power savings, even without L1.
         */
        if (priv->cfg->set_l0s) {
                lctl = iwl_pcie_link_ctl(priv);