linux/drivers/usb/dwc2
Vincent Palatin 7252f1bfd4 usb: dwc2: avoid leaking DMA channels on disconnection
When the HCD is disconnected, the DMA transfers still in-flight were cleaned-up
but the count of available DMA channels (e.g. available_host_channels) was not
reset.
The pool of DMA channels can be depleted when doing unclean
disconnection of USB peripherals, and reaches the point where no
transfer was possible until the next reboot/reload of the driver.

Tested by putting a programmable USB mux on the port and randomly
plugging/unpluging a USB HUB with USB mass-storage key, USB-audio and
USB-ethernet dongle connected to its downstream ports, and also doing the
disconnection early while the devices are still enumerating to get more URBs
in-flight.
After the patch, the devices are still enumerating after thousands of cycles,
while the port was totally dead before.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-03-19 11:22:57 -05:00
..
core_intr.c usb: dwc2: call dwc2_is_controller_alive() under spinlock 2015-01-19 09:41:49 -06:00
core.c usb: dwc2: Fixed a few typos in comments 2015-01-12 12:13:24 -06:00
core.h usb: dwc2: rework initialization of host and gadget in dual-role mode 2015-03-12 12:18:49 -05:00
gadget.c usb: dwc2: Fix a bug in reading the endpoint directions from reg. 2015-02-04 11:16:47 -06:00
hcd_ddma.c
hcd_intr.c usb: dwc2: handle DMA buffer unmapping sanely 2014-09-19 16:17:58 -07:00
hcd_queue.c usb: dwc2: handle DMA buffer unmapping sanely 2014-09-19 16:17:58 -07:00
hcd.c usb: dwc2: avoid leaking DMA channels on disconnection 2015-03-19 11:22:57 -05:00
hcd.h usb: dwc2: Move gadget probe function into platform code 2014-11-14 14:59:32 -06:00
hw.h usb: dwc2: gadget: replace constants with defines 2015-01-30 10:34:11 -06:00
Kconfig usb: dwc2: pci: Select the generic PHY for dwc2-pci driver 2015-03-13 10:40:53 -05:00
Makefile usb: dwc2: Update Kconfig to support dual-role 2014-11-14 15:00:07 -06:00
pci.c usb: dwc2: pci: Add device mode to the dwc2-pci driver 2015-03-11 15:08:17 -05:00
platform.c usb: dwc2: rework initialization of host and gadget in dual-role mode 2015-03-12 12:18:49 -05:00