Skip to content

Commit 3c4bb71

Browse files
ming1gregkh
authored andcommitted
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 <[email protected]> Acked-by: David Brownell <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 3c04e20 commit 3c4bb71

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

drivers/usb/host/ehci-dbg.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -569,14 +569,16 @@ static ssize_t fill_periodic_buffer(struct debug_buffer *buf)
569569
for (temp = 0; temp < seen_count; temp++) {
570570
if (seen [temp].ptr != p.ptr)
571571
continue;
572-
if (p.qh->qh_next.ptr)
572+
if (p.qh->qh_next.ptr) {
573573
temp = scnprintf (next, size,
574574
" ...");
575-
p.ptr = NULL;
575+
size -= temp;
576+
next += temp;
577+
}
576578
break;
577579
}
578580
/* show more info the first time around */
579-
if (temp == seen_count && p.ptr) {
581+
if (temp == seen_count) {
580582
u32 scratch = hc32_to_cpup(ehci,
581583
&p.qh->hw_info1);
582584
struct ehci_qtd *qtd;

0 commit comments

Comments
 (0)