Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp512123ybc; Fri, 22 Nov 2019 08:39:58 -0800 (PST) X-Google-Smtp-Source: APXvYqyjEYoHVw6+6/hn5uA6XwQGFTrnkuVg43ecsUnP76u5eAwzDtZRaXaF4Eb8nzW3tcanHv9X X-Received: by 2002:a17:906:814a:: with SMTP id z10mr2958735ejw.62.1574440798070; Fri, 22 Nov 2019 08:39:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574440798; cv=none; d=google.com; s=arc-20160816; b=C0lCohvia7SnnC5ilp5t/DFMlvNPbUkW5XQW5tb4aTaiVyKLysUJUI7CdsbOBSmgJJ f7slH4LIxfBUGUfM4PMkK1Oag/QIugK98I3a5fgZz74R/m6Ijpz65IDQ/aUb9aE4QJXQ 1bqj1OpP/wUi27fnjoDRQXv5/3WRdOpRwC/g/cxcwjCFwdafPW6j8qVraLfJjWmuH+Tr ABLKtj0FpI1wkAlFKhtrVf+AYNVKOpsOLoqtaMyaGY/6UUrwI4U3xHzolaaF6TUM5LWs +QFR9oXPoPr1Mkm0clWewPr0n1qLtTk6+SQMAs3g7EmB/anMLfqkkB/MNiysykN0GByU 126A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=OiY8BBIMf2/IPKMNfBl4Iy3NQ+mHiJ5ZlRiqM+tCbyg=; b=iKbra1EVnkMFcXHS1lh3a/vF7MwJp44O1GTym3IwNczFIR3eWRNreg1kw0PkYpoFsa 2FPe+M2lG6is0T0p5w1FSG9oujeUF7LLnk5gW0HiOzSbwFzW3LEfgJ8D+m6ORDpGHMP9 6y9FGmN67QsRCF+Ltf6Rb2GuIygQYEEM6imrIRw4ffo1Ji/8l07qWByPGa6b+ESEppz4 wMQDlaPqpAMvOxR12aGpfCpP1CAtxHtPlt33iJtOT+9xJMmlBjspTdlsrSJV3tXH9ufe 5VlQF5XCgBFvcxHZbolz/czVJKMGOPfR8Fvb+KKpz4fvyIZ35Bud+gySUB9e197WdUoR U04A== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id jx16si4512456ejb.353.2019.11.22.08.39.33; Fri, 22 Nov 2019 08:39:58 -0800 (PST) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727236AbfKVQgL convert rfc822-to-8bit (ORCPT + 99 others); Fri, 22 Nov 2019 11:36:11 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:35603 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726705AbfKVQgL (ORCPT ); Fri, 22 Nov 2019 11:36:11 -0500 Received: from mail-pg1-f199.google.com ([209.85.215.199]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1iYBuj-0005bb-17 for linux-kernel@vger.kernel.org; Fri, 22 Nov 2019 16:36:09 +0000 Received: by mail-pg1-f199.google.com with SMTP id s8so4163199pgv.5 for ; Fri, 22 Nov 2019 08:36:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=8FJYPgYSY4gesD2/sebLKRkt9MrvJa8jfnyknbp4l4o=; b=Y5RaYWDQjCT8BaJW/HYh8W1sT5KTRnxvWckg91ECVAbGnMAOon4v4uMqcEuF1Tg73F 8aMIyBLMf4tJJQqhfxKLOpq1KegApG6gGvntVbZxZtH3vYGMlVKzYA0cs2LPtgG+B6Wx viRF+9J82vMS18mbteHeGyQgWs5n91LhufTki8gaRx9sllks2R8R9hpWeuakOPYQNNrv 4LN5leHz3TvJmxZLc4GYnqMviqQWLcpUCvRcx6fq2IKyPxuiglA34JuPf0jOgzaBysjQ Ayc76sNwYTlRjRo8x6cxjpaGPzKZIDw0wo+HwpQgOT4kf3icvQLuI6n6NmZyyAUnQD3a ABYg== X-Gm-Message-State: APjAAAUJTufBvPQBQYbOCccddd5wQcOGVCSYqS9upTnMr+99snVJTPBi x72dSYSWcZRbowYipCyopHl5WrQJGe829YvpBHBvgwqZfkSACYlQ1B7hRQwy4vBYddSwYC1AGIl r03uiGQKFcoIBhGJ8xHcRt7wd/EnueBR0ocCVQWJ8Ng== X-Received: by 2002:a63:ed4d:: with SMTP id m13mr15765257pgk.442.1574440567650; Fri, 22 Nov 2019 08:36:07 -0800 (PST) X-Received: by 2002:a63:ed4d:: with SMTP id m13mr15765242pgk.442.1574440567316; Fri, 22 Nov 2019 08:36:07 -0800 (PST) Received: from 2001-b011-380f-3c42-689b-ad0d-de88-c579.dynamic-ip6.hinet.net (2001-b011-380f-3c42-689b-ad0d-de88-c579.dynamic-ip6.hinet.net. [2001:b011:380f:3c42:689b:ad0d:de88:c579]) by smtp.gmail.com with ESMTPSA id z7sm8502076pfr.165.2019.11.22.08.36.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Nov 2019 08:36:06 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3601.0.10\)) Subject: Re: [PATCH] xhci: Increase STS_HALT timeout in xhci_suspend() From: Kai-Heng Feng In-Reply-To: <20191104055217.10475-1-kai.heng.feng@canonical.com> Date: Sat, 23 Nov 2019 00:36:04 +0800 Cc: "Atroshko, Yevhen" , USB list , Kernel development list Content-Transfer-Encoding: 8BIT Message-Id: <34F5BCC9-18EE-466D-BBAF-B3D3C1CD525B@canonical.com> References: <20191104055217.10475-1-kai.heng.feng@canonical.com> To: Mathias Nyman , Greg KH X-Mailer: Apple Mail (2.3601.0.10) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Matthias, > On Nov 4, 2019, at 13:52, Kai-Heng Feng wrote: > > I've recently observed failed xHCI suspend attempt on AMD Raven Ridge > system: > kernel: xhci_hcd 0000:04:00.4: WARN: xHC CMD_RUN timeout > kernel: PM: suspend_common(): xhci_pci_suspend+0x0/0xd0 returns -110 > kernel: PM: pci_pm_suspend(): hcd_pci_suspend+0x0/0x30 returns -110 > kernel: PM: dpm_run_callback(): pci_pm_suspend+0x0/0x150 returns -110 > kernel: PM: Device 0000:04:00.4 failed to suspend async: error -110 > > Similar to commit ac343366846a ("xhci: Increase STS_SAVE timeout in > xhci_suspend()") we also need to increase the HALT timeout to make it be > able to suspend again. Seems like there are more broken AMD xHCI in the wild, so please merge this patch if there's no further concerns. Kai-Heng > > Fixes: f7fac17ca925 ("xhci: Convert xhci_handshake() to use readl_poll_timeout_atomic()") > Signed-off-by: Kai-Heng Feng > --- > 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 6c17e3fe181a..53720c41891a 100644 > --- a/drivers/usb/host/xhci.c > +++ b/drivers/usb/host/xhci.c > @@ -973,7 +973,7 @@ static bool xhci_pending_portevent(struct xhci_hcd *xhci) > int xhci_suspend(struct xhci_hcd *xhci, bool do_wakeup) > { > int rc = 0; > - unsigned int delay = XHCI_MAX_HALT_USEC; > + unsigned int delay = XHCI_MAX_HALT_USEC * 2; > struct usb_hcd *hcd = xhci_to_hcd(xhci); > u32 command; > u32 res; > -- > 2.17.1 >