>From f427adde54945870d94059c46fefb7f0e4a07c37 Mon Sep 17 00:00:00 2001 From: Alek Du <alek.du@xxxxxxxxx> Date: Fri, 26 Jun 2009 16:04:50 +0800 Subject: [PATCH] EHCI: split ehci_qh - ehci-dbg.c changes Most changes for debug outputs... Signed-off-by: Alek Du <alek.du@xxxxxxxxx> --- drivers/usb/host/ehci-dbg.c | 39 ++++++++++++++++++++------------------- 1 files changed, 20 insertions(+), 19 deletions(-) diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c index 7f4ace7..c9eca0d 100644 --- a/drivers/usb/host/ehci-dbg.c +++ b/drivers/usb/host/ehci-dbg.c @@ -135,9 +135,9 @@ static void __maybe_unused dbg_qh (const char *label, struct ehci_hcd *ehci, struct ehci_qh *qh) { ehci_dbg (ehci, "%s qh %p n%08x info %x %x qtd %x\n", label, - qh, qh->hw_next, qh->hw_info1, qh->hw_info2, - qh->hw_current); - dbg_qtd ("overlay", ehci, (struct ehci_qtd *) &qh->hw_qtd_next); + qh, HW(qh)->hw_next, HW(qh)->hw_info1, HW(qh)->hw_info2, + HW(qh)->hw_current); + dbg_qtd("overlay", ehci, (struct ehci_qtd *) &HW(qh)->hw_qtd_next); } static void __maybe_unused @@ -401,30 +401,30 @@ static void qh_lines ( char mark; __le32 list_end = EHCI_LIST_END(ehci); - if (qh->hw_qtd_next == list_end) /* NEC does this */ + if (HW(qh)->hw_qtd_next == list_end) /* NEC does this */ mark = '@'; else - mark = token_mark(ehci, qh->hw_token); + mark = token_mark(ehci, HW(qh)->hw_token); if (mark == '/') { /* qh_alt_next controls qh advance? */ - if ((qh->hw_alt_next & QTD_MASK(ehci)) - == ehci->async->hw_alt_next) + if ((HW(qh)->hw_alt_next & QTD_MASK(ehci)) + == HW(ehci->async)->hw_alt_next) mark = '#'; /* blocked */ - else if (qh->hw_alt_next == list_end) + else if (HW(qh)->hw_alt_next == list_end) mark = '.'; /* use hw_qtd_next */ /* else alt_next points to some other qtd */ } - scratch = hc32_to_cpup(ehci, &qh->hw_info1); - hw_curr = (mark == '*') ? hc32_to_cpup(ehci, &qh->hw_current) : 0; + scratch = hc32_to_cpup(ehci, &HW(qh)->hw_info1); + hw_curr = (mark == '*') ? hc32_to_cpup(ehci, &HW(qh)->hw_current) : 0; temp = scnprintf (next, size, "qh/%p dev%d %cs ep%d %08x %08x (%08x%c %s nak%d)", qh, scratch & 0x007f, speed_char (scratch), (scratch >> 8) & 0x000f, - scratch, hc32_to_cpup(ehci, &qh->hw_info2), - hc32_to_cpup(ehci, &qh->hw_token), mark, - (cpu_to_hc32(ehci, QTD_TOGGLE) & qh->hw_token) + scratch, hc32_to_cpup(ehci, &HW(qh)->hw_info2), + hc32_to_cpup(ehci, &HW(qh)->hw_token), mark, + (cpu_to_hc32(ehci, QTD_TOGGLE) & HW(qh)->hw_token) ? "data1" : "data0", - (hc32_to_cpup(ehci, &qh->hw_alt_next) >> 1) & 0x0f); + (hc32_to_cpup(ehci, &HW(qh)->hw_alt_next) >> 1) & 0x0f); size -= temp; next += temp; @@ -435,10 +435,10 @@ static void qh_lines ( mark = ' '; if (hw_curr == td->qtd_dma) mark = '*'; - else if (qh->hw_qtd_next == cpu_to_hc32(ehci, td->qtd_dma)) + else if (HW(qh)->hw_qtd_next == cpu_to_hc32(ehci, td->qtd_dma)) mark = '+'; else if (QTD_LENGTH (scratch)) { - if (td->hw_alt_next == ehci->async->hw_alt_next) + if (td->hw_alt_next == HW(ehci->async)->hw_alt_next) mark = '#'; else if (td->hw_alt_next != list_end) mark = '/'; @@ -555,7 +555,7 @@ static ssize_t fill_periodic_buffer(struct debug_buffer *buf) temp = scnprintf (next, size, " qh%d-%04x/%p", p.qh->period, hc32_to_cpup(ehci, - &p.qh->hw_info2) + &HW(p.qh)->hw_info2) /* uframe masks */ & (QH_CMASK | QH_SMASK), p.qh); @@ -576,7 +576,7 @@ static ssize_t fill_periodic_buffer(struct debug_buffer *buf) /* show more info the first time around */ if (temp == seen_count) { u32 scratch = hc32_to_cpup(ehci, - &p.qh->hw_info1); + &HW(p.qh)->hw_info1); struct ehci_qtd *qtd; char *type = ""; @@ -609,7 +609,8 @@ static ssize_t fill_periodic_buffer(struct debug_buffer *buf) } else temp = 0; if (p.qh) { - tag = Q_NEXT_TYPE(ehci, p.qh->hw_next); + tag = Q_NEXT_TYPE(ehci, + HW(p.qh)->hw_next); p = p.qh->qh_next; } break; -- 1.6.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html