Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1086133ybl; Wed, 14 Aug 2019 10:28:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqxuS2A+zn2dH0sEs5nApQiTdXPDOxhKI7CKpY1Zt+TamyyIUdV+4lkpYu8T8VQ7wvrH4mM+ X-Received: by 2002:aa7:934f:: with SMTP id 15mr1085634pfn.22.1565803700960; Wed, 14 Aug 2019 10:28:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565803700; cv=none; d=google.com; s=arc-20160816; b=jh3zX3rkf3Mc8SMQIEuNgHXS10Fg3tfa/x+iu7/ltNCVg0dCR3mJmZZgb17g9BG2vq PHYUrlgE//y+cl38It0c81JcVdP+BJyCIk11sUKBPKFUls1Rsh/N/kX+FjWa2DhvyCzI dZpjyhmxhMFIHY/BtcgqmNGuc947mUU/tesyL7DAUaNW5DemlPr5yRi2zGY9Qdu9aJtM Kieo1l18oKYw/HXY47bCOOYHr+Etvx/A0qG79f0MBX8jTH03uRkVPu6hUXE/rmz8i0BK riFWbdrbtxLa1ii2lbudKwFQvfuzYaV8U9BDjh3r7amroFKTtqngv4j+e1e27E9u01mu Y6ZQ== 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=RVwaAG4X0761vg8gY2LWpEtODpaPZoCQknS4Ql4zpRM=; b=VBAuQiT0UdoalRG6zaJYvSBD8BwdG8vZxpyUh03pvZDCvGDxlNDe/y2NxeOswmUvC9 9OHG7RNhR39K4OFju+nr114svf1NlBGbFU/9SopENCVugdJ5fkQSKvbjIulgB9wv/wUR XbFOUPp6fuBgAQy/xOVa5yRDivzl4hU3YwPMlLiWrTsgboVwmWlytsoF7AxtwOnS71Nd jAjErFRCDR8wFv/GnjSD7YScOw3Y13Tqcl5996ovsIjyUBx9TdPdE5vJtB9O44mYF3pe 0tITYT4hqI5sfHnQpzyp305DIo4URRdn8Sey5i1SwYebG/xmsDyU09uh3/O9ZNG9Hzmu cwkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=H5o3MWt8; 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 r3si277585pls.176.2019.08.14.10.28.05; Wed, 14 Aug 2019 10:28:20 -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=H5o3MWt8; 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 S1728966AbfHNRDf (ORCPT + 99 others); Wed, 14 Aug 2019 13:03:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:52194 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728955AbfHNRDd (ORCPT ); Wed, 14 Aug 2019 13:03:33 -0400 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 1D5C1214DA; Wed, 14 Aug 2019 17:03:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565802212; bh=bbV/8pJFh2CJ+OTFXl4xsgxVcDcaQJ5Cl2Q4N6T3Ltc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H5o3MWt8mtFa9Ggp2/9r/yhcLrJFujYQoOf1FcjKy5TKcfnv4vIsgoIVnDwtyGpPy ow8UU14xZSLdbq62DQvOufB0rfTk7oh5vrn+c1YULaqYU6mFSIkqwEOxwuwT7cJdOC mnAfBuY77OcXtvlxB/EzV04ELRFh2qqpk58UaBi8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yoshihiro Shimoda Subject: [PATCH 5.2 038/144] usb: host: xhci-rcar: Fix timeout in xhci_suspend() Date: Wed, 14 Aug 2019 18:59:54 +0200 Message-Id: <20190814165801.413447145@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190814165759.466811854@linuxfoundation.org> References: <20190814165759.466811854@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: Yoshihiro Shimoda commit 783bda5e41acc71f98336e1a402c180f9748e5dc upstream. When a USB device is connected to the host controller and the system enters suspend, the following error happens in xhci_suspend(): xhci-hcd ee000000.usb: WARN: xHC CMD_RUN timeout Since the firmware/internal CPU control the USBSTS.STS_HALT and the process speed is down when the roothub port enters U3, long delay for the handshake of STS_HALT is neeed in xhci_suspend(). So, this patch adds to set the XHCI_SLOW_SUSPEND. Fixes: 435cc1138ec9 ("usb: host: xhci-plat: set resume_quirk() for R-Car controllers") Cc: # v4.12+ Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1564734815-17964-1-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/xhci-rcar.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) --- a/drivers/usb/host/xhci-rcar.c +++ b/drivers/usb/host/xhci-rcar.c @@ -238,10 +238,15 @@ int xhci_rcar_init_quirk(struct usb_hcd * pointers. So, this driver clears the AC64 bit of xhci->hcc_params * to call dma_set_coherent_mask(dev, DMA_BIT_MASK(32)) in * xhci_gen_setup(). + * + * And, since the firmware/internal CPU control the USBSTS.STS_HALT + * and the process speed is down when the roothub port enters U3, + * long delay for the handshake of STS_HALT is neeed in xhci_suspend(). */ if (xhci_rcar_is_gen2(hcd->self.controller) || - xhci_rcar_is_gen3(hcd->self.controller)) - xhci->quirks |= XHCI_NO_64BIT_SUPPORT; + xhci_rcar_is_gen3(hcd->self.controller)) { + xhci->quirks |= XHCI_NO_64BIT_SUPPORT | XHCI_SLOW_SUSPEND; + } if (!xhci_rcar_wait_for_pll_active(hcd)) return -ETIMEDOUT;