summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2011-10-10 07:26:46 -0700
committerJohn W. Linville <linville@tuxdriver.com>2011-10-14 14:48:08 -0400
commitd10630aff7e40d97c8c8be91408d5f2433b12603 (patch)
tree680f99bd84ff11892ea69ce3ec2b3936ed982984
parent722c9930f209dc428c1e568bd2c0f4cbd3b30dbd (diff)
downloadlinux-3.10-d10630aff7e40d97c8c8be91408d5f2433b12603.tar.gz
linux-3.10-d10630aff7e40d97c8c8be91408d5f2433b12603.tar.bz2
linux-3.10-d10630aff7e40d97c8c8be91408d5f2433b12603.zip
iwlagn: add cmd queue pointer info when timeout
When detect cmd queue time out, display the current read/write pointer Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c
index ee7059dcbbc..f57b868c405 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c
@@ -1013,11 +1013,20 @@ static int iwl_send_cmd_sync(struct iwl_trans *trans, struct iwl_host_cmd *cmd)
HOST_COMPLETE_TIMEOUT);
if (!ret) {
if (test_bit(STATUS_HCMD_ACTIVE, &trans->shrd->status)) {
+ struct iwl_priv *priv = priv(trans);
+ struct iwl_tx_queue *txq =
+ &trans_pcie->txq[priv->shrd->cmd_queue];
+ struct iwl_queue *q = &txq->q;
+
IWL_ERR(trans,
"Error sending %s: time out after %dms.\n",
get_cmd_string(cmd->id),
jiffies_to_msecs(HOST_COMPLETE_TIMEOUT));
+ IWL_ERR(trans,
+ "Current CMD queue read_ptr %d write_ptr %d\n",
+ q->read_ptr, q->write_ptr);
+
clear_bit(STATUS_HCMD_ACTIVE, &trans->shrd->status);
IWL_DEBUG_INFO(trans, "Clearing HCMD_ACTIVE for command"
"%s\n", get_cmd_string(cmd->id));