Skip to content

Commit

Permalink
USB: ehci-dbg: fix reading less content of periodic file
Browse files Browse the repository at this point in the history
This patch fix 2 problems about reading periodic file:

1. The "..." after a interrupt qh is missed because buffer pointer is
   not moved.

2. After setting p.ptr as NULL, its next qh or itd will be omited and
   can't be stored in debug buffer.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Ming Lei authored and Greg Kroah-Hartman committed Oct 17, 2008
1 parent 3c04e20 commit 3c4bb71
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/usb/host/ehci-dbg.c
Original file line number Diff line number Diff line change
@@ -569,14 +569,16 @@ static ssize_t fill_periodic_buffer(struct debug_buffer *buf)
for (temp = 0; temp < seen_count; temp++) {
if (seen [temp].ptr != p.ptr)
continue;
if (p.qh->qh_next.ptr)
if (p.qh->qh_next.ptr) {
temp = scnprintf (next, size,
" ...");
p.ptr = NULL;
size -= temp;
next += temp;
}
break;
}
/* show more info the first time around */
if (temp == seen_count && p.ptr) {
if (temp == seen_count) {
u32 scratch = hc32_to_cpup(ehci,
&p.qh->hw_info1);
struct ehci_qtd *qtd;

0 comments on commit 3c4bb71

Please sign in to comment.