Commit 359e9557 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[PATCH] USB: ehci-hcd, show microframe schedules

This updates the ehci periodic schedule dumping code to be
more useful when displaying the interrupt transfer tree:

  - includes start/complete split frame mask in QH
  - gets rid of some needless output (more terse)
  - shows whether IN or OUT tds are queued, and how many

The microframe info isn't yet very interesting, but it's
helpful when a microframe scheduler is in use.  (Which will
be a patch some other time!)
parent aec17e82
......@@ -476,29 +476,54 @@ show_periodic (struct class_device *class_dev, char *buf)
do {
switch (tag) {
case Q_TYPE_QH:
temp = snprintf (next, size, " qh%d/%p",
p.qh->period, p.qh);
temp = snprintf (next, size, " qh%d-%04x/%p",
p.qh->period,
le32_to_cpup (&p.qh->hw_info2)
/* uframe masks */
& 0xffff,
p.qh);
size -= temp;
next += temp;
/* don't repeat what follows this qh */
for (temp = 0; temp < seen_count; temp++) {
if (seen [temp].ptr == p.ptr)
break;
if (seen [temp].ptr != p.ptr)
continue;
if (p.qh->qh_next.ptr)
temp = snprintf (next, size,
" ...");
p.ptr = 0;
break;
}
/* show more info the first time around */
if (temp == seen_count) {
u32 scratch = cpu_to_le32p (
&p.qh->hw_info1);
struct ehci_qtd *qtd;
char *type = "";
/* count tds, get ep direction */
temp = 0;
list_for_each_entry (qtd,
&p.qh->qtd_list,
qtd_list) {
temp++;
switch (0x03 & (le32_to_cpu (
qtd->hw_token) >> 8)) {
case 0: type = "out"; continue;
case 1: type = "in"; continue;
}
}
temp = snprintf (next, size,
" (%cs dev%d ep%d [%d/%d] %d)",
" (%c%d ep%d%s "
"[%d/%d] q%d p%d)",
speed_char (scratch),
scratch & 0x007f,
(scratch >> 8) & 0x000f,
(scratch >> 8) & 0x000f, type,
p.qh->usecs, p.qh->c_usecs,
temp,
0x7ff & (scratch >> 16));
/* FIXME TD info too */
if (seen_count < DBG_SCHED_LIMIT)
seen [seen_count++].qh = p.qh;
} else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment