]> git.dujemihanovic.xyz Git - u-boot.git/commit
cmd: usb: ignore blk, emulation devices in usb tree/info display
authorSuneel Garapati <suneelglinux@gmail.com>
Tue, 24 Oct 2017 00:28:40 +0000 (17:28 -0700)
committerMarek Vasut <marek.vasut+renesas@gmail.com>
Sun, 26 Nov 2017 01:22:36 +0000 (02:22 +0100)
commitabd7cedb19ab7979467734b3933a39879bd8935a
treed05f280eb69d50e7f19412ad28da77fefc53ce49
parent93a51d301ad051ec6f8c6016862c7719b8b434d3
cmd: usb: ignore blk, emulation devices in usb tree/info display

Usb tree/info commands iterate over all usb uclass devices recursively.
Blk uclass devices based on struct blk_desc are created for mass storage
device, treating them as usb uclass devices based on struct usb_device
and referencing usb config interface descriptors cause crash.
To fix, ignore blk and usb_emul uclass devices in usb_show_info
and usb_tree_graph. Also avoid addition of preamble for blk uclass
child devices, otherwise tree dump gets messed up.

Signed-off-by: Suneel Garapati <suneelglinux@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
cmd/usb.c