Re: [U-Boot] [PATCH] cmd: usb: check if_type before using this device

2016-06-17 Thread Simon Glass
On 17 June 2016 at 00:18, Peng Fan wrote: > For legacy usb storage driver, USB_MAX_STOR_DEV is defined as 7. > If we only have one usb disk on board, `usb dev 0` is ok. > But if `usb dev 1`, still ok, then `usb read xxx` will trigger > system fault and reboot. > > So check if_type before using thi

Re: [U-Boot] [PATCH] cmd: usb: check if_type before using this device

2016-06-17 Thread Marek Vasut
On 06/17/2016 08:18 AM, Peng Fan wrote: > For legacy usb storage driver, USB_MAX_STOR_DEV is defined as 7. > If we only have one usb disk on board, `usb dev 0` is ok. > But if `usb dev 1`, still ok, then `usb read xxx` will trigger > system fault and reboot. > > So check if_type before using this

[U-Boot] [PATCH] cmd: usb: check if_type before using this device

2016-06-16 Thread Peng Fan
For legacy usb storage driver, USB_MAX_STOR_DEV is defined as 7. If we only have one usb disk on board, `usb dev 0` is ok. But if `usb dev 1`, still ok, then `usb read xxx` will trigger system fault and reboot. So check if_type before using this device. Signed-off-by: Peng Fan Cc: Simon Glass C