summaryrefslogtreecommitdiff
path: root/common/usb_storage.c
diff options
context:
space:
mode:
authorSoeren Moch <smoch@web.de>2014-11-08 07:02:14 +0100
committerMarek Vasut <marex@denx.de>2014-11-08 12:03:35 +0100
commit6a559bbe2f60ab64e28662f7ab52551a2eaa7163 (patch)
tree38c4d27f11842127e4fd5a6cff2d5b3fb0a4899e /common/usb_storage.c
parent3908f16f859c6b304fae050102d45be5a2e295bf (diff)
downloadu-boot-imx-6a559bbe2f60ab64e28662f7ab52551a2eaa7163.zip
u-boot-imx-6a559bbe2f60ab64e28662f7ab52551a2eaa7163.tar.gz
u-boot-imx-6a559bbe2f60ab64e28662f7ab52551a2eaa7163.tar.bz2
usb_storage: blacklist Enclosure Service Devices
Skip enclosure service devices when probing for usb storage devices. This avoids long timeouts when probing for external usb harddisks which provide "Enclosure Services". Signed-off-by: Soeren Moch <smoch@web.de> -- This is a new version of the patch "usb_storage: skip all unknown devices when probing" http://http://lists.denx.de/pipermail/u-boot/2014-November/194622.html Cc: Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@ti.com>
Diffstat (limited to 'common/usb_storage.c')
-rw-r--r--common/usb_storage.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/common/usb_storage.c b/common/usb_storage.c
index eb7706c..1411737 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -1351,8 +1351,11 @@ 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) {
- /* skip unknown devices */
+ /*
+ * Skip unknown devices (0x1f) and enclosure service devices (0x0d),
+ * they would not respond to test_unit_ready .
+ */
+ if (((perq & 0x1f) == 0x1f) || ((perq & 0x1f) == 0x0d)) {
return 0;
}
if ((modi&0x80) == 0x80) {