1
0
Fork 0
alistair23-linux/drivers/usb
Li Jun d3c02ae356 MLK-23342-2 usb: host: xhci-plat: keep runtime active when remove host
While remove host(e.g. for USB role switch from host to device), if
runtime pm is enabled, a runtime suspend may happen which cause
below kernel dump:
[  121.438091] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000240
[  121.446913] Mem abort info:
[  121.449707]   ESR = 0x96000004
[  121.452960] xhci-hcd xhci-hcd.1.auto: // Halt the HC
[  121.457935] xhci-hcd xhci-hcd.1.auto: // Reset the HC
[  121.463262] xhci-hcd xhci-hcd.1.auto: Wait for controller to be ready for doorbell rings
[  121.471410]   EC = 0x25: DABT (current EL), IL = 32 bits
[  121.476769]   SET = 0, FnV = 0
[  121.479865]   EA = 0, S1PTW = 0
[  121.483036] Data abort info:
[  121.485921]   ISV = 0, ISS = 0x00000004
[  121.489913] xhci-hcd xhci-hcd.1.auto: // Disabling event ring interrupts
[  121.496740]   CM = 0, WnR = 0
[  121.499773] user pgtable: 4k pages, 48-bit VAs, pgdp=00000001b7b18000
[  121.506342] xhci-hcd xhci-hcd.1.auto: cleaning up memory
[  121.511824] xhci-hcd xhci-hcd.1.auto: Freed event ring
[  121.517028] xhci-hcd xhci-hcd.1.auto: Freed command ring
[  121.522391] [0000000000000240] pgd=0000000000000000
[  121.527314] Internal error: Oops: 96000004 [#1] PREEMPT SMP
[  121.532890] Modules linked in:
[  121.535951] CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 5.4.3-00107-g64d454a-dirty #1219
[  121.544039] Hardware name: FSL i.MX8MP EVK (DT)
[  121.548578] Workqueue: pm pm_runtime_work
[  121.552590] pstate: 60000005 (nZCv daif -PAN -UAO)
[  121.557385] pc : xhci_suspend+0x34/0x698
[  121.561311] lr : xhci_plat_runtime_suspend+0x2c/0x38
[  121.566275] sp : ffff800011ddbbc0
[  121.569588] x29: ffff800011ddbbc0 x28: 0000000000000000
[  121.574900] x27: 0000000000000008 x26: ffff800011b28000
[  121.580212] x25: ffff80001012b328 x24: ffff800011ddbd48
[  121.585523] x23: 0000000000000000 x22: ffff80001076ed78
[  121.590837] x21: ffff000177896000 x20: ffff0001714ebce4
[  121.596152] x19: ffff000177896000 x18: ffffffffffffffff
[  121.601464] x17: 0000000000000000 x16: 0000000000000000
[  121.606777] x15: ffff800011b288c8 x14: 0000000000000261
[  121.612089] x13: 0000000000000001 x12: 0000000000000001
[  121.617401] x11: 0000000000000000 x10: 00000000000009c0
[  121.622714] x9 : ffff800011ddbd40 x8 : fefefefefefefeff
[  121.628028] x7 : 0000000000000000 x6 : 000000003ca92688
[  121.633338] x5 : 00ffffffffffffff x4 : 001b6b0b00000000
[  121.638651] x3 : ffff0001714ebc10 x2 : 0000000000000000
[  121.643962] x1 : 0000000000000001 x0 : ffff000177896250
[  121.649277] Call trace:
[  121.651726]  xhci_suspend+0x34/0x698
[  121.655304]  xhci_plat_runtime_suspend+0x2c/0x38
[  121.659924]  pm_generic_runtime_suspend+0x28/0x40
[  121.664628]  __rpm_callback+0xd8/0x138
[  121.668376]  rpm_callback+0x24/0x98
[  121.671868]  rpm_suspend+0xe0/0x448
[  121.675358]  rpm_idle+0x124/0x140
[  121.678675]  pm_runtime_work+0xa0/0xf8
[  121.682426]  process_one_work+0x1dc/0x370
[  121.686434]  worker_thread+0x48/0x468
[  121.690100]  kthread+0xf0/0x120
[  121.693244]  ret_from_fork+0x10/0x1c

So keep the xhci-plat device active during remove host.

Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
2020-02-22 17:08:53 +08:00
..
atm USB: atm: cxacru: convert to use dev_groups 2019-08-09 07:55:45 +02:00
c67x00 USB: add SPDX identifiers to all remaining Makefiles 2017-11-07 15:53:48 +01:00
cdns3 MLK-23181-5 usb: cdns3: gadget: need to handle sg case for cdns3_descmiss_copy_data 2020-01-20 17:26:31 +08:00
chipidea LF-705-1 usb: chipidea: udc: delete the redundancy code 2020-02-16 21:01:30 +08:00
class USB: usblp: fix use-after-free on disconnect 2019-10-15 20:19:19 +02:00
common usb: common: add USB GPIO based connection detection driver 2019-09-03 19:01:04 +02:00
core MLK-9829 usb: core: print suggested message if failed to get device descriptor 2019-11-25 15:57:32 +08:00
dwc2 usb: dwc2: use a longer core rest timeout in dwc2_core_reset() 2019-12-04 22:30:45 +01:00
dwc3 MLK-23342-1 usb: dwc3: core: don't do suspend for device if suspended 2020-02-22 17:07:10 +08:00
early drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
gadget LF-468-2 usb: gadget: f_fs: set req->num_sgs as 0 for non-sg transfer 2019-12-18 15:12:09 +08:00
host MLK-23342-2 usb: host: xhci-plat: keep runtime active when remove host 2020-02-22 17:08:53 +08:00
image USB: microtek: fix info-leak at probe 2019-10-04 11:02:58 +02:00
isp1760 usb: add a HCD_DMA flag instead of guestimating DMA capabilities 2019-08-21 10:03:35 -07:00
misc appledisplay: fix error handling in the scheduled work 2019-11-29 10:10:25 +01:00
mon docs: usb: rename files to .rst and add them to drivers-api 2019-06-20 14:28:36 +02:00
mtu3 usb: mtu3: fix missing include of mtu3_dr.h 2019-10-27 08:58:44 +02:00
musb usb: add a HCD_DMA flag instead of guestimating DMA capabilities 2019-08-21 10:03:35 -07:00
phy usb: phy: show USB charger type for user 2019-11-25 15:57:26 +08:00
renesas_usbhs usb: renesas_usbhs: fix type of buf 2019-10-27 08:58:44 +02:00
roles USB changes for 5.4-rc1 2019-09-18 10:33:46 -07:00
serial USB: serial: ftdi_sio: add device IDs for U-Blox C099-F9P 2019-12-04 22:30:48 +01:00
storage UAS: Revert commit 3ae62a4209 ("UAS: fix alignment of scatter/gather segments") 2019-10-28 17:53:39 +01:00
typec usb: typec: tcpci: mask event interrupts when remove driver 2020-02-20 14:27:36 +08:00
usbip usbip: Fix uninitialized symbol 'nents' in stub_recv_cmd_submit() 2019-11-29 10:10:22 +01:00
Kconfig MLK-16065-7 usb: cdns3: add Cadence USB3 controller driver 2019-11-25 15:55:32 +08:00
Makefile MLK-16065-7 usb: cdns3: add Cadence USB3 controller driver 2019-11-25 15:55:32 +08:00
usb-skeleton.c USB: usb-skeleton: drop redundant in-urb check 2019-10-10 12:41:19 +02:00