提交 3c4bb71f 编写于 作者: M Ming Lei 提交者: Greg Kroah-Hartman

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: NMing Lei <tom.leiming@gmail.com>
Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 3c04e20e
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册