linux/drivers/usb/musb
Sebastian Andrzej Siewior f042e9cbae usb: musb: musb_dsps: fix NULL pointer in suspend
So testing managed to configure musb in DMA mode but not load the
matching cppi41 driver for DMA. This results in

|musb-hdrc musb-hdrc.0.auto: Failed to request rx1.
|musb-hdrc musb-hdrc.0.auto: musb_init_controller failed with status -517
|platform musb-hdrc.0.auto: Driver musb-hdrc requests probe deferral

which is "okay". Once the driver is loaded we re-try probing and
everyone is happy. Until then if you try suspend say
    echo mem > /sys/power/state
then you go boom

|Unable to handle kernel NULL pointer dereference at virtual address 000003a4
|pgd = cf50c000
|[000003a4] *pgd=8f6a3831, *pte=00000000, *ppte=00000000
|Internal error: Oops: 17 [#1] ARM
|PC is at dsps_suspend+0x18/0x9c [musb_dsps]
|LR is at dsps_suspend+0x18/0x9c [musb_dsps]
|pc : [<bf08e268>] lr : [<bf08e268>] psr: a0000013
|sp : cbd97e00 ip : c0af4394 fp : 00000000
|r10: c0831d90 r9 : 00000002 r8 : cf6da410
|r7 : c03ba4dc r6 : bf08f224 r5 : 00000000 r4 : cbc5fcd0
|r3 : bf08e250 r2 : bf08f264 r1 : cf6da410 r0 : 00000000
|[<bf08e268>] (dsps_suspend [musb_dsps]) from [<c03ba508>] (platform_pm_suspend+0x2c/0x54)
|Code: e1a04000 e9900041 e2800010 eb4caa8e (e59053a4)

because platform_get_drvdata(glue->musb) returns a NULL pointer as long as the
device is not fully probed.

Tested-by: George Cherian <george.cherian@ti.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-10-23 09:55:43 -05:00
..
am35x.c usb: hub: rename khubd to hub_wq in documentation and comments 2014-09-23 22:33:19 -07:00
blackfin.c
blackfin.h
cppi_dma.c
cppi_dma.h
da8xx.c
davinci.c
davinci.h
jz4740.c
Kconfig
Makefile
musb_am335x.c
musb_core.c
musb_core.h
musb_cppi41.c usb: musb: cppi41: restart hrtimer only if not yet done 2014-10-23 09:55:41 -05:00
musb_debug.h
musb_debugfs.c
musb_dma.h
musb_dsps.c usb: musb: musb_dsps: fix NULL pointer in suspend 2014-10-23 09:55:43 -05:00
musb_gadget_ep0.c
musb_gadget.c usb: gadget: Refactor request completion 2014-09-25 16:58:50 +02:00
musb_gadget.h
musb_host.c
musb_host.h
musb_io.h
musb_regs.h usb: Fixed a few typos 2014-09-23 22:15:18 -07:00
musb_virthub.c
musbhsdma.c
musbhsdma.h
omap2430.c
omap2430.h
tusb6010_omap.c
tusb6010.c usb: hub: rename khubd to hub_wq in documentation and comments 2014-09-23 22:33:19 -07:00
tusb6010.h
ux500_dma.c
ux500.c