Skip to content

Commit e6ce680

Browse files
P33Mpopcornmix
authored andcommitted
dwc_otg: pay attention to qh->interval when rescheduling periodic queues
A regression introduced in #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 <[email protected]>
1 parent 8bf08cd commit e6ce680

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ int dwc_otg_hcd_qh_add(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh)
691691
} else {
692692
/* If the QH wasn't in a schedule, then sched_frame is stale. */
693693
qh->sched_frame = dwc_frame_num_inc(dwc_otg_hcd_get_frame_number(hcd),
694-
SCHEDULE_SLOP);
694+
max_t(uint32_t, qh->interval, SCHEDULE_SLOP));
695695
status = schedule_periodic(hcd, qh);
696696
qh->start_split_frame = qh->sched_frame;
697697
if ( !hcd->periodic_qh_count ) {

0 commit comments

Comments
 (0)