diff options
author | Ming Lei <tom.leiming@gmail.com> | 2008-09-18 23:06:38 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-10-17 14:40:57 -0700 |
commit | 3c4bb71f96c69ef3c81fda108c96b633a2000de2 (patch) | |
tree | 6dcbb788842eb1cc71f99748ca76a0a95139c0f5 /drivers/usb | |
parent | 3c04e20ea95f9a8555456000e0ff340bdc46dea8 (diff) |
USB: ehci-dbg: fix reading less content of periodic file
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/ehci-dbg.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c index 9534ff3f5e7..5d57773e730 100644 --- a/drivers/usb/host/ehci-dbg.c +++ b/drivers/usb/host/ehci-dbg.c @@ -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; |