linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] wifi: rtw88: suppress messages of failed to flush queue
@ 2024-04-18  0:29 Ping-Ke Shih
  2024-04-22  1:37 ` Ping-Ke Shih
  0 siblings, 1 reply; 2+ messages in thread
From: Ping-Ke Shih @ 2024-04-18  0:29 UTC (permalink / raw)
  To: linux-wireless; +Cc: lewis.robbins2

Driver throws messages when scanning with a lot of traffic, because packets
in TX buffer can not be transmitted in time. Since this is a common
occurrence, change them to debug message with special debug mask that
developers can turn on this mask by default for further analysis.

Cc: Lewis Robbins <lewis.robbins2@gmail.com>
Tested-by: Lewis Robbins <lewis.robbins2@gmail.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
v2: modify comment along with changes
---
 drivers/net/wireless/realtek/rtw88/debug.h | 1 +
 drivers/net/wireless/realtek/rtw88/mac.c   | 5 +++--
 drivers/net/wireless/realtek/rtw88/pci.c   | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtw88/debug.h b/drivers/net/wireless/realtek/rtw88/debug.h
index f20c0471c82a..eb69006c463e 100644
--- a/drivers/net/wireless/realtek/rtw88/debug.h
+++ b/drivers/net/wireless/realtek/rtw88/debug.h
@@ -26,6 +26,7 @@ enum rtw_debug_mask {
 	RTW_DBG_STATE		= 0x00020000,
 	RTW_DBG_SDIO		= 0x00040000,
 
+	RTW_DBG_UNEXP		= 0x80000000,
 	RTW_DBG_ALL		= 0xffffffff
 };
 
diff --git a/drivers/net/wireless/realtek/rtw88/mac.c b/drivers/net/wireless/realtek/rtw88/mac.c
index 699ae3048c6b..0dba8aae7716 100644
--- a/drivers/net/wireless/realtek/rtw88/mac.c
+++ b/drivers/net/wireless/realtek/rtw88/mac.c
@@ -1039,14 +1039,15 @@ static void __rtw_mac_flush_prio_queue(struct rtw_dev *rtwdev,
 		msleep(20);
 	}
 
-	/* priority queue is still not empty, throw a warning,
+	/* priority queue is still not empty, throw a debug message
 	 *
 	 * Note that if we want to flush the tx queue when having a lot of
 	 * traffic (ex, 100Mbps up), some of the packets could be dropped.
 	 * And it requires like ~2secs to flush the full priority queue.
 	 */
 	if (!drop)
-		rtw_warn(rtwdev, "timed out to flush queue %d\n", prio_queue);
+		rtw_dbg(rtwdev, RTW_DBG_UNEXP,
+			"timed out to flush queue %d\n", prio_queue);
 }
 
 static void rtw_mac_flush_prio_queues(struct rtw_dev *rtwdev,
diff --git a/drivers/net/wireless/realtek/rtw88/pci.c b/drivers/net/wireless/realtek/rtw88/pci.c
index 9986a4cb37eb..7a093f3d5f74 100644
--- a/drivers/net/wireless/realtek/rtw88/pci.c
+++ b/drivers/net/wireless/realtek/rtw88/pci.c
@@ -729,7 +729,8 @@ static void __pci_flush_queue(struct rtw_dev *rtwdev, u8 pci_q, bool drop)
 	}
 
 	if (!drop)
-		rtw_warn(rtwdev, "timed out to flush pci tx ring[%d]\n", pci_q);
+		rtw_dbg(rtwdev, RTW_DBG_UNEXP,
+			"timed out to flush pci tx ring[%d]\n", pci_q);
 }
 
 static void __rtw_pci_flush_queues(struct rtw_dev *rtwdev, u32 pci_queues,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] wifi: rtw88: suppress messages of failed to flush queue
  2024-04-18  0:29 [PATCH v2] wifi: rtw88: suppress messages of failed to flush queue Ping-Ke Shih
@ 2024-04-22  1:37 ` Ping-Ke Shih
  0 siblings, 0 replies; 2+ messages in thread
From: Ping-Ke Shih @ 2024-04-22  1:37 UTC (permalink / raw)
  To: Ping-Ke Shih, linux-wireless; +Cc: lewis.robbins2

Ping-Ke Shih <pkshih@realtek.com> wrote:

> Driver throws messages when scanning with a lot of traffic, because packets
> in TX buffer can not be transmitted in time. Since this is a common
> occurrence, change them to debug message with special debug mask that
> developers can turn on this mask by default for further analysis.
> 
> Cc: Lewis Robbins <lewis.robbins2@gmail.com>
> Tested-by: Lewis Robbins <lewis.robbins2@gmail.com>
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>

1 patch(es) applied to rtw-next branch of rtw.git, thanks.

8cb090b70068 wifi: rtw88: suppress messages of failed to flush queue

---
https://github.com/pkshih/rtw.git


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-22  1:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-18  0:29 [PATCH v2] wifi: rtw88: suppress messages of failed to flush queue Ping-Ke Shih
2024-04-22  1:37 ` Ping-Ke Shih

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).