wifi: iwlwifi: mvm: expand queue sync warning messages
authorJohannes Berg <johannes.berg@intel.com>
Mon, 5 Feb 2024 19:21:01 +0000 (21:21 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 8 Feb 2024 14:00:47 +0000 (15:00 +0100)
It's a bit tricky to understand what's going on here, add
more data to the warning messages to make that clearer.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240205211151.1df82a509636.I2f71811569a5c48eb166c4caa779af2d6160ad33@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c

index 40e97e812f5f0fa23d1dd78242320cf195a2d5d5..3622f67588fe802342a9685f1fcaec64a4743350 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
 /*
- * Copyright (C) 2012-2014, 2018-2023 Intel Corporation
+ * Copyright (C) 2012-2014, 2018-2024 Intel Corporation
  * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
  * Copyright (C) 2016-2017 Intel Deutschland GmbH
  */
@@ -6097,8 +6097,9 @@ void iwl_mvm_sync_rx_queues_internal(struct iwl_mvm *mvm,
                                         iwl_mvm_is_radio_killed(mvm),
                                         HZ);
                WARN_ONCE(!ret && !iwl_mvm_is_radio_killed(mvm),
-                         "queue sync: failed to sync, state is 0x%lx\n",
-                         mvm->queue_sync_state);
+                         "queue sync: failed to sync, state is 0x%lx, cookie %d\n",
+                         mvm->queue_sync_state,
+                         mvm->queue_sync_cookie);
        }
 
 out:
index 67062fe40152bb22fce83543239f90e0eceeae34..7979b7952a79761ca5994231895ce1d9b12972a1 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
 /*
- * Copyright (C) 2012-2014, 2018-2023 Intel Corporation
+ * Copyright (C) 2012-2014, 2018-2024 Intel Corporation
  * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
  * Copyright (C) 2015-2017 Intel Deutschland GmbH
  */
@@ -688,11 +688,11 @@ void iwl_mvm_rx_queue_notif(struct iwl_mvm *mvm, struct napi_struct *napi,
                return;
        len -= sizeof(*notif) + sizeof(*internal_notif);
 
-       if (internal_notif->sync &&
-           mvm->queue_sync_cookie != internal_notif->cookie) {
-               WARN_ONCE(1, "Received expired RX queue sync message\n");
+       if (WARN_ONCE(internal_notif->sync &&
+                     mvm->queue_sync_cookie != internal_notif->cookie,
+                     "Received expired RX queue sync message (cookie %d but wanted %d, queue %d)\n",
+                     internal_notif->cookie, mvm->queue_sync_cookie, queue))
                return;
-       }
 
        switch (internal_notif->type) {
        case IWL_MVM_RXQ_EMPTY: