From: Julius Werner <jwerner@chromium.org>
To: linux-kernel@vger.kernel.org
Cc: linux-usb@vger.kernel.org,
Sarah Sharp <sarah.a.sharp@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Vincent Palatin <vpalatin@chromium.org>,
Julius Werner <jwerner@chromium.org>
Subject: [PATCH] usb: xhci-dbg: Display endpoint number and direction in context dump
Date: Thu, 4 Apr 2013 14:03:04 -0700 [thread overview]
Message-ID: <1365109384-5333-1-git-send-email-jwerner@chromium.org> (raw)
When CONFIG_XHCI_HCD_DEBUGGING is activated, the XHCI driver can dump
device and input contexts to the console. The endpoint contexts in that
dump are labeled "Endpoint N Context", where N is DCI - 1... this is
very confusing, especially for people who are not that familiar with
the XHCI specification. Let's change this to display the endpoint number
and direction, which are much more commonly used concepts in USB (and
map to XHCI DCIs 1-to-1).
Signed-off-by: Julius Werner <jwerner@chromium.org>
---
drivers/usb/host/xhci-dbg.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c
index 5f3a7c7..98b1bee 100644
--- a/drivers/usb/host/xhci-dbg.c
+++ b/drivers/usb/host/xhci-dbg.c
@@ -507,7 +507,8 @@ static void xhci_dbg_ep_ctx(struct xhci_hcd *xhci,
dma_addr_t dma = ctx->dma +
((unsigned long)ep_ctx - (unsigned long)ctx->bytes);
- xhci_dbg(xhci, "Endpoint %02d Context:\n", i);
+ xhci_dbg(xhci, "Endpoint %02d %s Context:\n",
+ DIV_ROUND_UP(i, 2), i % 2 ? "OUT" : "IN");
xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - ep_info\n",
&ep_ctx->ep_info,
(unsigned long long)dma, ep_ctx->ep_info);
--
1.8.1.3
next reply other threads:[~2013-04-04 21:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-04 21:03 Julius Werner [this message]
2013-04-08 15:41 ` Sarah Sharp
2013-04-09 0:18 ` Julius Werner
2013-04-15 22:24 ` Sarah Sharp
2013-04-15 22:55 ` Julius Werner
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=1365109384-5333-1-git-send-email-jwerner@chromium.org \
--to=jwerner@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sarah.a.sharp@linux.intel.com \
--cc=vpalatin@chromium.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
all inboxes | Powered by JetHome®