usb: dwc2: debugfs: Don't touch RX FIFO during register dump
authorStefan Wahren <stefan.wahren@i2se.com>
Fri, 4 May 2018 18:09:05 +0000 (20:09 +0200)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 15 May 2018 07:17:00 +0000 (10:17 +0300)
Dumping the registers via debugfs makes USB on Raspberry Pi completely
unusable. The read of register GRXSTSP ("Receive Status Read and Pop
Register") is responsible for this behaviour, because it pops the RX FIFO.
So avoid this by omitting the relevant register.

CC: Mian Yousaf Kaukab <yousaf.kaukab@intel.com>
Fixes: 563cf017c443 ("usb: dwc2: debugfs: add support for complete register dump")
Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/debugfs.c

index 5897333600a7989c0b74859b842d868fbfb25c2c..a21f893544344c46f88046d6b559a7bb9c21f28c 100644 (file)
@@ -368,7 +368,7 @@ static const struct debugfs_reg32 dwc2_regs[] = {
        dump_register(GINTSTS),
        dump_register(GINTMSK),
        dump_register(GRXSTSR),
-       dump_register(GRXSTSP),
+       /* Omit GRXSTSP */
        dump_register(GRXFSIZ),
        dump_register(GNPTXFSIZ),
        dump_register(GNPTXSTS),