Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1075549ybl; Wed, 14 Aug 2019 10:17:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqztcpetmT60PCCxFt8/AATHsJ6QbXvidjoBoMDLR9hWy1iLe9CSCdHnqvtnERcSgkkCGKMP X-Received: by 2002:aa7:9d07:: with SMTP id k7mr1029141pfp.94.1565803073307; Wed, 14 Aug 2019 10:17:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565803073; cv=none; d=google.com; s=arc-20160816; b=itXEjAqdSFci/Rmpn+OJscKn2TrXLRqD1gGVJNM50Fdx6+6TYPmHZ6K7VmYbKyyCwH rgQqH1KoT6wdN3l82qek21IiBxGpty9+qtvVr+MgnFBRdoRW3vwSnreG5N2KdUSXPxjJ 33NVlJXk4LJBgiKHbxzZHrxV4Gr1BCL1ENeg3nQ0BiupCWyDKR6u2ik/UcoQGmXjgYsv sMxBNd0qr7RR8pL0imx85rD64aEwalN1ORRVrpK9n/JPfr0yyLMlWJkAvc4rdBdU06PW 6KHupil+i2+Er+BUbxIExsd5Gji0D8/JYQYMLbRaM/PYr7R/24sA75Fyb3Z5FRPkD9SG 0xgg== 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=47I46GNJAAFEBJsWnZ7C7yXnejADYnKFNn+t0g2pRSs=; b=nzj5+hn4TyuVCXAbnJaNnVKew3Dc5PNw0YNYjRdknnw9nCznVLRrlwQeUBoy2QeTb5 aDJxB8jqlhtBXrdk/Yl5E+1gLbwDgjdQx6SkpLdOnurmVDocMjdMeUz5XQ7dtGbyUflq 0ul2bAtu20jZj5RGDGBpMqLmqcK/Jgdb6/VeJ2BPe0qHGrDCn9kQSDgqXe1mbpufCbKq 7FRD/0ciB6uYviy5EcbNqPdocXBCNACkty+bxkLeCVYtJ4hZO38B0177CmTcMIyW9jmB Og5fOlOd6wTp48TJ9EdIRho5jqSpv6YHemULZONOoXul6sD45mxh0pTtH09BJkh7RBzo Yh+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rAkyJNAo; 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 y63si167950pgd.403.2019.08.14.10.17.37; Wed, 14 Aug 2019 10:17:53 -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=rAkyJNAo; 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 S1731016AbfHNROG (ORCPT + 99 others); Wed, 14 Aug 2019 13:14:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:38470 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731003AbfHNROE (ORCPT ); Wed, 14 Aug 2019 13:14:04 -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 EA3982063F; Wed, 14 Aug 2019 17:14:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565802843; bh=/+s4HMn3sa4TeIGmpwGhMZ5kCW8zQtP0FeVr6XKuY+c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rAkyJNAoKQzL9vcPSXDoaRe2HYefS6/Ykq4VNWsAcH7XWSdTzi4YNoQb3nZFEnNE7 cjQcR2tJXkXFsNrn+ixektzjsOqaSPTHp3OGfsHU3igPp5ppOwTJBESSKWBA/PZD6Q FSandpupP8RXlIQTXjNZN1mmku9mHZYq0PM7wFWQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yoshihiro Shimoda Subject: [PATCH 4.14 21/69] usb: host: xhci-rcar: Fix timeout in xhci_suspend() Date: Wed, 14 Aug 2019 19:01:19 +0200 Message-Id: <20190814165746.965617011@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190814165744.822314328@linuxfoundation.org> References: <20190814165744.822314328@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 @@ -231,10 +231,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; + } xhci->quirks |= XHCI_TRUST_TX_LENGTH; return xhci_rcar_download_firmware(hcd);