From: Soeren Moch Date: Sat, 8 Nov 2014 07:02:14 +0100 Subject: [U-Boot] [PATCH] usb_storage: blacklist Enclosure Service Devices In-Reply-To: <1415278311-3090-1-git-send-email-smoch@web.de> References: <1415278311-3090-1-git-send-email-smoch@web.de> Message-ID: <1415426534-10331-1-git-send-email-smoch@web.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 -- 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 Cc: Tom Rini --- common/usb_storage.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/usb_storage.c b/common/usb_storage.c index eb7706c..9198f73 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -1351,8 +1351,9 @@ 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 */ + if (((perq & 0x1f) == 0x1f) || ((perq & 0x1f) == 0x0d)) { + /* skip unknown devices and enclosure service devices, */ + /* they would not respond to test_unit_ready */ return 0; } if ((modi&0x80) == 0x80) { -- 1.9.1