linux/drivers/usb/musb
Stefano Babic 6ff1f3d3bd usb: musb: am35xx: drop spurious unplugging a device
On AM3517, tx and rx interrupt are detected together with
the disconnect event. This generates a kernel panic in musb_interrupt,
because rx / tx are handled after disconnect.
This issue was seen on a Technexion's TAM3517 SOM. Unplugging a device,
tx / rx interrupts together with disconnect are detected. This brings
to kernel panic like this:

[   68.526153] Unable to handle kernel NULL pointer dereference at virtual address 00000011
[   68.534698] pgd = c0004000
[   68.537536] [00000011] *pgd=00000000
[   68.541351] Internal error: Oops: 17 [#1] ARM
[   68.545928] Modules linked in:
[   68.549163] CPU: 0    Not tainted  (3.6.0-rc5-00020-g9e05905 #178)
[   68.555694] PC is at rxstate+0x8/0xdc
[   68.559539] LR is at musb_interrupt+0x98/0x858
[   68.564239] pc : [<c035cd88>]    lr : [<c035af1c>]    psr: 40000193
[   68.564239] sp : ce83fb40  ip : d0906410  fp : 00000000
[   68.576293] r10: 00000000  r9 : cf3b0e40  r8 : 00000002
[   68.581817] r7 : 00000019  r6 : 00000001  r5 : 00000001  r4 : 000000d4
[   68.588684] r3 : 00000000  r2 : 00000000  r1 : ffffffcc  r0 : cf23c108
[   68.595550] Flags: nZcv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment ke

Note: this behavior is not seen with a USB hub, while it is
easy to reproduce connecting a USB-pen directly to the USB-A of
the board.

Drop tx / rx interrupts if disconnect is detected.

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Felipe Balbi <balbi@ti.com>
Cc: stable@vger.kernel.org # 3.5 3.6
Tested-by: Dmitry Lifshitz <lifshitz@compulab.co.il>
Tested-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-10-15 15:20:27 +03:00
..
am35x.c usb: musb: am35xx: drop spurious unplugging a device 2012-10-15 15:20:27 +03:00
blackfin.c usb: musb: patches for v3.7 merge window 2012-09-11 13:56:29 -07:00
blackfin.h
cppi_dma.c
cppi_dma.h
da8xx.c ARM: soc: multiplatform enablement 2012-10-01 19:11:38 -07:00
davinci.c usb: musb: patches for v3.7 merge window 2012-09-11 13:56:29 -07:00
davinci.h
Kconfig usb: musb: patches for v3.7 merge window 2012-09-11 13:56:29 -07:00
Makefile
musb_core.c usb: musb: kill global and static for multi instance 2012-09-11 17:34:45 +03:00
musb_core.h usb: musb: kill global and static for multi instance 2012-09-11 17:34:45 +03:00
musb_debug.h
musb_debugfs.c usb: musb: kill global and static for multi instance 2012-09-11 17:34:45 +03:00
musb_dma.h
musb_dsps.c usb: musb: patches for v3.7 merge window 2012-09-11 13:56:29 -07:00
musb_gadget_ep0.c
musb_gadget.c
musb_gadget.h
musb_host.c Merge 3.6-rc6 into usb-next 2012-09-16 20:42:46 -07:00
musb_host.h
musb_io.h xtensa: adopt generic io routines 2012-10-03 15:11:42 -07:00
musb_regs.h
musb_virthub.c
musbhsdma.c Merge 3.6-rc6 into usb-next 2012-09-16 20:42:46 -07:00
musbhsdma.h
omap2430.c usb: musb: add musb_ida for multi instance support 2012-09-11 17:34:41 +03:00
omap2430.h usb: musb: omap: write directly to mailbox instead of using phy 2012-09-11 12:13:22 +03:00
tusb6010_omap.c ARM: soc: general cleanups 2012-10-01 18:19:05 -07:00
tusb6010.c usb: musb: patches for v3.7 merge window 2012-09-11 13:56:29 -07:00
tusb6010.h
ux500_dma.c ARM: soc: multiplatform enablement 2012-10-01 19:11:38 -07:00
ux500.c usb: musb: add musb_ida for multi instance support 2012-09-11 17:34:41 +03:00