1
0
mirror of https://xff.cz/git/u-boot/ synced 2026-01-27 04:45:22 +01:00
Files
u-boot-megous/drivers
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
..
2017-06-01 07:03:13 -06:00
2017-09-04 09:02:07 -04:00
2017-08-16 08:30:24 -04:00
2017-09-18 20:40:35 +02:00
2017-09-22 07:40:02 -04:00
2017-09-25 17:28:16 -04:00
2017-09-22 07:39:57 -04:00
2017-07-28 12:02:47 -06:00
2017-09-22 07:40:01 -04:00
2017-08-16 08:30:24 -04:00
2016-02-06 12:00:59 +01:00
2017-06-01 07:03:10 -06:00
2017-06-01 07:03:01 -06:00
2017-05-18 11:23:31 +02:00
2017-06-01 07:03:01 -06:00
2017-08-13 15:17:31 -04:00