diff options
author | Hans de Goede <hdegoede@redhat.com> | 2015-06-17 21:33:50 +0200 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-07-21 17:39:35 -0600 |
commit | c27b329054a42bcfb19d3b192dc44e1182fea264 (patch) | |
tree | cd9b489eeebad9eff7628a6c8fc3a55da70c0beb /drivers | |
parent | bb52b367f6ca4a3a918e77737f4ff6a1089912d9 (diff) | |
download | u-boot-imx-c27b329054a42bcfb19d3b192dc44e1182fea264.zip u-boot-imx-c27b329054a42bcfb19d3b192dc44e1182fea264.tar.gz u-boot-imx-c27b329054a42bcfb19d3b192dc44e1182fea264.tar.bz2 |
dm: usb: Fix "usb tree" output
last_child was abused by the old usb code to first store 1 if the
usb_device was not the root of the usb tree, and then later on re-used
to store whether or not the usb_device is actually the last child.
The dm-usb code was always setting it to actually reflect the last-child
status which is wrong for the last child leading to output like this:
USB device tree:
1 Hub (12 Mb/s, 100mA)
| ALCOR USB Hub 2.0
|
| 2 Mass Storage (12 Mb/s, 100mA)
| USB Flash Disk 4C0E960F
|
+-3 Human Interface (1.5 Mb/s, 100mA)
SINO WEALTH USB Composite Device
Instead of this:
USB device tree:
1 Hub (12 Mb/s, 100mA)
| ALCOR USB Hub 2.0
|
+-2 Mass Storage (12 Mb/s, 100mA)
| USB Flash Disk 4C0E960F
|
+-3 Human Interface (1.5 Mb/s, 100mA)
SINO WEALTH USB Composite Device
This commit fixes this by first checking that the device is not root,
and then setting last_child. This commit also updates the old code to not
abuse the last_child variable to store the root check result.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions