Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1543078rdd; Thu, 11 Jan 2024 02:17:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IFD3ThEjR5wpBhZpdfhG3FF+hHkawarP0DESlF9rsNOxn85FaVtTmpKkydjZiIAhZuGPv8y X-Received: by 2002:a2e:9983:0:b0:2cd:354e:2483 with SMTP id w3-20020a2e9983000000b002cd354e2483mr286672lji.4.1704968235850; Thu, 11 Jan 2024 02:17:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704968235; cv=none; d=google.com; s=arc-20160816; b=yRTEvc8xY3KIm6cHVOiM/MuITWsBWrhYLa6qyiiUwH0eijqKbNetiNIPmGNZmJXrK+ t3pInQ3SL36fsPQ1oLVpttyaqOlq54fxaOLG9/Nt2B2lTqz1UyqQ+xCemD5quCvBe5EO 2xBtkicrSUBFsxpW7DwFqyS8AYg7P7TL/GfsztrYP8o2wl/j25veRM2bj7RamvKn6QH2 9eNzPDqtXToL11uZnAfxwCciqP3EiO78XH/N18+Iz+khxy8vIyETdzvJOVMoa7LoPWlA RT9+9bIKPnqwgSwD8x27OS3T7jUbQGJ9vhSNLYqqT90X8NaBJTgxKwaYv8giw9Ic/O3X nHcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=Xvfh+d/PF2/QGoAtt0okJqQ5raTsSFhD1s6pDC9b/Lw=; fh=767JekOiXy8qsqZzGOFRUo1xM0pD6fWIJjjeUzqUU8E=; b=uXRSKcfVRDm86xY0FJ2gI/kHp91YcWlf8cw+V4bSe7InsfQaSkqJ6m3OJ0aRLVjvID PRZKAq55VqFWuV7tE69SBJM6kZpcjxKmweLcS+SKVjC/oMsM/nkgR9e5U0zDyKa3FfyL IquNYa7xgO+KCFch7NaTwpXa5gnybM7Vai07ApeszL/Z1b1CSCd7668GtDzs2xO68hD0 MjV+1VtxrcpWvQp5uqzBkP2PQNdNbjQzJht2Xx/ujA3bojxV6Ttp/lLITd2HOiw00/kF IzL8q0QK37L8m7+fYvzOerv9Dp7j0EZgACMf1/bUJGc7onIBw8kc/kIx3i0mA0mS00ZN Y/kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gulit7CF; spf=pass (google.com: domain of linux-kernel+bounces-23375-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23375-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id ig8-20020a056402458800b00558ac44be54si96961edb.642.2024.01.11.02.17.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 02:17:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23375-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gulit7CF; spf=pass (google.com: domain of linux-kernel+bounces-23375-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23375-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 92D741F20FC9 for ; Thu, 11 Jan 2024 10:17:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 94BC812E6C; Thu, 11 Jan 2024 10:17:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="gulit7CF" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A69814A82 for ; Thu, 11 Jan 2024 10:17:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704968220; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Xvfh+d/PF2/QGoAtt0okJqQ5raTsSFhD1s6pDC9b/Lw=; b=gulit7CFMvLNiJpgOjIioRW7jFxcroYAaxo/8SjpqVCbSAIaTPl06riAU+N9R/SGa8PWRH Qh5JXvRG8ZTBAdx0v3mYTrNDnvgZns3Y0PN5v2lXTuQWuPjJ2vRfMEcdM4XP1yCZfQrlgr V0kvwBdT4huDA7lG9ojoiwX+RgSVnu4= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-193-Y-mL97mVM3GvpvNv8Q4v4Q-1; Thu, 11 Jan 2024 05:16:58 -0500 X-MC-Unique: Y-mL97mVM3GvpvNv8Q4v4Q-1 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-a2b6c2a6083so118751466b.3 for ; Thu, 11 Jan 2024 02:16:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704968218; x=1705573018; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Xvfh+d/PF2/QGoAtt0okJqQ5raTsSFhD1s6pDC9b/Lw=; b=W6mwvyOsdQj2JXJqeN94QVPmAt/V5lFb/MTH0+By08W/Gd955W0MuPamNDcto5SIFI 0Ws5RRmijG05GB8eGe4ynL3H7NxAYLh9+oL5una0ctMmJF9PnaIog4ImWiyUrcJxraFQ UGMXM3p0yEEr4d3+TWLo4pY9q19kYCA+w7bqRdUIyVp8Ueo1+4JAdknaxYc8IaKYyWRN 05NFwSfNw3b6DOJnk5nlnJSvL7/SqRHUpw9G2AUL444TotqwRojQhcn/o+mnAQCD4aqy 7xFFdvT/Vp+t4JTcOmHeFc49pXXzTxL+ep7rNz/ZDp1qS7TZF9q0btA9GViDe8HKkjTP ZbRw== X-Gm-Message-State: AOJu0YwCbF/DLdbLuK57cUHRhfx+0Hh1Vc7L2raeLppKO8iXQAMG+pNR sbPkX8Gfhc0k8/Vy9rq4ye9bmtwnGrEWFYU/jkwAZtBJn1L2p+Ay8ZExLzuzM9RGsRHkg0oqURM xEGOm9KNZGNWajLDwLJSC25oyQCq9Giwa X-Received: by 2002:a17:907:1118:b0:a26:88f4:3fae with SMTP id qu24-20020a170907111800b00a2688f43faemr445676ejb.67.1704968217748; Thu, 11 Jan 2024 02:16:57 -0800 (PST) X-Received: by 2002:a17:907:1118:b0:a26:88f4:3fae with SMTP id qu24-20020a170907111800b00a2688f43faemr445667ejb.67.1704968217476; Thu, 11 Jan 2024 02:16:57 -0800 (PST) Received: from ?IPV6:2001:1c00:c32:7800:5bfa:a036:83f0:f9ec? (2001-1c00-0c32-7800-5bfa-a036-83f0-f9ec.cable.dynamic.v6.ziggo.nl. [2001:1c00:c32:7800:5bfa:a036:83f0:f9ec]) by smtp.gmail.com with ESMTPSA id 19-20020a170906301300b00a26a93731c5sm387607ejz.111.2024.01.11.02.16.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 11 Jan 2024 02:16:57 -0800 (PST) Message-ID: Date: Thu, 11 Jan 2024 11:16:56 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/2] usb: dwc3: host: Set XHCI_SG_TRB_CACHE_SIZE_QUIRK Content-Language: en-US, nl To: Prashanth K , Thinh Nguyen , Mathias Nyman , Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, stable@vger.kernel.org References: <20231212112521.3774610-1-quic_prashk@quicinc.com> <20231212112521.3774610-2-quic_prashk@quicinc.com> From: Hans de Goede In-Reply-To: <20231212112521.3774610-2-quic_prashk@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, On 12/12/23 12:25, Prashanth K wrote: > Upstream commit bac1ec551434 ("usb: xhci: Set quirk for > XHCI_SG_TRB_CACHE_SIZE_QUIRK") introduced a new quirk in XHCI > which fixes XHC timeout, which was seen on synopsys XHCs while > using SG buffers. But the support for this quirk isn't present > in the DWC3 layer. > > We will encounter this XHCI timeout/hung issue if we run iperf > loopback tests using RTL8156 ethernet adaptor on DWC3 targets > with scatter-gather enabled. This gets resolved after enabling > the XHCI_SG_TRB_CACHE_SIZE_QUIRK. This patch enables it using > the xhci device property since its needed for DWC3 controller. > > In Synopsys DWC3 databook, > Table 9-3: xHCI Debug Capability Limitations > Chained TRBs greater than TRB cache size: The debug capability > driver must not create a multi-TRB TD that describes smaller > than a 1K packet that spreads across 8 or more TRBs on either > the IN TR or the OUT TR. > > Cc: > Signed-off-by: Prashanth K > --- > drivers/usb/dwc3/host.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c > index 61f57fe5bb78..31a496233d87 100644 > --- a/drivers/usb/dwc3/host.c > +++ b/drivers/usb/dwc3/host.c > @@ -89,6 +89,8 @@ int dwc3_host_init(struct dwc3 *dwc) > > memset(props, 0, sizeof(struct property_entry) * ARRAY_SIZE(props)); > > + props[prop_idx++] = PROPERTY_ENTRY_BOOL("xhci-sg-trb-cache-size-quirk"); > + If you do this you also need to make the props array 1 entry bigger (increase it from 4 to 5 entries). Before this patch there are max 3 properties added and there needs to be an empty terminating property at the end (which is what the memset is for). So before this patch props[] needs to have 4 entries (which it does) and thus after this patch props[] needs to have 5 entire.s Regards, Hans