diff options
author | John Keeping <john@metanate.com> | 2019-12-19 11:34:32 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-15 10:39:21 +0100 |
commit | 7037e101b648f8534119733e0aba215097ecd4d4 (patch) | |
tree | ae0120bad84476958f056b31289328f8424fc8e3 /drivers/usb/dwc2 | |
parent | 644139f8b64d818f6345351455f14471510879a5 (diff) | |
download | linux-7037e101b648f8534119733e0aba215097ecd4d4.tar.gz linux-7037e101b648f8534119733e0aba215097ecd4d4.tar.bz2 linux-7037e101b648f8534119733e0aba215097ecd4d4.zip |
usb: dwc2: fix debugfs FIFO count
The number of FIFOs may be lower than the number of endpoints. Use the
correct total when printing FIFO details in debugfs.
Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Signed-off-by: John Keeping <john@metanate.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/dwc2')
-rw-r--r-- | drivers/usb/dwc2/debugfs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/dwc2/debugfs.c b/drivers/usb/dwc2/debugfs.c index b8f2790abf91..3a0dcbfbc827 100644 --- a/drivers/usb/dwc2/debugfs.c +++ b/drivers/usb/dwc2/debugfs.c @@ -183,6 +183,7 @@ DEFINE_SHOW_ATTRIBUTE(state); static int fifo_show(struct seq_file *seq, void *v) { struct dwc2_hsotg *hsotg = seq->private; + int fifo_count = dwc2_hsotg_tx_fifo_count(hsotg); u32 val; int idx; @@ -196,7 +197,7 @@ static int fifo_show(struct seq_file *seq, void *v) seq_puts(seq, "\nPeriodic TXFIFOs:\n"); - for (idx = 1; idx < hsotg->num_of_eps; idx++) { + for (idx = 1; idx <= fifo_count; idx++) { val = dwc2_readl(hsotg, DPTXFSIZN(idx)); seq_printf(seq, "\tDPTXFIFO%2d: Size %d, Start 0x%08x\n", idx, |