From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
To: Matt Evans <matt@ozlabs.org>
Cc: linuxppc-dev@ozlabs.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH 2/5] xhci: Extend debug messages
Date: Mon, 28 Mar 2011 15:19:31 -0700 [thread overview]
Message-ID: <20110328221931.GC8065@xanatos> (raw)
In-Reply-To: <4D8C47BF.8010701@ozlabs.org>
On Fri, Mar 25, 2011 at 06:43:59PM +1100, Matt Evans wrote:
> Add more debug to print queued transfers, show control intentions and
> modify an existing message to hexify address output.
Are these new debug messages really necessary? I feel like the xHCI
driver has way too many debugging messages already. I'd like to switch
it over to the event tracer infrastructure eventually, and every new
debug message makes that work harder to do...
The queue_trb debug message is going to be especially noticeable, since
it will be triggered on every URB submission (sometimes more than once
per URB).
Sarah Sharp
> Signed-off-by: Matt Evans <matt@ozlabs.org>
> ---
> drivers/usb/host/xhci-dbg.c | 2 +-
> drivers/usb/host/xhci-hub.c | 3 +++
> drivers/usb/host/xhci-ring.c | 5 +++++
> 3 files changed, 9 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c
> index 2e04861..905f3bf 100644
> --- a/drivers/usb/host/xhci-dbg.c
> +++ b/drivers/usb/host/xhci-dbg.c
> @@ -278,7 +278,7 @@ void xhci_debug_trb(struct xhci_hcd *xhci, union xhci_trb *trb)
> * FIXME: look at flags to figure out if it's an address or if
> * the data is directly in the buffer field.
> */
> - xhci_dbg(xhci, "DMA address or buffer contents= %llu\n", address);
> + xhci_dbg(xhci, "DMA address or buffer contents= 0x%llx\n", address);
> break;
> case TRB_TYPE(TRB_COMPLETION):
> address = le64_to_cpu(trb->event_cmd.cmd_trb);
> diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
> index ae1d24c..768fd6e 100644
> --- a/drivers/usb/host/xhci-hub.c
> +++ b/drivers/usb/host/xhci-hub.c
> @@ -389,6 +389,9 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
> }
> bus_state = &xhci->bus_state[hcd_index(hcd)];
>
> + xhci_dbg(xhci, "%s(%04x, %04x, %04x, %p, %04x);\n", __func__,
> + typeReq, wValue, wIndex, buf, wLength);
> +
> spin_lock_irqsave(&xhci->lock, flags);
> switch (typeReq) {
> case GetHubStatus:
> diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
> index 3898f22..45f3b77 100644
> --- a/drivers/usb/host/xhci-ring.c
> +++ b/drivers/usb/host/xhci-ring.c
> @@ -2336,6 +2336,11 @@ static void queue_trb(struct xhci_hcd *xhci, struct xhci_ring *ring,
> trb->field[1] = cpu_to_le32(field2);
> trb->field[2] = cpu_to_le32(field3);
> trb->field[3] = cpu_to_le32(field4);
> +
> + xhci_dbg(xhci, "queue_trb @%llx %08x %08x %08x %08x\n",
> + xhci_trb_virt_to_dma(ring->enq_seg, ring->enqueue),
> + le32_to_cpu(trb->field[0]), le32_to_cpu(trb->field[1]),
> + le32_to_cpu(trb->field[2]), le32_to_cpu(trb->field[3]));
> inc_enq(xhci, ring, consumer, more_trbs_coming);
> }
>
> --
> 1.7.0.4
>
next prev parent reply other threads:[~2011-03-28 22:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-25 7:43 [PATCH 2/5] xhci: Extend debug messages Matt Evans
2011-03-28 22:19 ` Sarah Sharp [this message]
2011-03-29 2:17 ` Matt Evans
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110328221931.GC8065@xanatos \
--to=sarah.a.sharp@linux.intel.com \
--cc=linux-usb@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=matt@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).