[U-Boot] [UBOOT] [PATCH] cmd: usb: ignore block devices under mass storage device

Suneel Garapati suneelglinux at gmail.com
Fri Sep 1 07:35:13 UTC 2017


Hi,

On Thu, Aug 31, 2017 at 11:30 PM, Lothar Waßmann <LW at karo-electronics.de> wrote:
> Hi,
>
> On Thu, 10 Aug 2017 22:53:31 -0700 Suneel Garapati wrote:
>> usb tree and info commands may cause crash otherwise
>>
>> Signed-off-by: Suneel Garapati <suneelglinux at gmail.com>
>> ---
>>  cmd/usb.c | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/cmd/usb.c b/cmd/usb.c
>> index 992d414..81e1a7b 100644
>> --- a/cmd/usb.c
>> +++ b/cmd/usb.c
>> @@ -415,7 +415,8 @@ static void usb_show_tree_graph(struct usb_device *dev, char *pre)
>>               udev = dev_get_parent_priv(child);
>>
>>               /* Ignore emulators, we only want real devices */
>> -             if (device_get_uclass_id(child) != UCLASS_USB_EMUL) {
>> +             if (device_get_uclass_id(child) !=
>> +                 (UCLASS_USB_EMUL | UCLASS_BLK)) {
>>
> This should most probably be:
>> +             if ((device_get_uclass_id(child) != UCLASS_USB_EMUL) &&
>                         (device_get_uclass_id(child) != UCLASS_BLK)) {
Agree. Will make change in v1.

Regards,
Suneel
>
>
> Lothar Waßmann


More information about the U-Boot mailing list