[PATCH] UHCI: store the period in the queue header
This patch (as689) stores the period for periodic transfers (interrupt and ISO) in the queue header. This is necessary for proper bandwidth tracking (not yet implemented). It also makes the scheduling of ISO transfers a bit more rigorous, with checks for out-of-bounds frame numbers. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
10b8e47d6b
commit
caf3827a65
@@ -153,7 +153,7 @@ static int uhci_show_qh(struct uhci_qh *qh, char *buf, int len, int space)
|
||||
char *qtype;
|
||||
|
||||
/* Try to make sure there's enough memory */
|
||||
if (len < 80 * 6)
|
||||
if (len < 80 * 7)
|
||||
return 0;
|
||||
|
||||
switch (qh->type) {
|
||||
@@ -167,6 +167,9 @@ static int uhci_show_qh(struct uhci_qh *qh, char *buf, int len, int space)
|
||||
out += sprintf(out, "%*s[%p] %s QH link (%08x) element (%08x)\n",
|
||||
space, "", qh, qtype,
|
||||
le32_to_cpu(qh->link), le32_to_cpu(element));
|
||||
if (qh->type == USB_ENDPOINT_XFER_ISOC)
|
||||
out += sprintf(out, "%*s period %d\n",
|
||||
space, "", qh->period);
|
||||
|
||||
if (element & UHCI_PTR_QH)
|
||||
out += sprintf(out, "%*s Element points to QH (bug?)\n", space, "");
|
||||
|
Reference in New Issue
Block a user