usb: host: xhci: fix ep context print mismatch in debugfs
Subsystems (2)
PATCH 1/1 usb: host: xhci: fix ep context print mismatch in debugfs
dci is 0 based and xhci_get_ep_ctx() will do ep index increment to get the ep context.
Fixes 02b6fdc2a153 ("usb: xhci: Add debugfs interface for xHCI driver")
Signed-off-by Li Jun <[email protected]>
--- drivers/usb/host/xhci-debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/host/xhci-debugfs.c +2 -2
@@ -282,9 +282,9 @@ static int xhci_endpoint_context_show(struct seq_file *s, void *unused) xhci =hcd_to_xhci (bus_to_hcd (dev->udev->bus)); -for (dci =1 ; dci <32 ; dci++) { +for (dci =0 ; dci <31 ; dci++) { ep_ctx =xhci_get_ep_ctx (xhci, dev->out_ctx, dci); - dma = dev->out_ctx->dma + dci *CTX_SIZE (xhci->hcc_params); + dma = dev->out_ctx->dma + (dci +1 ) *CTX_SIZE (xhci->hcc_params); seq_printf(s, "%pad: %s\n", &dma, xhci_decode_ep_context(le32_to_cpu(ep_ctx->ep_info), le32_to_cpu(ep_ctx->ep_info2),
Signature · 1 line
2.7.4
Mathias Nyman
maintainerQuoted 16 lines · Li Jun
dci is 0 based and
xhci_get_ep_ctx()will do ep index increment to get the ep context.Fixes 02b6fdc2a153 ("usb: xhci: Add debugfs interface for xHCI driver")Signed-off-by Li Jun <[email protected]>--- drivers/usb/host/xhci-debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/usb/host/xhci-debugfs.c +0
-0@@ -282,9 +282,9 @@ static int xhci_endpoint_context_show(struct seq_file *s, void *unused)
drivers/usb/host/xhci-debugfs.c static int xhci_endpoint_context_show(struct seq_file *s, void *unused) · line 290
Quoted 10 lines
drivers/usb/host/xhci-debugfs.c +2
-2xhci =hcd_to_xhci (bus_to_hcd (dev->udev->bus)); -for (dci =1 ; dci <32 ; dci++) { +for (dci =0 ; dci <31 ; dci++) { ep_ctx =xhci_get_ep_ctx (xhci, dev->out_ctx, dci); - dma = dev->out_ctx->dma + dci *CTX_SIZE (xhci->hcc_params); + dma = dev->out_ctx->dma + (dci +1 ) *CTX_SIZE (xhci->hcc_params); seq_printf(s, "%pad: %s\n", &dma, xhci_decode_ep_context(le32_to_cpu(ep_ctx->ep_info), le32_to_cpu(ep_ctx->ep_info2),
Thanks, adding to queue.
I'll probably change "dci" to "ep_index" while applying this as it doesn't represent the Device Context Index (DCI) in the xhci specs
-Mathias