diff options
author | Michal Simek <michal.simek@xilinx.com> | 2016-12-21 09:35:08 +0100 |
---|---|---|
committer | Marek Vasut <marek.vasut@gmail.com> | 2017-01-17 10:26:21 +0100 |
commit | b984700ca4b98597825fbc79c47e7a621889adaf (patch) | |
tree | 870a2ad03a0680e4dc9444c5fa873a5f296a7775 /common/usb_storage.c | |
parent | 59ef20303a54305b978453d5cc88f9aea2486021 (diff) |
usb: storage: Show number of storage devices detected for DM_USB
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) found
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'common/usb_storage.c')
-rw-r--r-- | common/usb_storage.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/usb_storage.c b/common/usb_storage.c index 0345aa22eff..b524a15e2bf 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -303,7 +303,6 @@ void usb_stor_reset(void) usb_max_devs = 0; } -#ifndef CONFIG_DM_USB /******************************************************************************* * scan the usb and reports device info * to the user if mode = 1 @@ -311,11 +310,12 @@ void usb_stor_reset(void) */ int usb_stor_scan(int mode) { - unsigned char i; - if (mode == 1) printf(" scanning usb for storage devices... "); +#ifndef CONFIG_DM_USB + unsigned char i; + usb_disable_asynch(1); /* asynch transfer not allowed */ usb_stor_reset(); @@ -329,12 +329,12 @@ int usb_stor_scan(int mode) } /* for */ usb_disable_asynch(0); /* asynch transfer allowed */ +#endif printf("%d Storage Device(s) found\n", usb_max_devs); if (usb_max_devs > 0) return 0; return -1; } -#endif static int usb_stor_irq(struct usb_device *dev) { |