Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1400005ybp; Thu, 17 Oct 2019 12:13:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqykjN9+hwJ8XK72nZ0f6hIr1A2tcPNSP0R37df2nrm2P/8ma57MjxD82pA73u0nNIPkke7c X-Received: by 2002:a17:906:538a:: with SMTP id g10mr4973473ejo.94.1571339589820; Thu, 17 Oct 2019 12:13:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571339589; cv=none; d=google.com; s=arc-20160816; b=qv+igvuanfWnFD/oQtipq+L5b1MxsWqfvCRv2hlxmQ1U8LMRxK4RbeISAuEoUgZ53z XbpAQ2C3p1NUDLYEaZzMfFktObETutf2wLh67a68N1LRqz5TUDKcZB40HZ+TGYlJqNbb 3FD8WTO2hjPe//UoBlOvUYkx3K/wRzRyX+4QKOCvDI07xzlVHLU+v5GzksVNc6gKWcHY 9GgSYYPZrDisePymTZfYKQZ87L6qg7vYTARNJF9h/ICHWRBhW5YIVR9/rXInMB05pz94 OoMvpqMkTFgi43FH+J5ralrp4QhmCN1HMQfyGIVGbFehOuRbtTKI7wkjBAF23j6HqvDD XozA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=EQwjOzxsSJBdY4v5ybiyIQDZcLPhd7kYL4INBvbTk3U=; b=Iqm7XOQGeeD0lvSxYBsvY1hz4mTqMOqXvijt2SQ5tPbx3vfLBBi49hGVtdJkbFhTX1 ioQ+8h70Drf76JzTRgNghqK0YcxJBOcIWbNT3pZHUdrTmb/cUNKug+iJD3OP3WfUnvNw mzywxSBIlo5+wcS5OmYK1ER2whuD68lHhCEXIeoj4Pz1Z16uRnFJtsPfilw8Ez7bEhXB QiVqagUVv78P0eVKrGWXfU2umaOAdynTUgv9iL1mNbe1eaPXv4E/HUd/tkmS5coSvcxY ye6bol5CYryLVEVzwUORGfgIYmIjYuXEQyXbYTza0c4ofJkXe6JAoyo6HX+Xw+gxdTeM DNdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jnPZqFTO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 2si2114245ejq.243.2019.10.17.12.12.46; Thu, 17 Oct 2019 12:13:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jnPZqFTO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393511AbfJPWOE (ORCPT + 99 others); Wed, 16 Oct 2019 18:14:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:46672 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2395309AbfJPVzm (ORCPT ); Wed, 16 Oct 2019 17:55:42 -0400 Received: from localhost (unknown [192.55.54.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9BC8521D7E; Wed, 16 Oct 2019 21:55:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571262941; bh=azaKT2C62TPRSsYE+ckZPK4Di2dsoBRGaz19NRo69Rc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jnPZqFTObqfxpV+6zexcsLo6YB/HliQT7bWLIvc2fCznlqFVD3IM6pLVFajKmhH4k 9U5rncGb8WDlG7ozOcv95FgEuyuXbQBA/V2W6iEdN/RfSLxrY593K8fFUcQknopWSP I6Czx5ced87S2xdsTbNgR6vZ+xnzp7X/7SxuSys8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kai-Heng Feng , Mathias Nyman Subject: [PATCH 4.14 12/65] xhci: Increase STS_SAVE timeout in xhci_suspend() Date: Wed, 16 Oct 2019 14:50:26 -0700 Message-Id: <20191016214805.437728649@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191016214756.457746573@linuxfoundation.org> References: <20191016214756.457746573@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kai-Heng Feng commit ac343366846a445bb81f0a0e8f16abb8bd5d5d88 upstream. After commit f7fac17ca925 ("xhci: Convert xhci_handshake() to use readl_poll_timeout_atomic()"), ASMedia xHCI may fail to suspend. Although the algorithms are essentially the same, the old max timeout is (usec + usec * time of doing readl()), and the new max timeout is just usec, which is much less than the old one. Increase the timeout to make ASMedia xHCI able to suspend again. BugLink: https://bugs.launchpad.net/bugs/1844021 Fixes: f7fac17ca925 ("xhci: Convert xhci_handshake() to use readl_poll_timeout_atomic()") Cc: # v5.2+ Signed-off-by: Kai-Heng Feng Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/1570190373-30684-8-git-send-email-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/xhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -968,7 +968,7 @@ int xhci_suspend(struct xhci_hcd *xhci, writel(command, &xhci->op_regs->command); xhci->broken_suspend = 0; if (xhci_handshake(&xhci->op_regs->status, - STS_SAVE, 0, 10 * 1000)) { + STS_SAVE, 0, 20 * 1000)) { /* * AMD SNPS xHC 3.0 occasionally does not clear the * SSS bit of USBSTS and when driver tries to poll