linux/drivers/usb/musb
Tony Lindgren 536d599d4a usb: musb: Add missing pm_runtime_disable and drop 2430 PM timeout
We are missing pm_runtime_disable() in 2430 glue layer. Further,
we only need to enable PM runtime and disable it on exit. With
musb_core.c doing PM, the glue layer as a parent will always be
active when musb_core.c is active.

This fixes host enumeration issues with some devices as reported
by Ladislav Michl <ladis@linux-mips.org>.

And holding an RPM reference while deregistering the child would
lead to a crash in omap2430_runtime_suspend() which dereferences
the now freed child's driver data on put as pointed out by
Johan Hovold <johan@kernel.org>:

Unable to handle kernel paging request at virtual address 6b6b6f17
...
[<c05453d4>] (omap2430_runtime_suspend) from [<c0481410>]
 (pm_generic_runtime_suspend+0x3c/0x48)
[<c0481410>] (pm_generic_runtime_suspend) from [<c0121028>]
 (_od_runtime_suspend+0x1c/0x30)
[<c0121028>] (_od_runtime_suspend) from [<c04833b0>] (__rpm_callback+0x3c/0x70)
[<c04833b0>] (__rpm_callback) from [<c0483414>] (rpm_callback+0x30/0x90)
[<c0483414>] (rpm_callback) from [<c0483984>] (rpm_suspend+0x118/0x6b4)
[<c0483984>] (rpm_suspend) from [<c04840f4>] (rpm_idle+0x104/0x440)
[<c04840f4>] (rpm_idle) from [<c04844ac>] (__pm_runtime_idle+0x7c/0xb0)
[<c04844ac>] (__pm_runtime_idle) from [<c0545458>] (omap2430_remove+0x38/0x58)
[<c0545458>] (omap2430_remove) from [<c047b2bc>] (platform_drv_remove+0x34/0x4c)

Note that if changes are needed to the autosuspend timeout, it should
be done in musb_core.c.

Reported-by: Ladislav Michl <ladis@linux-mips.org>
Fixes: 87326e8584 ("usb: musb: Remove extra PM runtime calls from
2430 glue layer")
Tested-by: Ladislav Michl <ladis@linux-mips.org>
Reviewed-by: Johan Hovold <johan@kernel.org>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-17 16:25:39 +01:00
..
Kconfig Merge 4.8-rc7 into usb-next 2016-09-19 09:12:41 +02:00
Makefile usb: musb: add tracepoints support for debugging 2016-07-17 08:23:57 +09:00
am35x.c usb: musb: am35x: fix error return code in am35x_probe() 2016-09-13 17:20:02 +02:00
blackfin.c usb: musb: Set up function pointers for DMA 2015-05-07 13:35:51 -05:00
blackfin.h usb: musb: drop a gigantic amount of ifdeferry 2011-07-01 14:31:10 -07:00
cppi_dma.c usb: musb: cleanup cppi_dma header 2016-07-17 08:23:57 +09:00
cppi_dma.h usb: musb: cppi41: move struct cppi41_dma_channel to header 2016-07-17 08:23:57 +09:00
da8xx.c usb: musb: da8xx: Don't print phy error on -EPROBE_DEFER 2016-11-07 10:10:24 +01:00
davinci.c usb: musb: Set up function pointers for DMA 2015-05-07 13:35:51 -05:00
davinci.h usb: musb: davinci: Fix build breakage 2012-06-04 18:29:42 +03:00
jz4740.c usb: musb: jz4740: fix error check of usb_get_phy() 2016-04-26 14:50:02 -07:00
musb_am335x.c usb: musb: Fix panic upon musb_am335x module removal 2014-06-27 10:53:06 -05:00
musb_core.c usb: musb: Fix PM for hub disconnect 2016-11-17 16:25:39 +01:00
musb_core.h usb: musb: Fix PM for hub disconnect 2016-11-17 16:25:39 +01:00
musb_cppi41.c usb: musb: cppi41: add dma channel tracepoints 2016-07-17 08:23:57 +09:00
musb_debug.h usb: musb: add tracepoints support for debugging 2016-07-17 08:23:57 +09:00
musb_debugfs.c usb: musb: add softconnect for host mode 2015-05-07 13:49:23 -05:00
musb_dma.h usb: musb: Set up function pointers for DMA 2015-05-07 13:35:51 -05:00
musb_dsps.c usb: musb: Fix sleeping function called from invalid context for hdrc glue 2016-11-17 16:25:39 +01:00
musb_gadget.c usb: musb: Fix PM for hub disconnect 2016-11-17 16:25:39 +01:00
musb_gadget.h usb: musb: add Kconfig options for HOST, GAGDET or DUAL_ROLE modes 2013-05-28 19:22:23 +03:00
musb_gadget_ep0.c usb: musb: switch dev_dbg to tracepoints 2016-07-17 08:23:57 +09:00
musb_host.c usb: musb: host: add urb tracepoints 2016-07-17 08:23:57 +09:00
musb_host.h usb: musb: fix prototype for musb_port_reset 2013-12-20 15:05:43 -06:00
musb_io.h usb: musb: Make busctl_offset an io-op rather then a define 2015-05-26 10:46:54 -05:00
musb_regs.h usb: musb: Make busctl_offset an io-op rather then a define 2015-05-26 10:46:54 -05:00
musb_trace.c usb: musb: add tracepoints support for debugging 2016-07-17 08:23:57 +09:00
musb_trace.h usb: musb: cppi41: add dma channel tracepoints 2016-07-17 08:23:57 +09:00
musb_virthub.c musb: Export musb_root_disconnect for use in modules 2016-09-22 12:00:21 +02:00
musbhsdma.c usb: musb: switch dev_dbg to tracepoints 2016-07-17 08:23:57 +09:00
musbhsdma.h usb: musb: remove generic_interrupt 2012-11-06 15:32:13 +02:00
omap2430.c usb: musb: Add missing pm_runtime_disable and drop 2430 PM timeout 2016-11-17 16:25:39 +01:00
omap2430.h usb: start using the control module driver 2013-01-25 12:27:24 +02:00
sunxi.c musb: sunxi: Add support for platform_set_mode 2016-09-13 17:20:02 +02:00
tusb6010.c usb: musb: Fix PM for hub disconnect 2016-11-17 16:25:39 +01:00
tusb6010.h usb: musb: Fix up DMA related macros 2015-05-07 13:35:46 -05:00
tusb6010_omap.c usb: musb: use %pad format string from dma_addr_t 2016-03-04 15:14:30 +02:00
ux500.c usb: musb: ux500: Fix NULL pointer dereference at system PM 2016-02-03 20:03:40 +02:00
ux500_dma.c usb: musb/ux500: remove duplicate check for dma_is_compatible 2016-03-04 15:14:30 +02:00