iwlwifi: pcie: don't wake up the NIC when writing CSRs in MSIX mode
authorHaim Dreyfuss <haim.dreyfuss@intel.com>
Sun, 3 Apr 2016 17:15:26 +0000 (20:15 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Tue, 10 May 2016 19:34:01 +0000 (22:34 +0300)
CSR registers are always available even when the NIC is not awake, no
need to wake up the NIC before accessing them. This has a huge impact
when we re-enable an interrupt at the end of the ISR since waking up the
NIC can take some time.

Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/pcie/rx.c

index 7f8a2322cda2ca4f2e85b6e67bc2b4cb2fab7334..89f87f7fb0d64b9d16ea25cfcfcef0fada48d50a 100644 (file)
@@ -1298,7 +1298,7 @@ static inline void iwl_pcie_clear_irq(struct iwl_trans *trans,
         * write 1 clear (W1C) register, meaning that it's being clear
         * by writing 1 to the bit.
         */
-       iwl_write_direct32(trans, CSR_MSIX_AUTOMASK_ST_AD, BIT(entry->entry));
+       iwl_write32(trans, CSR_MSIX_AUTOMASK_ST_AD, BIT(entry->entry));
 }
 
 /*
@@ -1817,13 +1817,13 @@ irqreturn_t iwl_pcie_irq_msix_handler(int irq, void *dev_id)
        lock_map_acquire(&trans->sync_cmd_lockdep_map);
 
        spin_lock(&trans_pcie->irq_lock);
-       inta_fh = iwl_read_direct32(trans, CSR_MSIX_FH_INT_CAUSES_AD);
-       inta_hw = iwl_read_direct32(trans, CSR_MSIX_HW_INT_CAUSES_AD);
+       inta_fh = iwl_read32(trans, CSR_MSIX_FH_INT_CAUSES_AD);
+       inta_hw = iwl_read32(trans, CSR_MSIX_HW_INT_CAUSES_AD);
        /*
         * Clear causes registers to avoid being handling the same cause.
         */
-       iwl_write_direct32(trans, CSR_MSIX_FH_INT_CAUSES_AD, inta_fh);
-       iwl_write_direct32(trans, CSR_MSIX_HW_INT_CAUSES_AD, inta_hw);
+       iwl_write32(trans, CSR_MSIX_FH_INT_CAUSES_AD, inta_fh);
+       iwl_write32(trans, CSR_MSIX_HW_INT_CAUSES_AD, inta_hw);
        spin_unlock(&trans_pcie->irq_lock);
 
        if (unlikely(!(inta_fh | inta_hw))) {