diff options
author | Stephen Warren <swarren@nvidia.com> | 2014-06-23 12:02:48 -0600 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2014-06-25 22:22:20 +0200 |
commit | fb22ae6c7e0ffe438103c948c87c5ddf2ef56e7e (patch) | |
tree | 03b37ea3b74d164622335d80985187a57c651c3c /include/zfs/zil.h | |
parent | ba9b42c81b0734d53edfbb1fe4a6ded7de78c5ab (diff) | |
download | u-boot-imx-fb22ae6c7e0ffe438103c948c87c5ddf2ef56e7e.zip u-boot-imx-fb22ae6c7e0ffe438103c948c87c5ddf2ef56e7e.tar.gz u-boot-imx-fb22ae6c7e0ffe438103c948c87c5ddf2ef56e7e.tar.bz2 |
usb: ci_udc: fix interaction with CONFIG_USB_ETH_CDC
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>
Diffstat (limited to 'include/zfs/zil.h')
0 files changed, 0 insertions, 0 deletions