OpenCloudOS-Kernel/drivers/usb/gadget
Anton Vorontsov 37c4fd8c75 USB: fsl_udc_core: Fix kernel oops on module removal
fsl_udc_release() calls dma_free_coherent() with an inappropriate
device passed to it, and since the device has no dma_ops, the following
oops pops up:

  Kernel BUG at d103ce9c [verbose debug info unavailable]
  Oops: Exception in kernel mode, sig: 5 [#1]
  ...
  NIP [d103ce9c] fsl_udc_release+0x50/0x80 [fsl_usb2_udc]
  LR [d103ce74] fsl_udc_release+0x28/0x80 [fsl_usb2_udc]
  Call Trace:
  [cfbc7dc0] [d103ce74] fsl_udc_release+0x28/0x80 [fsl_usb2_udc]
  [cfbc7dd0] [c01a35c4] device_release+0x2c/0x90
  [cfbc7de0] [c016b480] kobject_cleanup+0x58/0x98
  [cfbc7e00] [c016c52c] kref_put+0x54/0x6c
  [cfbc7e10] [c016b360] kobject_put+0x34/0x64
  [cfbc7e20] [c01a1d0c] put_device+0x1c/0x2c
  [cfbc7e30] [d103dbfc] fsl_udc_remove+0xc0/0x1e4 [fsl_usb2_udc]
  ...

This patch fixes the issue by passing dev->parent, which points to
a correct device.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: Li Yang <leoli@freescale.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-30 14:57:33 -07:00
..
Kconfig ARM: Fix lubbock defconfig build 2009-10-21 13:20:32 +01:00
Makefile usb: gadget: R8A66597 peripheral controller support. 2009-08-20 10:25:30 +09:00
amd5536udc.c USB: gadget: Drop NULL test on list_entry result 2009-09-23 06:46:28 -07:00
amd5536udc.h
at91_udc.c USB: gadget: double free_irq() in at91udc_probe() 2009-09-23 06:46:37 -07:00
at91_udc.h Rename WARN() to WARNING() to clear the namespace 2008-07-25 10:53:29 -07:00
atmel_usba_udc.c USB: atmel_usba_udc: change way of specifying bias function 2009-06-15 21:44:47 -07:00
atmel_usba_udc.h atmel_usba_udc: Add support for AT91CAP9 UDPHS 2008-04-06 17:25:06 -04:00
audio.c USB audio gadget: Prefix all macro definitions with UAC_ in linux/usb/audio.h 2009-09-23 06:46:20 -07:00
cdc2.c USB: replace uses of __constant_{endian} 2009-03-24 16:20:33 -07:00
ci13xxx_udc.c USB: ci13xxx_udc: use helper functions to determine endpoint type and direction 2009-06-15 21:44:41 -07:00
ci13xxx_udc.h USB: gadget: MIPS ci13xxx_udc 2009-01-07 09:59:58 -08:00
composite.c USB: gadget: Read buffer overflow 2009-09-23 06:46:32 -07:00
config.c usb/gadget: fix kernel-doc warning 2008-10-22 10:05:28 -07:00
dummy_hcd.c USB: dummy-hcd: accept mismatch between wLength and transfer length 2009-09-23 06:46:30 -07:00
epautoconf.c USB: replace uses of __constant_{endian} 2009-03-24 16:20:33 -07:00
ether.c USB: gadget: Fix EEM driver comments and VID/PID 2009-10-14 14:54:44 -07:00
f_acm.c USB: replace uses of __constant_{endian} 2009-03-24 16:20:33 -07:00
f_audio.c USB audio gadget: Un-inline generic_[gs]et_cmd 2009-09-23 06:46:20 -07:00
f_ecm.c USB: replace uses of __constant_{endian} 2009-03-24 16:20:33 -07:00
f_eem.c USB: gadget: Add EEM gadget driver 2009-09-23 06:46:35 -07:00
f_loopback.c headers: utsname.h redux 2009-09-23 18:13:10 -07:00
f_obex.c headers: utsname.h redux 2009-09-23 18:13:10 -07:00
f_phonet.c f_phonet: use page-sized rather than MTU-sized RX buffers 2009-08-12 20:44:49 -07:00
f_rndis.c USB: gadget: Add EEM gadget driver 2009-09-23 06:46:35 -07:00
f_serial.c USB: replace uses of __constant_{endian} 2009-03-24 16:20:33 -07:00
f_sourcesink.c headers: utsname.h redux 2009-09-23 18:13:10 -07:00
f_subset.c USB: replace uses of __constant_{endian} 2009-03-24 16:20:33 -07:00
file_storage.c USB: g_file_storage: use the "unaligned" accessors 2009-06-15 21:44:44 -07:00
fsl_mx3_udc.c USB: gadget: Add i.MX3x support to the fsl_usb2_udc driver 2009-06-15 21:44:47 -07:00
fsl_qe_udc.c USB: fsl_qe_udc: Add fsl,mpc8323-qe-usb compatible entry 2009-09-23 06:46:37 -07:00
fsl_qe_udc.h usb/fsl_qe_udc: fix response to get status request 2008-10-17 14:41:08 -07:00
fsl_udc_core.c USB: fsl_udc_core: Fix kernel oops on module removal 2009-10-30 14:57:33 -07:00
fsl_usb2_udc.h USB: gadget: Add i.MX3x support to the fsl_usb2_udc driver 2009-06-15 21:44:47 -07:00
g_zero.h USB: gadget: gadget zero uses new suspend/resume hooks 2009-03-24 16:20:45 -07:00
gadget_chips.h usb: gadget: R8A66597 peripheral controller support. 2009-08-20 10:25:30 +09:00
gmidi.c USB audio gadget: Prefix all macro definitions with UAC_ in linux/usb/audio.h 2009-09-23 06:46:20 -07:00
goku_udc.c USB: Goku-S: use helper functions to determine endpoint type and direction 2009-06-15 21:44:42 -07:00
goku_udc.h Rename WARN() to WARNING() to clear the namespace 2008-07-25 10:53:29 -07:00
imx_udc.c USB: gadget: imx_udc: Use resource size 2009-10-09 13:52:07 -07:00
imx_udc.h USB: imx_udc: Fix IMX UDC gadget general irq handling 2009-03-24 16:20:29 -07:00
inode.c headers: remove sched.h from poll.h 2009-10-04 15:05:10 -07:00
langwell_udc.c headers: smp_lock.h redux 2009-07-12 12:22:34 -07:00
langwell_udc.h USB: Add Intel Langwell USB Device Controller driver 2009-06-15 21:44:47 -07:00
lh7a40x_udc.c USB: add missing KERN_* constants to printks 2009-03-24 16:20:30 -07:00
lh7a40x_udc.h [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
m66592-udc.c usb: gadget: m66592-udc needs linux/err.h. 2009-08-24 22:45:15 +09:00
m66592-udc.h usb: m66592-udc platform data on_chip support 2009-07-23 13:04:15 +09:00
ndis.h usb gadget: RNDIS cleanups 2008-07-21 15:16:10 -07:00
net2280.c USB: replace uses of __constant_{endian} 2009-03-24 16:20:33 -07:00
net2280.h USB: gadget: net2280: implement set_wedge 2008-10-17 14:40:52 -07:00
omap_udc.c USB: gadget: omap_udc uses platform_driver_probe() 2009-04-23 14:15:29 -07:00
omap_udc.h Rename WARN() to WARNING() to clear the namespace 2008-07-25 10:53:29 -07:00
printer.c const: constify remaining file_operations 2009-10-01 16:11:11 -07:00
pxa25x_udc.c USB: gadget: pxa25x: basic transceiver support 2009-09-23 06:46:23 -07:00
pxa25x_udc.h USB: gadget: pxa25x: basic transceiver support 2009-09-23 06:46:23 -07:00
pxa27x_udc.c USB: pxa27x_udc: single-thread setup requests 2009-06-15 21:44:42 -07:00
pxa27x_udc.h USB: pxa27x_udc: single-thread setup requests 2009-06-15 21:44:42 -07:00
r8a66597-udc.c usb: r8a66597-udc: implement the set_wedge method 2009-08-21 08:34:08 +09:00
r8a66597-udc.h usb: r8a66597-udc unaligned fifo fix 2009-10-06 10:59:03 +09:00
rndis.c USB: gadget: Add EEM gadget driver 2009-09-23 06:46:35 -07:00
rndis.h USB: gadget: Add EEM gadget driver 2009-09-23 06:46:35 -07:00
s3c-hsotg.c USB: gadget: s3c-hsotg: missing parentheses 2009-09-23 06:46:28 -07:00
s3c2410_udc.c USB: s3c2410: unregister should call unbind, not disconnect 2009-09-23 06:46:35 -07:00
s3c2410_udc.h
serial.c USB: replace uses of __constant_{endian} 2009-03-24 16:20:33 -07:00
u_audio.c headers: utsname.h redux 2009-09-23 18:13:10 -07:00
u_audio.h USB: gadget: add USB Audio Gadget driver 2009-06-15 21:44:47 -07:00
u_ether.c headers: utsname.h redux 2009-09-23 18:13:10 -07:00
u_ether.h USB: gadget: Add EEM gadget driver 2009-09-23 06:46:35 -07:00
u_phonet.h Phonet: USB CDC Phonet function for gadget framework 2008-12-17 15:49:09 -08:00
u_serial.c USB: double put_tty_driver(gs_tty_driver) in gserial_setup() 2009-09-23 06:46:37 -07:00
u_serial.h usb gadget: cdc obex glue 2008-10-17 14:40:53 -07:00
usbstring.c USB: Gadget: fix UTF conversion in the usbstring library 2009-05-08 19:34:56 -07:00
zero.c USB: gadget: gadget zero uses new suspend/resume hooks 2009-03-24 16:20:45 -07:00