[U-Boot] [PATCH 2/2] usb: dm: Make "usb info" use usb_for_each_root_dev()

Simon Glass sjg at chromium.org
Mon Jul 4 01:18:05 CEST 2016


On 3 July 2016 at 12:22, Hans de Goede <hdegoede at redhat.com> wrote:
> The old dm "usb info" implementation has several issues:
>
> 1) NULL pointer deref when a bus has no children
> 2) Not showing usb devices on busses without an emulated root-hub (otg host)
> 3) Attempting to show devices on inactive busses
> 4) "usb info" Would cause some hosts to get re-probed something which only
>    "usb reset" should do
>
> TL;DR: proper iterating over usb bus root devs is hard, use the helper
> for it.
>
> Reported-by: Bernhard Nortmann <bernhard.nortmann at web.de>
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> ---
>  cmd/usb.c | 31 ++++++-------------------------
>  1 file changed, 6 insertions(+), 25 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list