Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp235742ybg; Thu, 17 Oct 2019 22:07:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqzgJh8468pgVNkryCNeoY+qlykHBjnvnsSk1HiMLTfTfRaVSCzNvcUzVIG5Ms4OmoYbzh0j X-Received: by 2002:a17:906:f847:: with SMTP id ks7mr6909490ejb.213.1571375237222; Thu, 17 Oct 2019 22:07:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571375237; cv=none; d=google.com; s=arc-20160816; b=Y5ZXyWfRBe5HEo3LvaFZNcU7r+L3EhrSdV5y74YA7ZXI1pzCQWC+z/2N3AFjP9xIfq xlY3nyWfHeFmGUDNLWRuE+czwfw0MvEleC4Uz+Kxt+U8AGxpruq1ip1IJtN3weMGsATw 7nYq8vjqGbqtODJSV+jCDN86FVrZpvSuMKG2KauS5G99ZV+/mHk8eWUkt4Q/PYcLGel6 RzcYbyOyTni9m/IMp33g3iTfEmUUSymNXaKVtTuIPzXLS7itz1pfCLBvS9CrjrAEcotV xPguPXBnAXTqJ6ruWhNjYfb97d27vvnukJSay5+/2dn869t3RRTGigVNOk8y6LyDsA64 E3kg== 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=MvqOXd5VDmvgNDEyJptB46vQHAD9YWbKvng0EL+8pfg=; b=YGPSjXUPMUO5PQDtGq28WEjwDM65qv4jG9O2Xlxsq8nlP/1p91CTxH2mvZx8JNU1bT AbCw9WLV/wXLgSLjqGbbqVXIAmBn7Zu+wW8YEAEt36s2xXtDgd4QrL054LA0xJ+gy314 OiWkP5y9Olbr8PUDl58uPaXngqQVXSpwiN4ygMZHUulk3TH6lnkZuoFVs7q7nR3lYftB MzX7SCVEqZUY7jGeETPHuioo2ajnljXd6UXqYJ8BKCp3babCsEfc4Ny6ZLW2NnfVEib8 QKo97yMhyZwzmNB8pN9e1p2NHh81bi/dpJQ/utVvYkGS9FXhz1SvWkhVnvRu0/FFqUEK K77g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Oq+HWOt0; 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 q20si2800441ejn.18.2019.10.17.22.06.53; Thu, 17 Oct 2019 22:07:17 -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=Oq+HWOt0; 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 S2407627AbfJPWWS (ORCPT + 99 others); Wed, 16 Oct 2019 18:22:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:42020 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437500AbfJPVxS (ORCPT ); Wed, 16 Oct 2019 17:53:18 -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 C269521925; Wed, 16 Oct 2019 21:53:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571262797; bh=xnki3rbLWJLf5BLKRUN6w4ebkf3Oh+8ohSb8jtfg7cg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Oq+HWOt0AOMAZbcUOVfkSEn6sA0bTyiyy6v9j3savgxvWbf93hCpZ9rVUUj/jUO8T ukRX1J/E2W5JE/FCVKEcQYT8HVk8p8QPy7isgmxIc9nIpJ9TVevKHdmDz/RjS7XuE5 KW3S6qcvpTxN1z1f8Iod4metN8IiMkSKyBmONxMA= 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.4 37/79] xhci: Increase STS_SAVE timeout in xhci_suspend() Date: Wed, 16 Oct 2019 14:50:12 -0700 Message-Id: <20191016214800.041318735@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191016214729.758892904@linuxfoundation.org> References: <20191016214729.758892904@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 @@ -981,7 +981,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;