From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DFFBC43603 for ; Mon, 16 Dec 2019 18:39:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6DB6420684 for ; Mon, 16 Dec 2019 18:39:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576521564; bh=tvOIjDCxD7/z37ZjVf2gcMsRlUyrETBdTSr/zPhHUUw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=UkrE1VCNOoVE4DC6uQdcJlZgXFeTUHN4Mc/1bOwLWA1WqsKnjUfAiv3pnDtYGBKDC pUZUczH4cR9+7wNpV+52OwDAODpierSAjgAUAYb6UySx0sME3wLriU2VsHyQkJDGLr IbH3osOZMUTEUo/OUwsIrWEBFwG241vxnXoVfzoU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729111AbfLPSDi (ORCPT ); Mon, 16 Dec 2019 13:03:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:40208 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729491AbfLPSD1 (ORCPT ); Mon, 16 Dec 2019 13:03:27 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 6454820726; Mon, 16 Dec 2019 18:03:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576519406; bh=tvOIjDCxD7/z37ZjVf2gcMsRlUyrETBdTSr/zPhHUUw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sFZWtIB65KYXwvwk9EQfBJ6PFZGv17jmNiFGMWvtkyEkxyLMUW8voOVZEUkIMpIdr JWqd+uaXbzofaez0lbI9/pIXu4on6piHS3fnTX39f5coXWmVWWT/7pE/ywGKCKlWsc XtPtcMhRVDn/SzmGdiaPF7pyI3UggX9qapnpyeng= 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.19 016/140] xhci: Increase STS_HALT timeout in xhci_suspend() Date: Mon, 16 Dec 2019 18:48:04 +0100 Message-Id: <20191216174754.928800087@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191216174747.111154704@linuxfoundation.org> References: <20191216174747.111154704@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 7c67cf6658cec70d8a43229f2ce74ca1443dc95e upstream. 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. Cc: # 5.2+ Fixes: f7fac17ca925 ("xhci: Convert xhci_handshake() to use readl_poll_timeout_atomic()") Signed-off-by: Kai-Heng Feng Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20191211142007.8847-5-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 @@ -960,7 +960,7 @@ static bool xhci_pending_portevent(struc 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;