summaryrefslogtreecommitdiff
path: root/payloads/libpayload/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/drivers')
-rw-r--r--payloads/libpayload/drivers/usb/uhci.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/payloads/libpayload/drivers/usb/uhci.c b/payloads/libpayload/drivers/usb/uhci.c
index bfa53f6049..386392b53f 100644
--- a/payloads/libpayload/drivers/usb/uhci.c
+++ b/payloads/libpayload/drivers/usb/uhci.c
@@ -590,6 +590,11 @@ uhci_poll_intr_queue (void *q_)
q->lastread = (q->lastread + 1) % q->total;
return &q->data[current*q->reqsize];
}
+ /* reset queue if we fully processed it after underrun */
+ else if (q->qh->elementlinkptr & FLISTP_TERMINATE) {
+ usb_debug("resetting underrun uhci interrupt queue.\n");
+ q->qh->elementlinkptr = virt_to_phys(q->tds + q->lastread);
+ }
return NULL;
}