mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
fb22ae6c7e
ci_udc.c's usb_gadget_unregister_driver() doesn't call driver->unbind() unlike other USB gadget drivers. Fix it to do this. Without this, when ether.c's CDC Ethernet device is torn down, eth_unbind() is never called, so dev->gadget is never set to NULL. For some reason, usb_eth_halt() is called both at the end of the first use of the Ethernet device, and prior to any subsequent use. Since dev->gadget is never cleared, all calls to usb_eth_halt() attempt to stop, disconnect, and clean up the device, resulting in double cleanup, which hangs U-Boot on my Tegra device at least. ci_udc allocates its own singleton EP0 request object, and cleans it up during usb_gadget_unregister_driver(). This appears necessary when using the USB gadget framework in U-Boot, since that does not allocate/free the EP0 request. However, the CDC Ethernet driver *does* allocate and free its own EP0 requests. Consequently, we must protect ci_ep_free_request() against double-freeing the request. Signed-off-by: Stephen Warren <swarren@nvidia.com> |
||
---|---|---|
.. | ||
atmel_usba_udc.c | ||
atmel_usba_udc.h | ||
ci_udc.c | ||
ci_udc.h | ||
composite.c | ||
config.c | ||
core.c | ||
designware_udc.c | ||
ep0.c | ||
ep0.h | ||
epautoconf.c | ||
ether.c | ||
f_dfu.c | ||
f_dfu.h | ||
f_fastboot.c | ||
f_mass_storage.c | ||
f_thor.c | ||
f_thor.h | ||
fotg210.c | ||
g_dnl.c | ||
gadget_chips.h | ||
Makefile | ||
mpc8xx_udc.c | ||
ndis.h | ||
omap1510_udc.c | ||
pxa25x_udc.c | ||
pxa25x_udc.h | ||
pxa27x_udc.c | ||
regs-otg.h | ||
rndis.c | ||
rndis.h | ||
s3c_udc_otg.c | ||
s3c_udc_otg_xfer_dma.c | ||
storage_common.c | ||
usbstring.c |