Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Possible fix for USB packets going missing. Thank gsh

  • Loading branch information...
commit 7e7695894e9e86490558b92af0d8bebdfaadcfed 1 parent f958199
@popcornmix popcornmix authored
Showing with 15 additions and 6 deletions.
  1. +15 −6 drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c
View
21 drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c
@@ -282,12 +282,21 @@ int32_t dwc_otg_hcd_handle_sof_intr(dwc_otg_hcd_t * hcd)
qh = DWC_LIST_ENTRY(qh_entry, dwc_otg_qh_t, qh_list_entry);
qh_entry = qh_entry->next;
if (dwc_frame_num_le(qh->sched_frame, hcd->frame_number)) {
- /*
- * Move QH to the ready list to be executed next
- * (micro)frame.
- */
- DWC_LIST_MOVE_HEAD(&hcd->periodic_sched_ready,
- &qh->qh_list_entry);
+
+ if(qh->do_split && qh->sched_frame != hcd->frame_number)
+ {
+ // If we're late we may have missed the beginning of the frame
+ qh->sched_frame += qh->interval;
+ }
+ else
+ {
+ /*
+ * Move QH to the ready list to be executed next
+ * (micro)frame.
+ */
+ DWC_LIST_MOVE_HEAD(&hcd->periodic_sched_ready,
+ &qh->qh_list_entry);
+ }
}
}
tr_type = dwc_otg_hcd_select_transactions(hcd);

3 comments on commit 7e76958

@NickBT

Is there a missing .h from the commit by any chance?. I just did a git pull and dwc_otg_intr.c fails to compile with dwc_otg_hcd_t has no member 'non_periodic_channels' (line 926)

@popcornmix
Owner

You can see the change above - it doesn't cause the error you are seeing. Are you using standard bcmrpi_defconfig?
Can you check out a clean tree and try again?

@NickBT
Please sign in to comment.
Something went wrong with that request. Please try again.