linux/drivers/usb/dwc3
Steinar H. Gunderson c4a6d3b31a usb: dwc3: exynos: Fix deferred probing storm.
commit 4879efb34f upstream.

dwc3-exynos has two problems during init if the regulators are slow
to come up (for instance if the I2C bus driver is not on the initramfs)
and return probe deferral. First, every time this happens, the driver
leaks the USB phys created; they need to be deallocated on error.

Second, since the phy devices are created before the regulators fail,
this means that there's a new device to re-trigger deferred probing,
which causes it to essentially go into a busy loop of re-probing the
device until the regulators come up.

Move the phy creation to after the regulators have succeeded, and also
fix cleanup on failure. On my ODROID XU4 system (with Debian's initramfs
which doesn't contain the I2C driver), this reduces the number of probe
attempts (for each of the two controllers) from more than 2000 to eight.

Signed-off-by: Steinar H. Gunderson <sesse@google.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Vivek Gautam <gautam.vivek@samsung.com>
Fixes: d720f057fd ("usb: dwc3: exynos: add nop transceiver support")
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2016-08-22 22:38:11 +01:00
..
core.c usb: dwc3: core: fix ordering for PHY suspend 2014-10-05 13:40:59 -07:00
core.h usb: dwc3: Fix assignment of EP transfer resources 2016-03-08 12:15:22 +00:00
debug.h usb: dwc3: switch to GPL v2 only 2013-07-29 13:56:44 +03:00
debugfs.c usb: dwc3: switch to GPL v2 only 2013-07-29 13:56:44 +03:00
dwc3-exynos.c usb: dwc3: exynos: Fix deferred probing storm. 2016-08-22 22:38:11 +01:00
dwc3-keystone.c usb: dwc3: keystone: drop dma_mask configuration 2016-05-01 00:06:09 +02:00
dwc3-omap.c usb: dwc3: dwc3-omap: Fix disable IRQ 2015-03-18 14:41:51 +00:00
dwc3-pci.c usb: dwc3: convert to pcim_enable_device() 2014-05-15 10:26:38 -05:00
ep0.c usb: dwc3: Fix assignment of EP transfer resources 2016-03-08 12:15:22 +00:00
gadget.c usb: dwc3: Fix assignment of EP transfer resources 2016-03-08 12:15:22 +00:00
gadget.h usb: dwc3: gadget: fix set_halt() bug with pending transfers 2014-11-13 11:48:31 +00:00
host.c usb: dwc3: switch to GPL v2 only 2013-07-29 13:56:44 +03:00
io.h usb: dwc3: switch to GPL v2 only 2013-07-29 13:56:44 +03:00
Kconfig usb: dwc3: dwc3-omap: Fix the crash on module removal 2014-06-19 10:06:28 -05:00
Makefile usb: dwc3: add Keystone specific glue layer 2013-12-12 13:43:07 -06:00
platform_data.h usb: dwc3: adapt to use dr_mode device tree helper 2013-07-29 13:56:51 +03:00