Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2873290pxu; Sat, 19 Dec 2020 04:59:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJwUYBCrC5O2f/d48Mubr2u3t47N4kA1QYgInF/tiT7zUs71ERSksCAW157vWuWFrm1KHlC5 X-Received: by 2002:a17:906:da08:: with SMTP id fi8mr8217388ejb.517.1608382766385; Sat, 19 Dec 2020 04:59:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608382766; cv=none; d=google.com; s=arc-20160816; b=yuOsnVbrJR5yEEaoyL9fyPaBrb3SWYw+qDGBbzEhDONFzkPLAd/K6oyqovqiUuAeJk UG02c8lrTUbytwxQbFNuIWF74SRSwVDjB5XPqP/gdo0oSejjwsJelC4wZwxji1AdIOb2 W8gMdc9j6dNyo1fn6Yl5VfC0pDgCPD1zvlCNFzgWL9sVF3qiTJQ0jPpJdWsNmq/M41aF oKnM8OQXpAII6HN4vr68eJD3H2i0xGymg2YC+xiVfpPQR98fPMdRIiX1atTee3/dwaBB 9T6HVaHBNSlOfBKjynToaKdghxhLl+DunRE51eIX+Yc4nb3IqgJpbX2UJtJNBHcDNG7W kPJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=qde010pBYV3sm6J7sT0DSPC+dQMzwRtre2o+sRwArTk=; b=b8f6x5a84iaYeWF1kX5dbVdgAaz8OYCbPMPQmxeM/Z7n3NvTo2mHNCq1d+g9RA4Ol5 LHNnlKHowwGBngdqFwcDjQGc2/dJP/uB67gKlZV2sUbKSIJJm6ApXWeV5qriW/Tb8HmM lLdlIAet5MHsT7FRzPrasCDYN91M3hxhAh6avoWS7JBHkmNNtAjhloibnP3d0e14Xogj /esreRNlXo7xllHcTM2bFm44xJcBV645v4/CIhzpwmaglGitV7cmYfPzYAH5Toaf6fjs GIr2kC6lqsnpaUWJXo/ZbbfAG+OPiMk7sPtCCDDDpab2ccVBkY/SVlBocLZ8vbrZhpUS urOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o27si5904576ejd.738.2020.12.19.04.59.03; Sat, 19 Dec 2020 04:59:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727133AbgLSM5e (ORCPT + 99 others); Sat, 19 Dec 2020 07:57:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:44158 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727018AbgLSM5c (ORCPT ); Sat, 19 Dec 2020 07:57:32 -0500 From: Greg Kroah-Hartman Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tejas Joglekar , Mathias Nyman Subject: [PATCH 5.10 10/16] usb: xhci: Set quirk for XHCI_SG_TRB_CACHE_SIZE_QUIRK Date: Sat, 19 Dec 2020 13:57:17 +0100 Message-Id: <20201219125339.580055081@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201219125339.066340030@linuxfoundation.org> References: <20201219125339.066340030@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tejas Joglekar commit bac1ec551434697ca3c5bb5d258811ba5446866a upstream. This commit uses the private data passed by parent device to set the quirk for Synopsys xHC. This patch fixes the SNPS xHC hang issue when the data is scattered across small buffers which does not make atleast MPS size for given TRB cache size of SNPS xHC. Signed-off-by: Tejas Joglekar Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20201208092912.1773650-2-mathias.nyman@linux.intel.com Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/xhci-plat.c | 3 +++ drivers/usb/host/xhci.h | 1 + 2 files changed, 4 insertions(+) --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -333,6 +333,9 @@ static int xhci_plat_probe(struct platfo if (priv && (priv->quirks & XHCI_SKIP_PHY_INIT)) hcd->skip_phy_initialization = 1; + if (priv && (priv->quirks & XHCI_SG_TRB_CACHE_SIZE_QUIRK)) + xhci->quirks |= XHCI_SG_TRB_CACHE_SIZE_QUIRK; + ret = usb_add_hcd(hcd, irq, IRQF_SHARED); if (ret) goto disable_usb_phy; --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -1878,6 +1878,7 @@ struct xhci_hcd { #define XHCI_RENESAS_FW_QUIRK BIT_ULL(36) #define XHCI_SKIP_PHY_INIT BIT_ULL(37) #define XHCI_DISABLE_SPARSE BIT_ULL(38) +#define XHCI_SG_TRB_CACHE_SIZE_QUIRK BIT_ULL(39) unsigned int num_active_eps; unsigned int limit_active_eps;