kernel-ark/drivers/usb/gadget
Anton Vorontsov 9ac36da3f8 USB: fsl_qe_udc: Report disconnect before unbinding
Gadgets disable endpoints in their disconnect callbacks, so
we must call disconnect before unbinding. This also fixes
muram memory leak, since we free muram in the qe_ep_disable().

But mainly the patch fixes following badness:

root@b1:~# insmod fsl_qe_udc.ko
fsl_qe_udc: Freescale QE/CPM USB Device Controller driver, 1.0
fsl_qe_udc e01006c0.usb: QE USB controller initialized as device
root@b1:~# insmod g_ether.ko
g_ether gadget: using random self ethernet address
g_ether gadget: using random host ethernet address
usb0: MAC be:2d:3c:fa:be:f0
usb0: HOST MAC 62:b8:6a:df:38:66
g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
g_ether gadget: g_ether ready
fsl_qe_udc e01006c0.usb: fsl_qe_udc bind to driver g_ether
g_ether gadget: high speed config #1: CDC Ethernet (ECM)
root@b1:~# rmmod g_ether.ko
------------[ cut here ]------------
Badness at drivers/usb/gadget/composite.c:871
[...]
NIP [d10c1374] composite_unbind+0x24/0x15c [g_ether]
LR [d10a82f4] usb_gadget_unregister_driver+0x128/0x168 [fsl_qe_udc]
Call Trace:
[cfb93e80] [cfb1f3a0] 0xcfb1f3a0 (unreliable)
[cfb93eb0] [d10a82f4] usb_gadget_unregister_driver+0x128/0x168 [fsl_qe_udc]
[cfb93ed0] [d10c2a3c] usb_composite_unregister+0x3c/0x4c [g_ether]
[cfb93ee0] [c006bde0] sys_delete_module+0x130/0x19c
[cfb93f40] [c00142d8] ret_from_syscall+0x0/0x38
[...]
fsl_qe_udc e01006c0.usb: unregistered gadget driver 'g_ether'

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-11-30 22:24:02 -08:00
..
amd5536udc.c removed unused #include <linux/version.h>'s 2008-08-23 12:14:12 -07:00
amd5536udc.h
at91_udc.c [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
at91_udc.h
atmel_usba_udc.c [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
atmel_usba_udc.h
cdc2.c usb gadget: USB_GADGET_VBUS_DRAW Kconfig option 2008-10-17 14:40:58 -07:00
composite.c usb gadget: USB_GADGET_VBUS_DRAW Kconfig option 2008-10-17 14:40:58 -07:00
config.c usb/gadget: fix kernel-doc warning 2008-10-22 10:05:28 -07:00
dummy_hcd.c USB: gadget: dummy_hcd: implement set_wedge 2008-10-17 14:40:52 -07:00
epautoconf.c
ether.c usb gadget: USB_GADGET_VBUS_DRAW Kconfig option 2008-10-17 14:40:58 -07:00
f_acm.c USB: gadget: cdc-acm deadlock fix 2008-11-13 14:45:06 -08:00
f_ecm.c usb gadget: link fixes for network gadget 2008-10-16 09:24:47 -07:00
f_loopback.c usb gadget: USB_GADGET_VBUS_DRAW Kconfig option 2008-10-17 14:40:58 -07:00
f_obex.c usb gadget: defer obex enumeration 2008-10-17 14:40:53 -07:00
f_rndis.c USB: gadget rndis: send notifications 2008-11-19 22:01:34 -08:00
f_serial.c usb gadget: remove needless struct members 2008-08-13 17:32:57 -07:00
f_sourcesink.c usb gadget: USB_GADGET_VBUS_DRAW Kconfig option 2008-10-17 14:40:58 -07:00
f_subset.c usb gadget: link fixes for network gadget 2008-10-16 09:24:47 -07:00
file_storage.c usb gadget: USB_GADGET_VBUS_DRAW Kconfig option 2008-10-17 14:40:58 -07:00
fsl_qe_udc.c USB: fsl_qe_udc: Report disconnect before unbinding 2008-11-30 22:24:02 -08:00
fsl_qe_udc.h usb/fsl_qe_udc: fix response to get status request 2008-10-17 14:41:08 -07:00
fsl_usb2_udc.c fsl_usb2_udc: Fix oops on probe failure. 2008-10-17 14:41:07 -07:00
fsl_usb2_udc.h fsl_usb2_udc: Fix some sparse warnings and remove redundant code. 2008-10-17 14:41:05 -07:00
g_zero.h
gadget_chips.h usb: add Freescale QE/CPM USB peripheral controller driver 2008-10-17 14:40:54 -07:00
gmidi.c usb gadget: USB_GADGET_VBUS_DRAW Kconfig option 2008-10-17 14:40:58 -07:00
goku_udc.c
goku_udc.h
inode.c saner FASYNC handling on file close 2008-11-01 09:49:46 -07:00
Kconfig USB: omap_udc: sync with OMAP tree 2008-10-17 14:41:00 -07:00
lh7a40x_udc.c
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
m66592-udc.h
Makefile usb: add Freescale QE/CPM USB peripheral controller driver 2008-10-17 14:40:54 -07:00
ndis.h
net2280.c USB: gadget: net2280: implement set_wedge 2008-10-17 14:40:52 -07:00
net2280.h USB: gadget: net2280: implement set_wedge 2008-10-17 14:40:52 -07:00
omap_udc.c USB: omap_udc: sync with OMAP tree 2008-10-17 14:41:00 -07:00
omap_udc.h
printer.c usb gadget: USB_GADGET_VBUS_DRAW Kconfig option 2008-10-17 14:40:58 -07:00
pxa25x_udc.c [ARM] 5335/1: pxa25x_udc: Fix is_vbus_present to return 1 or 0 2008-11-23 15:49:59 +00:00
pxa25x_udc.h [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/mach 2008-08-07 09:55:48 +01:00
pxa27x_udc.c USB: Fix unneeded endpoint check in pxa27x_udc 2008-10-22 10:05:28 -07:00
pxa27x_udc.h
rndis.c usb gadget: link fixes for network gadget 2008-10-16 09:24:47 -07:00
rndis.h
s3c2410_udc.c USB: Fix debugfs_create_file's error checking method for usb/gadget/s3c2410_udc 2008-10-22 10:05:27 -07:00
s3c2410_udc.h
serial.c usb gadget: USB_GADGET_VBUS_DRAW Kconfig option 2008-10-17 14:40:58 -07:00
u_ether.c usb gadget: cdc ethernet notification bugfix 2008-10-17 14:41:01 -07:00
u_ether.h
u_serial.c usb gadget: issue notifications from ACM function 2008-08-13 17:32:57 -07:00
u_serial.h usb gadget: cdc obex glue 2008-10-17 14:40:53 -07:00
usbstring.c
zero.c usb gadget: link fixes for gadget zero 2008-10-16 09:24:46 -07:00