u-boot-2016/drivers/usb
Bin Meng 84aa8536f0 usb: sandbox: Fix emulator device select logic in usb_emul_find_devnum()
Current emulator select logic in usb_emul_find_devnum() is to test
the USB address. The USB address of the device being enumerated is
initialized to zero at the beginning of the enumeration process in
usb_setup_device(). At this point, the saved USB address in the
platform data has not been assigned to any valid USB address either.
This means: the logic will select an emulator device according to
its sequence of declaring order in the device tree. Take test.dts
for example, flash-stick@0 will be selected before flash-stick@1.
But unfortunately such logic is wrong.

In fact USB devices show up in a random order during the enumeration
which means usb_emul_find_devnum() may be called on port 3 for keyb@3
before on port 0 for flash-stick@0.

To fix this, we introduce a new emulator uclass specific platdata
to store the USB device's port number on its parent hub, and update
the logic to test the port number instead.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2017-10-01 16:32:50 +02:00
..
common fsl/usb: enable errata-a010151 for ls2088a and ls2081a 2017-08-01 08:28:56 -07:00
dwc3 usb: dwc3: fix Kconfig dependency to accept host driver in drivers/usb/dwc3 2017-08-28 22:32:34 +02:00
emul usb: sandbox: Fix emulator device select logic in usb_emul_find_devnum() 2017-10-01 16:32:50 +02:00
eth usb: net: migrate USB Ethernet adapters to Kconfig 2017-09-08 10:23:00 -04:00
gadget usb: dwc2: Align size of invalidating dcache before starting DMA 2017-09-27 12:12:23 +02:00
host usb: sandbox: Fix emulator device select logic in usb_emul_find_devnum() 2017-10-01 16:32:50 +02:00
musb omap4: Drop redundant CONFIG_OMAP4430 symbol 2017-05-15 10:39:59 -04:00
musb-new avr32: Retire AVR32 for good 2017-07-06 16:17:19 -04:00
phy treewide: replace #include <asm-generic/errno.h> with <linux/errno.h> 2016-09-23 22:25:27 -04:00
ulpi usb: ulpi: Fix compile warning in read/write on 64-bit machines. 2016-04-01 17:18:09 -04:00
Kconfig usb: kbd: Set a default polling mechanism for USB keyboard 2017-09-27 12:12:23 +02:00