Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp228766ybg; Thu, 17 Oct 2019 22:00:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqygrg2No4CSZPxPZRZ2/8Yi/fu1mOC+5gyKOUe5y0DUA4xqxW/M3Bw87h2AVBLTITIYzAyy X-Received: by 2002:a05:6402:b03:: with SMTP id bm3mr7661090edb.112.1571374819459; Thu, 17 Oct 2019 22:00:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571374819; cv=none; d=google.com; s=arc-20160816; b=q+KQehFvpTflKI/YpzBzFNaHDH4X897/jXkKQrIn+oYvV8kMd9l5WTl3spf3LUYlBD 9ADaCjEi1TCh49eoDJxEIhmPQbVxp/+RF/WFDRZa6U3CpIXUeKRLwebWE5w8leDz/FdH RJEKELi/xgNKy9Hu3evDqv+feVnnQ/Mkv81DRmJ5uSTOiI1g099X3FYgr+Nps056loZX H/0/rmROSbc5L3FSGOiDl3Nea64/iRHpzm+SQHfzffIUjL9iztkHqWqs+D4Vk8WPUtIn FMErxxtbbSNPVZ9qwOdmc5+9V6eHpmgfLEyccuQ7BCz2VS3K/VILCZVjxdqYEmzVrDK9 Ey1g== 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=7RSiXtbT3uow7SjSSUojQioCuRRsUj7/8FRgYrrLuVc=; b=hsCN1bMxb+uJXT+ntcKrkPjU3JgbS9KzA+v43EdD2kcwBFoTcvuxeJ7dhUXOjRtpvs EYTriABlZHIsPbu9VyJXPiusJYD/k7pKytsWfMR6qfe2g9zUuEhpSOKV7fMNU/ixBe43 b8Lg5wGo/AK3CBIlGyGWdB43fdQQ1TjvI5qYWhFBhi2JHA6/SXv3BZjFuXYmXyERMJeH CjTEmaxCfS471yjYFMrmt/nMrtnn8Zs/Yydu0cJEPhisvCOh7wVBLmkm/ZCZQcN3z5tU WuZBhFdZkIzEreedQHR3MmBa518oreuhDoNWjS3D2v0+P49UKMNjd8Ull/TLy1tIqAta eH6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=a3RMYVAC; 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 f7si2619812ejt.155.2019.10.17.21.59.55; Thu, 17 Oct 2019 22:00:19 -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=a3RMYVAC; 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 S1733162AbfJPWR1 (ORCPT + 99 others); Wed, 16 Oct 2019 18:17:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:44928 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390357AbfJPVyu (ORCPT ); Wed, 16 Oct 2019 17:54:50 -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 97BEE21D7F; Wed, 16 Oct 2019 21:54:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571262889; bh=GPJ7645YJnOFEkI99cyW6COELt9QMB3Y1uScwAJPgh4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a3RMYVACl3hgyPHk1ahsiyqzKL7VnRFb5rZ7t3mvm1DqEhhU+cWrJXwFMCREkw+aR KoxsbH2EKEE6Nfsw3410ozNGtwJh5+IAOEiAxKJAx4ebvNFUaUBhvMO8n0VfH5CiS7 K7In1tBd+k91e5MZhXPFpyaxXoKynZTvtps3oP4A= 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.9 46/92] xhci: Increase STS_SAVE timeout in xhci_suspend() Date: Wed, 16 Oct 2019 14:50:19 -0700 Message-Id: <20191016214834.250667060@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191016214759.600329427@linuxfoundation.org> References: <20191016214759.600329427@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 @@ -985,7 +985,7 @@ int xhci_suspend(struct xhci_hcd *xhci, command |= CMD_CSS; writel(command, &xhci->op_regs->command); if (xhci_handshake(&xhci->op_regs->status, - STS_SAVE, 0, 10 * 1000)) { + STS_SAVE, 0, 20 * 1000)) { xhci_warn(xhci, "WARN: xHC save state timeout\n"); spin_unlock_irq(&xhci->lock); return -ETIMEDOUT;