Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1080655ybl; Wed, 14 Aug 2019 10:22:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqyrnGRUp7bp1AM9R0OaKTONWEq9Hk0+vxjHZKrhPYVMEsmASUMOONkLZzUPAhj2YSgO35ie X-Received: by 2002:a17:90a:fe0c:: with SMTP id ck12mr816605pjb.74.1565803371211; Wed, 14 Aug 2019 10:22:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565803371; cv=none; d=google.com; s=arc-20160816; b=0prf6jroDChEsJmPv8phHv3l7671E319+pXBVftuLC1IpU4bBWpceFtLRoCE4Ggwbf 2sA4AYW5r++eBEdpNj3i0PajHvBipfy/j7hdXr0vY55VLNLKq0WQK1NF8tKFGNP/KELZ XNCVxjX2nxGw2whFJix7aIA6Hx3E0MNNo8/ZspGEsfL9PzuUIQEVk82B0dBHQUy/y3lb W7IZiK215MM1TMNxnZHdQCHOUa+654nVoi9a1jCa15+9hBPDogwxPDi+2pHRmtXp49r+ 5s0hQpEDKwJFzy2lhH4hLZE6h7OckaWJTmJw+D/eoOdi0U7MZlaMBzOpW57tnSXb2BBZ Gjow== 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=EZhMa85CuXbNLIS2qQFEUjqRChSTZgop8tU934zYp5EjTE9IrYkx1RJxaF1ip8IvmR DojJqD04WZN00TsJJ+RTq2hq1kRfhD+BGUytfraBbRk64qbTy+/OQATP5l8XgL289BZe xEUKwhZPv3gYhvSIUvLPVMFd6kcXcuf4bQvR+ZlklUrmxnDdszypb+RNfQYT4kpWzzbe aC4Kna4wFNf97jIxlCXJHZuaPRyJlRH/PuZY5KqO5/cpv8GqsjrEO+DpWxDpHVI4pN04 x8W+ot9sfOggS/2kNsKeGH8ZRUvdPaK4Wz/riTU9hEeD1QO0K916PJdm/Tsei9/kms9y aeDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GfU0gLg5; 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 p17si265470plq.138.2019.08.14.10.22.33; Wed, 14 Aug 2019 10:22:51 -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=GfU0gLg5; 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 S1729975AbfHNRV6 (ORCPT + 99 others); Wed, 14 Aug 2019 13:21:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:59474 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730273AbfHNRJM (ORCPT ); Wed, 14 Aug 2019 13:09:12 -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 51D38214DA; Wed, 14 Aug 2019 17:09:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565802551; bh=bbV/8pJFh2CJ+OTFXl4xsgxVcDcaQJ5Cl2Q4N6T3Ltc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GfU0gLg5JFo/T/f92oNNxQvdHDrKzfkALivijUfLq9jMOkucx6+jf/Wa84Aeoxfff KQb1ZhFOkTYg/kz3BrrOYxlMso7QY2nME9vm7devqr+DYEnKlQWo+VPLb9e5eLp2K7 pmddBtG8JR/ky4pIDxX50wTS/YeAIeybbx6Fc7BM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yoshihiro Shimoda Subject: [PATCH 4.19 25/91] usb: host: xhci-rcar: Fix timeout in xhci_suspend() Date: Wed, 14 Aug 2019 19:00:48 +0200 Message-Id: <20190814165750.766614263@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190814165748.991235624@linuxfoundation.org> References: <20190814165748.991235624@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;