summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSarah Sharp <sarah.a.sharp@linux.intel.com>2009-08-07 14:04:40 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2009-10-05 09:32:45 -0700
commit66bf28eeb930417010b7cc72a30bf97ff42a77f5 (patch)
treedbd20249b5e9bfbc6310e6f97ce88aaea0627738
parent15113e82cec9493b772ff5ef1decb53727d56a63 (diff)
downloadlinux-stable-66bf28eeb930417010b7cc72a30bf97ff42a77f5.tar.gz
linux-stable-66bf28eeb930417010b7cc72a30bf97ff42a77f5.tar.bz2
linux-stable-66bf28eeb930417010b7cc72a30bf97ff42a77f5.zip
USB: xhci: Fix slot and endpoint context debugging.
commit 018218d1d9eb06116d24a02dd5e7a390f0353d0f upstream. Use the virtual address of the memory hardware uses, not the address for the container of that memory. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/usb/host/xhci-dbg.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c
index 705e34324156..33128d52f212 100644
--- a/drivers/usb/host/xhci-dbg.c
+++ b/drivers/usb/host/xhci-dbg.c
@@ -413,7 +413,8 @@ void xhci_dbg_slot_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx)
int i;
struct xhci_slot_ctx *slot_ctx = xhci_get_slot_ctx(xhci, ctx);
- dma_addr_t dma = ctx->dma + ((unsigned long)slot_ctx - (unsigned long)ctx);
+ dma_addr_t dma = ctx->dma +
+ ((unsigned long)slot_ctx - (unsigned long)ctx->bytes);
int csz = HCC_64BYTE_CONTEXT(xhci->hcc_params);
xhci_dbg(xhci, "Slot Context:\n");
@@ -459,7 +460,7 @@ void xhci_dbg_ep_ctx(struct xhci_hcd *xhci,
for (i = 0; i < last_ep_ctx; ++i) {
struct xhci_ep_ctx *ep_ctx = xhci_get_ep_ctx(xhci, ctx, i);
dma_addr_t dma = ctx->dma +
- ((unsigned long)ep_ctx - (unsigned long)ctx);
+ ((unsigned long)ep_ctx - (unsigned long)ctx->bytes);
xhci_dbg(xhci, "Endpoint %02d Context:\n", i);
xhci_dbg(xhci, "@%p (virt) @%08llx (dma) %#08x - ep_info\n",