]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
iwlwifi: pcie: add TPT oriented prints
authorSara Sharon <sara.sharon@intel.com>
Mon, 17 Dec 2018 09:39:42 +0000 (11:39 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Thu, 14 Feb 2019 09:29:42 +0000 (11:29 +0200)
Currently there is no way to debug RX/TX paths using prints
without harming tpt. Add prints to debug RX allocation path.
We can still get 1.9 gbps with those on.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/iwl-debug.h
drivers/net/wireless/intel/iwlwifi/pcie/rx.c

index a2af68a0d34bba4d190f189e38d445f420f163bd..655ff5694560a672ab0c58d2dd5c5a7bc5613164 100644 (file)
@@ -1,6 +1,7 @@
 /******************************************************************************
  *
  * Copyright(c) 2003 - 2014 Intel Corporation. All rights reserved.
+ * Copyright (C) 2018 Intel Corporation
  *
  * Portions of this file are derived from the ipw3945 project.
  *
@@ -159,7 +160,7 @@ do {                                                                \
 /* 0x000F0000 - 0x00010000 */
 #define IWL_DL_FW              0x00010000
 #define IWL_DL_RF_KILL         0x00020000
-#define IWL_DL_FW_ERRORS       0x00040000
+#define IWL_DL_TPT             0x00040000
 /* 0x00F00000 - 0x00100000 */
 #define IWL_DL_RATE            0x00100000
 #define IWL_DL_CALIB           0x00200000
@@ -193,7 +194,6 @@ do {                                                                \
 #define IWL_DEBUG_CALIB(p, f, a...)    IWL_DEBUG(p, IWL_DL_CALIB, f, ## a)
 #define IWL_DEBUG_FW(p, f, a...)       IWL_DEBUG(p, IWL_DL_FW, f, ## a)
 #define IWL_DEBUG_RF_KILL(p, f, a...)  IWL_DEBUG(p, IWL_DL_RF_KILL, f, ## a)
-#define IWL_DEBUG_FW_ERRORS(p, f, a...)        IWL_DEBUG(p, IWL_DL_FW_ERRORS, f, ## a)
 #define IWL_DEBUG_DROP(p, f, a...)     IWL_DEBUG(p, IWL_DL_DROP, f, ## a)
 #define IWL_DEBUG_DROP_LIMIT(p, f, a...)       \
                IWL_DEBUG_LIMIT(p, IWL_DL_DROP, f, ## a)
@@ -215,6 +215,7 @@ do {                                                                \
 #define IWL_DEBUG_DEV_RADIO(p, f, a...)        IWL_DEBUG_DEV(p, IWL_DL_RADIO, f, ## a)
 #define IWL_DEBUG_POWER(p, f, a...)    IWL_DEBUG(p, IWL_DL_POWER, f, ## a)
 #define IWL_DEBUG_11H(p, f, a...)      IWL_DEBUG(p, IWL_DL_11H, f, ## a)
+#define IWL_DEBUG_TPT(p, f, a...)      IWL_DEBUG(p, IWL_DL_TPT, f, ## a)
 #define IWL_DEBUG_RPM(p, f, a...)      IWL_DEBUG(p, IWL_DL_RPM, f, ## a)
 #define IWL_DEBUG_LAR(p, f, a...)      IWL_DEBUG(p, IWL_DL_LAR, f, ## a)
 
index 36cbfed409d0a72deded33532ae0522b3c0997aa..49c2ce549c86669c1d5c3a5358539b22f02c78fd 100644 (file)
@@ -540,7 +540,7 @@ static void iwl_pcie_rx_allocator(struct iwl_trans *trans)
        struct list_head local_empty;
        int pending = atomic_read(&rba->req_pending);
 
-       IWL_DEBUG_RX(trans, "Pending allocation requests = %d\n", pending);
+       IWL_DEBUG_TPT(trans, "Pending allocation requests = %d\n", pending);
 
        /* If we were scheduled - there is at least one request */
        spin_lock(&rba->lock);
@@ -598,9 +598,10 @@ static void iwl_pcie_rx_allocator(struct iwl_trans *trans)
 
                if (!pending) {
                        pending = atomic_read(&rba->req_pending);
-                       IWL_DEBUG_RX(trans,
-                                    "Got more pending allocation requests = %d\n",
-                                    pending);
+                       if (pending)
+                               IWL_DEBUG_TPT(trans,
+                                             "Got more pending allocation requests = %d\n",
+                                             pending);
                }
 
                spin_lock(&rba->lock);
@@ -619,7 +620,7 @@ static void iwl_pcie_rx_allocator(struct iwl_trans *trans)
        list_splice_tail(&local_empty, &rba->rbd_empty);
        spin_unlock(&rba->lock);
 
-       IWL_DEBUG_RX(trans, "%s, exit.\n", __func__);
+       IWL_DEBUG_TPT(trans, "%s, exit.\n", __func__);
 }
 
 /*
@@ -1429,6 +1430,9 @@ static void iwl_pcie_rx_handle(struct iwl_trans *trans, int queue)
                             !emergency)) {
                        iwl_pcie_rx_move_to_allocator(rxq, rba);
                        emergency = true;
+                       IWL_DEBUG_TPT(trans,
+                                     "RX path is in emergency. Pending allocations %d\n",
+                                     rb_pending_alloc);
                }
 
                IWL_DEBUG_RX(trans, "Q %d: HW = %d, SW = %d\n", rxq->id, r, i);
@@ -1458,8 +1462,12 @@ static void iwl_pcie_rx_handle(struct iwl_trans *trans, int queue)
                        count++;
                        if (count == 8) {
                                count = 0;
-                               if (rb_pending_alloc < rxq->queue_size / 3)
+                               if (rb_pending_alloc < rxq->queue_size / 3) {
+                                       IWL_DEBUG_TPT(trans,
+                                                     "RX path exited emergency. Pending allocations %d\n",
+                                                     rb_pending_alloc);
                                        emergency = false;
+                               }
 
                                rxq->read = i;
                                spin_unlock(&rxq->lock);