diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2012-03-07 09:52:27 -0800 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-08 13:59:51 -0500 |
commit | c2945f390dbc725f3c3ef044a6a3f4e3909a7758 (patch) | |
tree | 6df6bc7572eef23b84e0f502af92aae6b56c9a03 /drivers/net/wireless/iwlwifi/iwl-trans-pcie.c | |
parent | 05f5b97ee0013fefbd9139cf8c3eda5f2a88c04a (diff) |
iwlwifi: print DMA stop timeout error only if it happened
iwl_poll_direct_bit() return negative error value on timeout,
positive values do not indicate an error.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-trans-pcie.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans-pcie.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c index 389f99e6a8eb..aced6f8ae1e9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie.c @@ -1211,7 +1211,7 @@ static void iwl_trans_pcie_fw_alive(struct iwl_trans *trans) */ static int iwl_trans_tx_stop(struct iwl_trans *trans) { - int ch, txq_id; + int ch, txq_id, ret; unsigned long flags; struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); @@ -1224,9 +1224,10 @@ static int iwl_trans_tx_stop(struct iwl_trans *trans) for (ch = 0; ch < FH_TCSR_CHNL_NUM; ch++) { iwl_write_direct32(trans, FH_TCSR_CHNL_TX_CONFIG_REG(ch), 0x0); - if (iwl_poll_direct_bit(trans, FH_TSSR_TX_STATUS_REG, + ret = iwl_poll_direct_bit(trans, FH_TSSR_TX_STATUS_REG, FH_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(ch), - 1000)) + 1000); + if (ret < 0) IWL_ERR(trans, "Failing on timeout while stopping" " DMA channel %d [0x%08x]", ch, iwl_read_direct32(trans, |