26 Nov, 2017
1 commit
-
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
Reviewed-by: Bin Meng
Tested-by: Bin Meng
Reviewed-by: Simon Glass
17 Aug, 2017
1 commit
-
Instead of having separate code in the 'usb' command, adjust it to use
the common function.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
29 Jul, 2017
1 commit
-
USB 3.0 defines bMaxPacketSize0 field in the device descriptor as
the exponent of 2, so let's print the calculated actual size.Signed-off-by: Bin Meng
Reviewed-by: Simon Glass
Reviewed-by: Stefan Roese
Tested-by: Stefan Roese
17 Jan, 2017
1 commit
-
By enabling DM_USB information about number of storage devices
was lost.
Get this information back simply by printing number of devices detected
via BLK uclass.For example:
scanning bus 0 for devices... 7 USB Device(s) found
scanning usb for storage devices... 3 Storage Device(s) found
scanning usb for ethernet devices... 0 Ethernet Device(s) foundSigned-off-by: Michal Simek
05 Jul, 2016
2 commits
-
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 doTL;DR: proper iterating over usb bus root devs is hard, use the helper
for it.Reported-by: Bernhard Nortmann
Signed-off-by: Hans de Goede -
Iterating over usb-root devs and doing something for all of them is
a bit tricky with dm, factor out the proven usb_show_tree() for this
into a helper function.Signed-off-by: Hans de Goede
18 Jun, 2016
1 commit
-
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
Cc: Hans de Goede
Cc: Bin Meng
Cc: Marek Vasut
Cc: Stefan Roese
Cc: Marcel Ziswiler
Cc: Peng Fan
Cc: Stephen Warren
17 May, 2016
1 commit
-
This function is implemented by the legacy block functions now. Drop it.
Signed-off-by: Simon Glass
10 Apr, 2016
2 commits
-
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: Hans de Goede
-
The dm usb_kbd_remove function() will deregister the usb keyboard for
us on a "usb reset" / "usb stop" so there is no need to manually call
usb_kbd_deregister() in the dm case.This commit removes usb_kbd_deregister() in the dm case fixing the
following "usb reset" errors:usb_kbd_remove: warning, ret=-6
device_remove: Device 'usb_kbd' failed to remove, but children are goneSigned-off-by: Hans de Goede
15 Mar, 2016
3 commits
-
To ease conversion to driver model, add helper functions which deal with
calling each block device method. With driver model we can reimplement these
functions with the same arguments.Use inline functions to avoid increasing code size on some boards.
Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
Tested-by: Stephen Warren -
Rename three partition functions so that they start with part_. This makes
it clear what they relate to.Signed-off-by: Simon Glass
Tested-by: Stephen Warren -
Use 'struct' instead of a typdef. Also since 'struct block_dev_desc' is long
and causes 80-column violations, rename it to struct blk_desc.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
Tested-by: Stephen Warren
25 Jan, 2016
1 commit
-
Now that they are in their own directory, we can remove this prefix.
This makes it easier to find a file since the prefix does not get in the
way.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
Reviewed-by: Heiko Schocher
Acked-by: Stefan Roese
Acked-by: Przemyslaw Marczak