From patchwork Thu Nov 6 12:51:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Soeren Moch X-Patchwork-Id: 407436 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id DF2761400A8 for ; Thu, 6 Nov 2014 23:52:13 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 42CF14BFC1; Thu, 6 Nov 2014 13:52:12 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Gc6tKYVbpS9g; Thu, 6 Nov 2014 13:52:11 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 503844BF7D; Thu, 6 Nov 2014 13:52:11 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9388C4BF7D for ; Thu, 6 Nov 2014 13:52:07 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VHJFQ93pvn3u for ; Thu, 6 Nov 2014 13:52:07 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mout.web.de (mout.web.de [212.227.17.12]) by theia.denx.de (Postfix) with ESMTPS id 694814BF72 for ; Thu, 6 Nov 2014 13:52:04 +0100 (CET) Received: from platinum.vid.mst.uni-hannover.de ([130.75.30.51]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0M6DyQ-1Xwt0j3lkI-00y84h; Thu, 06 Nov 2014 13:52:04 +0100 From: Soeren Moch To: u-boot@lists.denx.de Date: Thu, 6 Nov 2014 13:51:51 +0100 Message-Id: <1415278311-3090-1-git-send-email-smoch@web.de> X-Mailer: git-send-email 1.9.1 X-Provags-ID: V03:K0:8hGHD3tZMv1fRB//nsYuofE1ROpSdGCP/jOkwPvnKCBNriBWj2u kCq9JY2F5Q7nxovRojSQYqNp8l6KUrEhAU/0g43HRpxBuFi8PiLPmTWB8uXPN5WM9R80wH6 Ph9KGWfB80kAR0DoKesW+363NhJOTQ/hrWH0mCoGYNkheGLDHcnLO7mm6bBf+Lz8VTsyeht docik+3srxysNo/BVWfqQ== X-UI-Out-Filterresults: notjunk:1; Cc: Marek Vasut , Tom Rini , Soeren Moch Subject: [U-Boot] [PATCH] usb_storage: skip all unknown devices when probing X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 --- Cc: Marek Vasut Cc: Tom Rini --- 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; }