u-boot/drivers/usb/gadget
Sam Protsenko 8038f6d288 usb: gadget: composite: Correct recovery path for register
In case when usb_composite_register() failed once (for whatever reason),
it will fail further even if all conditions are correct. Example:

    => fastboot 2
    Invalid Controller Index
    couldn't find an available UDC
    g_dnl_register: failed!, error: -19
    exit not allowed from main input shell.

    => fastboot 0
    g_dnl_register: failed!, error: -22
    exit not allowed from main input shell.

Despite that 0 is correct index for USB controller, "fastboot 0" command
will fail, because "composite" structure wasn't cleared properly on
previous fail (on "fastboot 2" command).

This patch fixes that erroneous behavior, allowing us to use composite
even after previous failure.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2016-03-01 14:47:26 +01:00
..
udc Various Makefiles: Add SPDX-License-Identifier tags 2015-11-10 09:19:52 -05:00
at91_udc.c usb: gadget: at91_udc: add at91_udc into U-Boot 2015-09-11 09:35:40 +02:00
at91_udc.h Add more SPDX-License-Identifier tags 2016-01-19 08:31:21 -05:00
atmel_usba_udc.c usb: modify usb_gadget_handle_interrupts to take controller index 2015-04-14 05:48:11 +02:00
atmel_usba_udc.h USB: gadget: add atmel usba udc driver 2013-09-24 17:51:35 +02:00
bcm_udc_otg.h usb: gadget: bcm_udc_otg files 2015-07-22 08:57:54 +02:00
bcm_udc_otg_phy.c usb: s3c-otg: Rename local headers to dwc2_*h 2015-12-17 21:54:40 +01:00
ci_udc.c usb:ci_udc: Remove ULPI setting for i.MX OTG controller 2016-01-16 07:06:55 +01:00
ci_udc.h ci_udc: Update the ci_udc driver to support bulk transfers 2015-05-29 12:41:04 +02:00
composite.c usb: gadget: composite: Correct recovery path for register 2016-03-01 14:47:26 +01:00
config.c Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
core.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
designware_udc.c linux/kernel.h: sync min, max, min3, max3 macros with Linux 2014-11-23 06:48:30 -05:00
dwc2_udc_otg.c usb: gadget: dwc2_udc_otg: modified the check condition for max packet size of ep_in in high speed 2016-02-04 12:38:26 +01:00
dwc2_udc_otg_phy.c usb: s3c-otg: Rename usb/s3c_udc.h to usb/dwc2_udc.h 2015-12-17 21:54:41 +01:00
dwc2_udc_otg_priv.h usb: s3c-otg: Rename usb/s3c_udc.h to usb/dwc2_udc.h 2015-12-17 21:54:41 +01:00
dwc2_udc_otg_regs.h usb: s3c-otg: Rename remaining macros 2015-12-17 21:54:40 +01:00
dwc2_udc_otg_xfer_dma.c usb: s3c-otg: Tweak the comments 2015-12-17 21:54:40 +01:00
ep0.c cosmetic: replace MIN, MAX with min, max 2014-09-24 18:30:29 -04:00
ep0.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
epautoconf.c Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
ether.c Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
f_dfu.c dfu: usb: f_dfu: Set deferred call for dfu_flush() function 2016-02-24 19:12:32 +01:00
f_dfu.h usb: dfu: f_dfu: Provide infrastructure to adjust DFU's Poll Timeout value 2013-12-18 19:53:19 +01:00
f_fastboot.c fastboot: update error and warning messages 2016-02-24 19:12:33 +01:00
f_mass_storage.c ums: support multiple LUNs at once 2016-01-13 21:05:19 -05:00
f_thor.c Move console definitions into a new console.h file 2015-11-19 20:27:50 -07:00
f_thor.h f_thor: Dont perform reset at the end of thor 2015-09-07 13:41:03 +02:00
fotg210.c usb: modify usb_gadget_handle_interrupts to take controller index 2015-04-14 05:48:11 +02:00
g_dnl.c usb: gadget: don't leak configs when unbinding 2015-09-11 17:15:21 -04:00
gadget_chips.h Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
Makefile usb: s3c-otg: Rename USB_GADGET_S3C_UDC_OTG* to USB_GADGET_DWC2_OTG* 2015-12-17 21:54:40 +01:00
mpc8xx_udc.c cosmetic: replace MIN, MAX with min, max 2014-09-24 18:30:29 -04:00
ndis.h USB: Add USB RNDIS gadget protocol 2011-02-19 20:32:37 +01:00
pxa25x_udc.c usb: modify usb_gadget_handle_interrupts to take controller index 2015-04-14 05:48:11 +02:00
pxa25x_udc.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
pxa27x_udc.c usb: pxa27x_udc: clean-up include file order 2015-08-24 20:30:38 +02:00
rndis.c Add more SPDX-License-Identifier tags 2016-01-19 08:31:21 -05:00
rndis.h Add more SPDX-License-Identifier tags 2016-01-19 08:31:21 -05:00
storage_common.c ums: support multiple LUNs at once 2016-01-13 21:05:19 -05:00
usbstring.c Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00