public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] usb_storage: skip all unknown devices when probing
@ 2014-11-06 12:51 Soeren Moch
  2014-11-06 20:41 ` Marek Vasut
  2014-11-08  6:02 ` [U-Boot] [PATCH] usb_storage: blacklist Enclosure Service Devices Soeren Moch
  0 siblings, 2 replies; 7+ messages in thread
From: Soeren Moch @ 2014-11-06 12:51 UTC (permalink / raw)
  To: u-boot

Not only skip storage devices with DEV_TYPE_UNKNOWN, but also all devices
which are unknown to u-boot (e.g., are not HARDDISK, TAPE, CDROM, OPDISK).

This especially avoids long timeouts when probing for external usb harddisks
which provide "Enclosure Services".

Signed-off-by: Soeren Moch <smoch@web.de>
--
Cc: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@ti.com>
---
 common/usb_storage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/usb_storage.c b/common/usb_storage.c
index eb7706c..0ac7b48 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -1351,7 +1351,7 @@ int usb_stor_get_info(struct usb_device *dev, struct us_data *ss,
 	perq = usb_stor_buf[0];
 	modi = usb_stor_buf[1];
 
-	if ((perq & 0x1f) == 0x1f) {
+	if ((perq & 0x1f) > DEV_TYPE_OPDISK) {
 		/* skip unknown devices */
 		return 0;
 	}
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-11-08 11:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-06 12:51 [U-Boot] [PATCH] usb_storage: skip all unknown devices when probing Soeren Moch
2014-11-06 20:41 ` Marek Vasut
2014-11-07  9:28   ` Soeren Moch
2014-11-07  9:29     ` Marek Vasut
2014-11-08  6:02 ` [U-Boot] [PATCH] usb_storage: blacklist Enclosure Service Devices Soeren Moch
2014-11-08  6:28   ` Nikolay Dimitrov
2014-11-08 11:04   ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox