[coreboot] New patch to review for coreboot: 3c35827 libpayload: Handle underruns in UHCI interrupt queues

Nico Huber (nico.huber@secunet.com) gerrit at coreboot.org
Fri Nov 23 15:01:00 CET 2012

Nico Huber (nico.huber at secunet.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1898


commit 3c35827c65b42886da678eb7db219b0f153b51f9
Author: Nico Huber <nico.huber at secunet.com>
Date:   Tue Nov 20 17:49:00 2012 +0100

    libpayload: Handle underruns in UHCI interrupt queues
    If usb_poll() isn't called fast enough, the UHCI controller marks an
    underrun interrupt queue as done (terminating the queue at the head).
    We can recover from this situation, when usb_poll() gets called again,
    and the queue is processed.
    Change-Id: Id56c9df44d6dbd53cd30ad89dfb5bf5977799829
    Signed-off-by: Nico Huber <nico.huber at secunet.com>
 payloads/libpayload/drivers/usb/uhci.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/payloads/libpayload/drivers/usb/uhci.c b/payloads/libpayload/drivers/usb/uhci.c
index bfa53f6..386392b 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;

More information about the coreboot mailing list