From patchwork Thu Jun 7 18:48:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajay Gupta X-Patchwork-Id: 10453407 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E98F960467 for ; Thu, 7 Jun 2018 18:48:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA5D529B03 for ; Thu, 7 Jun 2018 18:48:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CECA029B98; Thu, 7 Jun 2018 18:48:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7684029BDF for ; Thu, 7 Jun 2018 18:48:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932363AbeFGSs4 (ORCPT ); Thu, 7 Jun 2018 14:48:56 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:45083 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932295AbeFGSsy (ORCPT ); Thu, 7 Jun 2018 14:48:54 -0400 Received: by mail-pg0-f68.google.com with SMTP id z1-v6so5166432pgv.12 for ; Thu, 07 Jun 2018 11:48:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=29yRPmf/lmvFIAxNq5fpVmPUyrGIqSwH3nXeZJXzT4w=; b=FhY9Gr0BwqjC1ydips0dJfV1WRo6EaeMa1CnU5L25QLLjZDd3LSAKR5cFmN9EE+y5J 6rwDmFFjz046N4+VZtQVEglmXIHKZ9ajjweVDXtS+BMrAbmI/w2HWj78w7eLd+L2Ajy/ oQttrbRjDOJlN6YkPnHoRPv2gKNEKLD0WawPVotABr4zkvJcHvRHsGiHxHJ6gclfyD5z hH8N45VtQ0Pbjs09y5+Ye0IvBh99Si/VRU0Y/yVcd6fAaf/NA4xhAs2t0u3Hjqd8PHCn ugxoO276/SMw0WlrLolaxrXssem4LPFYozytc7XIi/9kPr2pxPICpTV7Ok+UbJj8yBGm xE1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=29yRPmf/lmvFIAxNq5fpVmPUyrGIqSwH3nXeZJXzT4w=; b=cuy7cnoeM73/uOqQG87EpJbng6kXSlRLpm0RzM4YWO3gYmwI3loNHaomuHMWn5riJm TL0x1K9AUC5eM8g7AJ86fLjYOIJ5NVaHDxF4QEu7eCEK77820BDdhs1wOj1f/VPQD54U zzdG/IghXE5zJhTDGCgNKp7lk6y8nsbpH3Y0WTVl2LOkx7rNGTn8TYcoHwHs+PXnPOlS MRaLmNyFWWR17rY+rT2CiWLiIhHLHbLVr9gk16b1VxLNGVnW39kulUrnfOJJ33VXpib9 VlwK5Qs2udmasB8saxVzQ21jaMg2rSfqD40Z3pI9VFcW3VmCiaYM/y4LQdy9LDGGlRS6 bTww== X-Gm-Message-State: APt69E1jJ5jE80MLKSn/RyuqmK6L4JK3GGloFCHWTVI0wf9yAMVnkp34 fN870bJx5Zuk+C43WbQETPeQgA== X-Google-Smtp-Source: ADUXVKLmWqWJYbgeJu+FsMmBSfFYcb18YH1CzlgIGqSp7vUij8KJhojhuEu8w3Uodas63RpTV3oZQQ== X-Received: by 2002:a62:9513:: with SMTP id p19-v6mr2808099pfd.239.1528397333546; Thu, 07 Jun 2018 11:48:53 -0700 (PDT) Received: from ajayg.nvidia.com (thunderhill.nvidia.com. [216.228.112.22]) by smtp.gmail.com with ESMTPSA id q200-v6sm51882761pgq.9.2018.06.07.11.48.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Jun 2018 11:48:52 -0700 (PDT) From: Ajay Gupta To: linux-usb@vger.kernel.org Cc: felipe.balbi@linux.intel.com, Ajay Gupta , Nagaraj Annaiah Subject: [PATCH] usb: xhci: increase CRS timeout value Date: Thu, 7 Jun 2018 11:48:39 -0700 Message-Id: <1528397319-30510-1-git-send-email-ajaykuee@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some controllers take almost 55ms to complete controller restore state (CRS). There is no timeout limit mentioned in xhci specification so fix the issue by increasing the timeout limit to 55ms Signed-off-by: Ajay Gupta Signed-off-by: Nagaraj Annaiah --- drivers/usb/host/xhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 8c8da2d..44b1af5 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -1044,7 +1044,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated) command |= CMD_CRS; writel(command, &xhci->op_regs->command); if (xhci_handshake(&xhci->op_regs->status, - STS_RESTORE, 0, 10 * 1000)) { + STS_RESTORE, 0, 55 * 1000)) { xhci_warn(xhci, "WARN: xHC restore state timeout\n"); spin_unlock_irq(&xhci->lock); return -ETIMEDOUT;