Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp3547679ybx; Sun, 3 Nov 2019 21:55:50 -0800 (PST) X-Google-Smtp-Source: APXvYqwFWfgpXLis1+Kd6WTqDau3gx2Uwb4cruza/eRa7V8hrobBU7qv+sfHfWm5T3GrLdYp83XV X-Received: by 2002:a17:906:86c5:: with SMTP id j5mr22711325ejy.189.1572846950130; Sun, 03 Nov 2019 21:55:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572846950; cv=none; d=google.com; s=arc-20160816; b=ERue+mazm3w1zD1Bb/0b/RXg3OSZZFzx2JTj6ZnArC6zBJ65qBr1diYxncCLorFbxj VLgpdu2EGdPgC/sYNBY4rPbNsaQU2TmGusFxJpRub17D01mvyTdZw3hxg2SYZcPplln0 /7x3dA53FCKHNfA3tBd9aT4tyRBaCy1gi2GWamJfBpbnYq/K/AoqUSDXoGEi3Tvf++n3 tOg9Njfs84xBxz/l3oq7WFrpgDRrL7oxvcfY6yFuEJP0e+41rpmRxfRtsfiVLGKMH5sd mkVrQQ621Vfv0JiPc0PctG94SnMAEFGKEgre3CLzbQJ//9tMKpQbevzrJYUitKu5U0uA 9P+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=2WqJ75fd6M++0EetMrqDhEU36K0nA+kM6sh2ZCjjLF8=; b=YgIhaSsjqyKztyFngs7nxpN0qMImQR7kSYmEwIioOkeqnPRfbBwroeSYammgfnmuu6 TsIwN6g97www/rEg0/wJiC51al3Y+4EQF3gesbW+dfVFu3WI3PDcn2HUbaU3teCYGoCj cuv7Rau2y/ms6HuNxF1tlwSdgHJk+5iqIPoKWLUMvGBH9DTYmoBLmtEBziGGCgtmT4W3 IQrAVpgEb/ZPPc0vPaXrFcBFuUq67IRwVdMpBQ+2tVB7K6nwjnssH5o/h7TjoXva/9Tk F15w9EJXhPrfR3S+AbydY7c2Q6W2duV3e0VL6UirtRgRPea23PNtejjWUON0XrB0wxGz ueJA== 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 t18si601407ejx.354.2019.11.03.21.55.26; Sun, 03 Nov 2019 21:55:50 -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 S1727989AbfKDFw1 (ORCPT + 99 others); Mon, 4 Nov 2019 00:52:27 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:58474 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726248AbfKDFw1 (ORCPT ); Mon, 4 Nov 2019 00:52:27 -0500 Received: from 61-220-137-37.hinet-ip.hinet.net ([61.220.137.37] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1iRVHs-00032u-IX; Mon, 04 Nov 2019 05:52:25 +0000 From: Kai-Heng Feng To: mathias.nyman@intel.com, gregkh@linuxfoundation.org Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Kai-Heng Feng Subject: [PATCH] xhci: Increase STS_HALT timeout in xhci_suspend() Date: Mon, 4 Nov 2019 13:52:17 +0800 Message-Id: <20191104055217.10475-1-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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