uhci-debug.c (5a84d159061d914c8dd4aa372ac6e9529c2be453) uhci-debug.c (28b9325e6ae45ffb5e99fedcafe00f25fcaacf06)
1/*
2 * UHCI-specific debugging code. Invaluable when something
3 * goes wrong, but don't get in my face.
4 *
5 * Kernel visible pointers are surrounded in []s and bus
6 * visible pointers are surrounded in ()s
7 *
8 * (C) Copyright 1999 Linus Torvalds

--- 182 unchanged lines hidden (view full) ---

191 if (list_empty(&qh->queue)) {
192 out += sprintf(out, "%*s queue is empty\n", space, "");
193 } else {
194 struct urb_priv *urbp = list_entry(qh->queue.next,
195 struct urb_priv, node);
196 struct uhci_td *td = list_entry(urbp->td_list.next,
197 struct uhci_td, list);
198
1/*
2 * UHCI-specific debugging code. Invaluable when something
3 * goes wrong, but don't get in my face.
4 *
5 * Kernel visible pointers are surrounded in []s and bus
6 * visible pointers are surrounded in ()s
7 *
8 * (C) Copyright 1999 Linus Torvalds

--- 182 unchanged lines hidden (view full) ---

191 if (list_empty(&qh->queue)) {
192 out += sprintf(out, "%*s queue is empty\n", space, "");
193 } else {
194 struct urb_priv *urbp = list_entry(qh->queue.next,
195 struct urb_priv, node);
196 struct uhci_td *td = list_entry(urbp->td_list.next,
197 struct uhci_td, list);
198
199 if (cpu_to_le32(td->dma_handle) != (element & ~UHCI_PTR_BITS))
199 if (element != LINK_TO_TD(td))
200 out += sprintf(out, "%*s Element != First TD\n",
201 space, "");
202 i = nurbs = 0;
203 list_for_each_entry(urbp, &qh->queue, node) {
204 if (++i <= 10)
205 out += uhci_show_urbp(urbp, out,
206 len - (out - buf), space + 2);
207 else

--- 180 unchanged lines hidden (view full) ---

388 j = 1;
389 }
390
391 head = &td->fl_list;
392 tmp = head;
393 do {
394 td = list_entry(tmp, struct uhci_td, fl_list);
395 tmp = tmp->next;
200 out += sprintf(out, "%*s Element != First TD\n",
201 space, "");
202 i = nurbs = 0;
203 list_for_each_entry(urbp, &qh->queue, node) {
204 if (++i <= 10)
205 out += uhci_show_urbp(urbp, out,
206 len - (out - buf), space + 2);
207 else

--- 180 unchanged lines hidden (view full) ---

388 j = 1;
389 }
390
391 head = &td->fl_list;
392 tmp = head;
393 do {
394 td = list_entry(tmp, struct uhci_td, fl_list);
395 tmp = tmp->next;
396 if (cpu_to_le32(td->dma_handle) != link) {
396 if (link != LINK_TO_TD(td)) {
397 if (nframes > 0)
398 out += sprintf(out, " link does "
399 "not match list entry!\n");
400 else
401 ++nerrs;
402 }
403 if (nframes > 0)
404 out += uhci_show_td(td, out,

--- 30 unchanged lines hidden (view full) ---

435 out += sprintf(out, "- %s\n", qh_names[i]); \
436 out += uhci_show_qh(qh, out, len - (out - buf), 4);
437
438 /* Last QH is the Terminating QH, it's different */
439 if (i == UHCI_NUM_SKELQH - 1) {
440 if (qh->link != UHCI_PTR_TERM)
441 out += sprintf(out, " bandwidth reclamation on!\n");
442
397 if (nframes > 0)
398 out += sprintf(out, " link does "
399 "not match list entry!\n");
400 else
401 ++nerrs;
402 }
403 if (nframes > 0)
404 out += uhci_show_td(td, out,

--- 30 unchanged lines hidden (view full) ---

435 out += sprintf(out, "- %s\n", qh_names[i]); \
436 out += uhci_show_qh(qh, out, len - (out - buf), 4);
437
438 /* Last QH is the Terminating QH, it's different */
439 if (i == UHCI_NUM_SKELQH - 1) {
440 if (qh->link != UHCI_PTR_TERM)
441 out += sprintf(out, " bandwidth reclamation on!\n");
442
443 if (qh_element(qh) != cpu_to_le32(uhci->term_td->dma_handle))
443 if (qh_element(qh) != LINK_TO_TD(uhci->term_td))
444 out += sprintf(out, " skel_term_qh element is not set to term_td!\n");
445
446 continue;
447 }
448
449 j = (i < 9) ? 9 : i+1; /* Next skeleton */
450 head = &qh->node;
451 tmp = head->next;

--- 4 unchanged lines hidden (view full) ---

456 if (++cnt <= 10)
457 out += uhci_show_qh(qh, out,
458 len - (out - buf), 4);
459 }
460 if ((cnt -= 10) > 0)
461 out += sprintf(out, " Skipped %d QHs\n", cnt);
462
463 if (i > 1 && i < UHCI_NUM_SKELQH - 1) {
444 out += sprintf(out, " skel_term_qh element is not set to term_td!\n");
445
446 continue;
447 }
448
449 j = (i < 9) ? 9 : i+1; /* Next skeleton */
450 head = &qh->node;
451 tmp = head->next;

--- 4 unchanged lines hidden (view full) ---

456 if (++cnt <= 10)
457 out += uhci_show_qh(qh, out,
458 len - (out - buf), 4);
459 }
460 if ((cnt -= 10) > 0)
461 out += sprintf(out, " Skipped %d QHs\n", cnt);
462
463 if (i > 1 && i < UHCI_NUM_SKELQH - 1) {
464 if (qh->link !=
465 (cpu_to_le32(uhci->skelqh[j]->dma_handle) | UHCI_PTR_QH))
464 if (qh->link != LINK_TO_QH(uhci->skelqh[j]))
466 out += sprintf(out, " last QH not linked to next skeleton!\n");
467 }
468 }
469
470 return out - buf;
471}
472
473#ifdef CONFIG_DEBUG_FS

--- 110 unchanged lines hidden ---
465 out += sprintf(out, " last QH not linked to next skeleton!\n");
466 }
467 }
468
469 return out - buf;
470}
471
472#ifdef CONFIG_DEBUG_FS

--- 110 unchanged lines hidden ---