iwlwifi: pcie: cancel Tx timer upon firmware crash
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Wed, 24 Jun 2015 11:58:13 +0000 (14:58 +0300)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Tue, 4 Aug 2015 07:11:43 +0000 (10:11 +0300)
When the firmware crashes, we can't expect the Tx queues to
progress. Cancel their timer.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/pcie/rx.c

index 32ec95bd4973d5cd8c49f2181e9e63d3109cedc3..5561dee7b62dab7edeb210fd7ab87a0735160919 100644 (file)
@@ -1014,6 +1014,7 @@ restart:
 static void iwl_pcie_irq_handle_error(struct iwl_trans *trans)
 {
        struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
+       int i;
 
        /* W/A for WiFi/WiMAX coex and WiMAX own the RF */
        if (trans->cfg->internal_wimax_coex &&
@@ -1037,6 +1038,9 @@ static void iwl_pcie_irq_handle_error(struct iwl_trans *trans)
        iwl_trans_fw_error(trans);
        local_bh_enable();
 
+       for (i = 0; i < trans->cfg->base_params->num_of_queues; i++)
+               del_timer(&trans_pcie->txq[i].stuck_timer);
+
        clear_bit(STATUS_SYNC_HCMD_ACTIVE, &trans->status);
        wake_up(&trans_pcie->wait_command_queue);
 }