From patchwork Fri Apr 12 11:04:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Gautam X-Patchwork-Id: 16082 Return-Path: X-Original-To: linaro@staging.patches.linaro.org Delivered-To: linaro@staging.patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EC51C26EB0 for ; Fri, 12 Apr 2013 11:07:23 +0000 (UTC) Received: by mail-lb0-f199.google.com with SMTP id p11sf3343650lbi.6 for ; Fri, 12 Apr 2013 04:06:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-auditid:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-brightmail-tracker:x-brightmail-tracker :dlp-filter:x-mtr:x-cfilter-loop:x-gm-message-state :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-google-group-id:list-post:list-help :list-archive:list-unsubscribe; bh=o63Cv278hN7ozFSyiaNlqQ3hcb1NUjiOeWZuf3Zj0tE=; b=o1/lG8tup4zGNQ5HgnJKPKGoBG+JA12B3dWOi+NQFY+h/zDk827AZ2XTdBdXu8f2DY nKjD/XMspF0G2xJlvrJ7uTejqURdqNU885seaVNF0c6ORMZanRuVReLa/ZKXhfnPR8zd vlwk6fHM5Wg9KGCJ6rNsK95/Dwh5wqsQ9crtwfhk5ZFI5wFZkKPZlw5sb/vekGZc/440 QkELxjedCH/GyxtkDltJGhd82wqIgTF1BKUeDaaiicnPlYvgreiKYCpu95nGgTdWRMc4 T55voZTU05RY2cu+wDMU75QDKPBYz4Ebrp2ESn9ivi5OnSkBuU+KdgV8SKEpOZJF9H6h lAZg== X-Received: by 10.180.92.202 with SMTP id co10mr581219wib.1.1365764819047; Fri, 12 Apr 2013 04:06:59 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.180.84.198 with SMTP id b6ls480985wiz.53.canary; Fri, 12 Apr 2013 04:06:58 -0700 (PDT) X-Received: by 10.194.81.40 with SMTP id w8mr16636363wjx.14.1365764818978; Fri, 12 Apr 2013 04:06:58 -0700 (PDT) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id w15si2916884wjq.135.2013.04.12.04.06.58 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Apr 2013 04:06:58 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.172; Received: by mail-ve0-f172.google.com with SMTP id oz10so2341866veb.3 for ; Fri, 12 Apr 2013 04:06:57 -0700 (PDT) X-Received: by 10.52.163.231 with SMTP id yl7mr6837772vdb.57.1365764817839; Fri, 12 Apr 2013 04:06:57 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp60880veb; Fri, 12 Apr 2013 04:06:57 -0700 (PDT) X-Received: by 10.66.162.67 with SMTP id xy3mr14615532pab.94.1365764816072; Fri, 12 Apr 2013 04:06:56 -0700 (PDT) Received: from mailout2.samsung.com (mailout2.samsung.com. [203.254.224.25]) by mx.google.com with ESMTP id tz4si8955459pab.4.2013.04.12.04.06.55; Fri, 12 Apr 2013 04:06:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of gautam.vivek@samsung.com designates 203.254.224.25 as permitted sender) client-ip=203.254.224.25; Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0ML500J0I2VHHWY0@mailout2.samsung.com> for patches@linaro.org; Fri, 12 Apr 2013 20:06:54 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.126]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id 06.6B.07735.ECAE7615; Fri, 12 Apr 2013 20:06:54 +0900 (KST) X-AuditID: cbfee68e-b7f946d000001e37-66-5167eace34ad Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id EA.44.17838.ECAE7615; Fri, 12 Apr 2013 20:06:54 +0900 (KST) Received: from vivekkumarg-linuxpc.sisodomain.com ([107.108.214.169]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0ML500IF52UIWD90@mmp2.samsung.com>; Fri, 12 Apr 2013 20:06:54 +0900 (KST) From: Vivek Gautam To: u-boot@lists.denx.de Cc: u-boot-review@google.com, patches@linaro.org, marex@denx.de, rajeshwari.s@samsung.com, sjg@chromium.org, vikas.sajjan@samsung.com, amarendra.xt@samsung.com, vipin.kumar@st.com, gautam.vivek@samsung.com Subject: [PATCH v3 5/8] usb: hub: Fix enumration timeout Date: Fri, 12 Apr 2013 16:34:37 +0530 Message-id: <1365764680-10917-6-git-send-email-gautam.vivek@samsung.com> X-Mailer: git-send-email 1.7.6.5 In-reply-to: <1365764680-10917-1-git-send-email-gautam.vivek@samsung.com> References: <1365764680-10917-1-git-send-email-gautam.vivek@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupjkeLIzCtJLcpLzFFi42JZI2JSp3vuVXqgwbs2VYsvCzrZLdquHGS3 eNPWyGgx5fAXFouWtQdYLb5t2cZosfz1RnaLt3uBSm4+285k8e/SNVYHLo/ZDRdZPObNOsHi sWBTqceda3vYPM7e2cHo0bdlFaPH0x97mQPYo7hsUlJzMstSi/TtErgyvk7jLHjAXtE16Qtj A+N8ti5GTg4JAROJT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mlb9khdnlIrOzfzTKBkXcBI8Mq RtHUguSC4qT0XEO94sTc4tK8dL3k/NxNjOCoeya1g3Flg8UhRgEORiUe3hfC6YFCrIllxZW5 hxglOJiVRHhj9qYFCvGmJFZWpRblxxeV5qQWH2JMBrpqIrOUaHI+MCHklcQbGpuYmxqbWppY mJhZkiasJM57oNU6UEggPbEkNTs1tSC1CGYLEwenVAPj1p4SfY1Vx8VveN11jTqmHWfnFl9i mz11rXp5yY4zmtLlWTW+K1wUWDTOLfVd/2ZyQPzB/rls9Wk5jYemTZ4tFHqOf9mliTtWMc2e ttKlTjCqR9GtSeruoxyjNfuLA9+Wnu68VVEt6vrWvedmM1NQ0PK4OafiHl7/sGP+U5HgY4Ub DjVe3J+ixFKckWioxVxUnAgAHUFLmv4CAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected X-Gm-Message-State: ALoCoQnGUEJnn0/rj4cnxCEvZLjZXNkJooX1/9kojTF2Wc9CpPc4U7KakNeWG11ciUaRglRtZetS X-Original-Sender: gautam.vivek@samsung.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Patch b6d7852c increases timeout for enumeration, taking worst case to be 10 sec. get_timer() api returns timestamp in milliseconds, which is what we are checking in the do-while() loop in usb_hub_configure() (get_timer(start) < CONFIG_SYS_HZ * 10). This should give us a required check for 10 seconds, and thereby we don't need to add additional mdelay of 100 microseconds in each cycle. Signed-off-by: Vivek Gautam Reviewed-by: Vipin Kumar --- Changes from v2: - none common/usb_hub.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/common/usb_hub.c b/common/usb_hub.c index e4f4e3c..ab41943 100644 --- a/common/usb_hub.c +++ b/common/usb_hub.c @@ -443,7 +443,6 @@ static int usb_hub_configure(struct usb_device *dev) (portstatus & USB_PORT_STAT_CONNECTION)) break; - mdelay(100); } while (get_timer(start) < CONFIG_SYS_HZ * 10); if (ret < 0)