diff options
author | Ming Lei <tom.leiming@gmail.com> | 2008-09-18 11:06:38 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-10-17 17:40:57 -0400 |
commit | 3c4bb71f96c69ef3c81fda108c96b633a2000de2 (patch) | |
tree | 6dcbb788842eb1cc71f99748ca76a0a95139c0f5 /drivers/usb/host/ehci-dbg.c | |
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/host/ehci-dbg.c')
-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 9534ff3f5e7b..5d57773e730e 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) | |||
569 | for (temp = 0; temp < seen_count; temp++) { | 569 | for (temp = 0; temp < seen_count; temp++) { |
570 | if (seen [temp].ptr != p.ptr) | 570 | if (seen [temp].ptr != p.ptr) |
571 | continue; | 571 | continue; |
572 | if (p.qh->qh_next.ptr) | 572 | if (p.qh->qh_next.ptr) { |
573 | temp = scnprintf (next, size, | 573 | temp = scnprintf (next, size, |
574 | " ..."); | 574 | " ..."); |
575 | p.ptr = NULL; | 575 | size -= temp; |
576 | next += temp; | ||
577 | } | ||
576 | break; | 578 | break; |
577 | } | 579 | } |
578 | /* show more info the first time around */ | 580 | /* show more info the first time around */ |
579 | if (temp == seen_count && p.ptr) { | 581 | if (temp == seen_count) { |
580 | u32 scratch = hc32_to_cpup(ehci, | 582 | u32 scratch = hc32_to_cpup(ehci, |
581 | &p.qh->hw_info1); | 583 | &p.qh->hw_info1); |
582 | struct ehci_qtd *qtd; | 584 | struct ehci_qtd *qtd; |