From: Emmanuel Grumbach Date: Wed, 6 Jun 2012 11:55:02 +0000 (+0200) Subject: iwlwifi: disable the buggy chain extension feature in HW X-Git-Tag: v3.2.21~28 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cbb05493366d341a1b66b2bf7488b4957ffc7e75;p=thirdparty%2Fkernel%2Fstable.git iwlwifi: disable the buggy chain extension feature in HW commit d012d04e4d6312ea157b6cf19e9689af934f5aa7 upstream. This feature has been reported to be buggy and enabled by default. We therefore need to disable it manually. Signed-off-by: Emmanuel Grumbach Signed-off-by: Johannes Berg Signed-off-by: John W. Linville [bwh: Backported to 3.2 as instructed: pass bus(trans) to iwl_write_prph()] Signed-off-by: Ben Hutchings --- diff --git a/drivers/net/wireless/iwlwifi/iwl-prph.h b/drivers/net/wireless/iwlwifi/iwl-prph.h index d9b089e9a1a18..0683006ec68d8 100644 --- a/drivers/net/wireless/iwlwifi/iwl-prph.h +++ b/drivers/net/wireless/iwlwifi/iwl-prph.h @@ -228,6 +228,7 @@ #define SCD_TXFACT (SCD_BASE + 0x10) #define SCD_ACTIVE (SCD_BASE + 0x14) #define SCD_QUEUECHAIN_SEL (SCD_BASE + 0xe8) +#define SCD_CHAINEXT_EN (SCD_BASE + 0x244) #define SCD_AGGR_SEL (SCD_BASE + 0x248) #define SCD_INTERRUPT_MASK (SCD_BASE + 0x108) diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c index 5f17ab8e76bac..5815cf5df2e8f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c @@ -868,6 +868,11 @@ static void iwl_trans_pcie_tx_start(struct iwl_trans *trans) iwl_write_prph(bus(trans), SCD_DRAM_BASE_ADDR, trans_pcie->scd_bc_tbls.dma >> 10); + /* The chain extension of the SCD doesn't work well. This feature is + * enabled by default by the HW, so we need to disable it manually. + */ + iwl_write_prph(bus(trans), SCD_CHAINEXT_EN, 0); + /* Enable DMA channel */ for (chan = 0; chan < FH_TCSR_CHNL_NUM ; chan++) iwl_write_direct32(bus(trans), FH_TCSR_CHNL_TX_CONFIG_REG(chan),