Commit 192eab93 authored by Hans de Goede's avatar Hans de Goede Committed by Marek Vasut

dm: usb: Do not reprobe usb hosts on "usb tree" command

Some usb hosts may have failed to probe on "usb start", i.e. an otg
host without an otg-host cable plugged in.

"usb tree" would cause the probe method of these hosts to get called
again, something which should only happen on "usb reset".

This commit fixes this.
Signed-off-by: default avatarHans de Goede <>
parent bf313230
......@@ -15,6 +15,7 @@
#include <command.h>
#include <console.h>
#include <dm.h>
#include <dm/uclass-internal.h>
#include <memalign.h>
#include <asm/byteorder.h>
#include <asm/unaligned.h>
......@@ -442,12 +443,15 @@ void usb_show_tree(void)
struct udevice *bus;
for (uclass_first_device(UCLASS_USB, &bus);
for (uclass_find_first_device(UCLASS_USB, &bus);
uclass_next_device(&bus)) {
uclass_find_next_device(&bus)) {
struct usb_device *udev;
struct udevice *dev;
if (!device_active(bus))
device_find_first_child(bus, &dev);
if (dev && device_active(dev)) {
udev = dev_get_parent_priv(dev);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment