Skip to contentSkip to conversation

wifi: rtw88: suppress messages of failed to flush queue

PATCH Superseded Ping-Ke Shih 2 participants 3 messages Apr 17, 2024 – Apr 18, 2024 Realtek wireless driver (rtw88)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Ping-Ke Shih

author maintainer
#0 lore raw

PATCH 1/1 wifi: rtw88: suppress messages of failed to flush queue

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.

---
 drivers/net/wireless/realtek/rtw88/debug.h | 1 +
 drivers/net/wireless/realtek/rtw88/mac.c   | 3 ++-
 drivers/net/wireless/realtek/rtw88/pci.c   | 3 ++-
 3 files changed, 5 insertions(+), 2 deletions(-)
drivers/net/wireless/realtek/rtw88/debug.h +1 -0
index f20c0471c82a..eb69006c463e 100644
@@ -26,6 +26,7 @@ enum rtw_debug_mask {
 	RTW_DBG_STATE		= 0x00020000,
 	RTW_DBG_SDIO		= 0x00040000,
 
+	RTW_DBG_UNEXP		= 0x80000000,
 	RTW_DBG_ALL		= 0xffffffff
 };
 
drivers/net/wireless/realtek/rtw88/mac.c +2 -1
index 699ae3048c6b..1fa273012b9c 100644
@@ -1046,7 +1046,8 @@ static void __rtw_mac_flush_prio_queue(struct rtw_dev *rtwdev,
 	 * 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,
drivers/net/wireless/realtek/rtw88/pci.c +2 -1
index 9986a4cb37eb..7a093f3d5f74 100644
@@ -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,
Signature · 1 line
2.25.1
Acked-by on v1 1/1
#1 lore raw

Thanks, I tested it for 30 minutes and didn't receive any superfluous warning message. Only thing I could find was the comment above not reflecting the (new) debug print (but very nit-picky from me).

drivers/net/wireless/realtek/rtw88/mac.c +1 -1
index 9038e2311596..3d1a886262d8 100644
@@ -1026,7 +1026,7 @@ 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.
author maintainer
#2 lore raw
Quoted 4 lines · Lewis Robbins

Thanks, I tested it for 30 minutes and didn't receive any superfluous warning message. Only thing I could find was the comment above not reflecting the (new) debug print (but very nit-picky from me).

Acked-by is used by maintainers, so I used your Tested-by by v2. [1]

drivers/net/wireless/realtek/rtw88/mac.c static void __rtw_mac_flush_prio_queue(struct rtw_dev *rtwdev, · line 1029

Quoted 11 lines
drivers/net/wireless/realtek/rtw88/mac.c +1 -1
index 9038e2311596..3d1a886262d8 100644
@@ -1026,7 +1026,7 @@ 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

Thanks for pointing this.

drivers/net/wireless/realtek/rtw88/mac.c static void __rtw_mac_flush_prio_queue(struct rtw_dev *rtwdev, · line 1032

Quoted 3 lines
drivers/net/wireless/realtek/rtw88/mac.c +0 -0
         *
         * 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.

[1] https://lore.kernel.org/linux-wireless/[email protected]/T/#u