8b84b3c
Polling TX statuses too frequently has two negative effects. First is
8b84b3c
randomly peek CPU usage, causing overall system functioning delays.
8b84b3c
Second bad effect is that device is not able to fill TX statuses in
8b84b3c
H/W register on some workloads and we get lot of timeouts like below:
8b84b3c
8b84b3c
ieee80211 phy4: rt2800usb_entry_txstatus_timeout: Warning - TX status timeout for entry 7 in queue 2
8b84b3c
ieee80211 phy4: rt2800usb_entry_txstatus_timeout: Warning - TX status timeout for entry 7 in queue 2
8b84b3c
ieee80211 phy4: rt2800usb_txdone: Warning - Got TX status for an empty queue 2, dropping
8b84b3c
8b84b3c
This not only cause flood of messages in dmesg, but also bad throughput,
8b84b3c
since rate scaling algorithm can not work optimally.
8b84b3c
8b84b3c
In the future, we should probably make polling interval be adjusted
8b84b3c
automatically, but for now just increase values, this make mentioned
8b84b3c
problems gone.
8b84b3c
8b84b3c
Resolve:
8b84b3c
https://bugzilla.kernel.org/show_bug.cgi?id=62781
8b84b3c
8b84b3c
Cc: stable@vger.kernel.org
8b84b3c
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
8b84b3c
---
8b84b3c
 drivers/net/wireless/rt2x00/rt2800usb.c | 8 ++++----
8b84b3c
 1 file changed, 4 insertions(+), 4 deletions(-)
8b84b3c
8b84b3c
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
8b84b3c
index 96677ce5..e095e61 100644
8b84b3c
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
8b84b3c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
8b84b3c
@@ -176,8 +176,8 @@ static bool rt2800usb_tx_sta_fifo_read_completed(struct rt2x00_dev *rt2x00dev,
8b84b3c
 		queue_work(rt2x00dev->workqueue, &rt2x00dev->txdone_work);
8b84b3c
 
8b84b3c
 	if (rt2800usb_txstatus_pending(rt2x00dev)) {
8b84b3c
-		/* Read register after 250 us */
8b84b3c
-		hrtimer_start(&rt2x00dev->txstatus_timer, ktime_set(0, 250000),
8b84b3c
+		/* Read register after 1 ms */
8b84b3c
+		hrtimer_start(&rt2x00dev->txstatus_timer, ktime_set(0, 1000000),
8b84b3c
 			      HRTIMER_MODE_REL);
8b84b3c
 		return false;
8b84b3c
 	}
8b84b3c
@@ -202,8 +202,8 @@ static void rt2800usb_async_read_tx_status(struct rt2x00_dev *rt2x00dev)
8b84b3c
 	if (test_and_set_bit(TX_STATUS_READING, &rt2x00dev->flags))
8b84b3c
 		return;
8b84b3c
 
8b84b3c
-	/* Read TX_STA_FIFO register after 500 us */
8b84b3c
-	hrtimer_start(&rt2x00dev->txstatus_timer, ktime_set(0, 500000),
8b84b3c
+	/* Read TX_STA_FIFO register after 2 ms */
8b84b3c
+	hrtimer_start(&rt2x00dev->txstatus_timer, ktime_set(0, 2000000),
8b84b3c
 		      HRTIMER_MODE_REL);
8b84b3c
 }
8b84b3c
 
8b84b3c
-- 
8b84b3c
1.8.3.1