libpayload: Handle errors in UHCI interrupt queues

If somethings goes wrong during an interrupt transfer, drop the
transfer.

Change-Id: I450c08a7a0bf23fbee74237e0355d4a726ace114
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: http://review.coreboot.org/1901
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Tested-by: build bot (Jenkins)
This commit is contained in:
Nico Huber 2012-11-22 11:12:13 +01:00 committed by Patrick Georgi
parent 8c4d2f36a3
commit be58fee28e
1 changed files with 2 additions and 2 deletions

View File

@ -572,7 +572,6 @@ uhci_poll_intr_queue (void *q_)
{
intr_q *q = (intr_q*)q_;
if ((q->tds[q->lastread].ctrlsts & TD_STATUS_ACTIVE) == 0) {
/* FIXME: handle errors */
int current = q->lastread;
int previous;
if (q->lastread == 0) {
@ -588,6 +587,7 @@ uhci_poll_intr_queue (void *q_)
}
q->tds[previous].ctrlsts |= TD_STATUS_ACTIVE;
q->lastread = (q->lastread + 1) % q->total;
if (!(q->tds[current].ctrlsts & TD_STATUS_MASK))
return &q->data[current*q->reqsize];
}
/* reset queue if we fully processed it after underrun */