mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 17:18:59 +00:00
20ea6adbf1
Build system: x86_64 Build-tested: bcm2708, bcm2709, bcm2710, bcm2711 Run-tested: bcm2708/RPiB+, bcm2709/RPi3B, bcm2710/RPi3B, bcm2711/RPi4B Signed-off-by: Marty Jones <mj8263788@gmail.com> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
30 lines
1.2 KiB
Diff
30 lines
1.2 KiB
Diff
From 4e27de0597024fd7070c04a1bf0af82f1be77191 Mon Sep 17 00:00:00 2001
|
|
From: Jonathan Bell <jonathan@raspberrypi.com>
|
|
Date: Wed, 6 Oct 2021 15:27:53 +0100
|
|
Subject: [PATCH] dwc_otg: pay attention to qh->interval when
|
|
rescheduling periodic queues
|
|
|
|
A regression introduced in https://github.com/raspberrypi/linux/pull/3887
|
|
meant that if the newly scheduled transfer immediately returned data, and
|
|
the driver resubmitted a single URB after every transfer, then the effective
|
|
polling interval would end up being approx 1ms.
|
|
|
|
Use the larger of SCHEDULE_SLOP or the configured endpoint interval.
|
|
|
|
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
|
|
---
|
|
drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c
|
|
+++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c
|
|
@@ -691,7 +691,7 @@ int dwc_otg_hcd_qh_add(dwc_otg_hcd_t * h
|
|
} else {
|
|
/* If the QH wasn't in a schedule, then sched_frame is stale. */
|
|
qh->sched_frame = dwc_frame_num_inc(dwc_otg_hcd_get_frame_number(hcd),
|
|
- SCHEDULE_SLOP);
|
|
+ max_t(uint32_t, qh->interval, SCHEDULE_SLOP));
|
|
status = schedule_periodic(hcd, qh);
|
|
qh->start_split_frame = qh->sched_frame;
|
|
if ( !hcd->periodic_qh_count ) {
|