Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5902448rdb; Thu, 14 Dec 2023 03:04:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IFopkfo9ii3dkjLCLRsfXnjQ67LVybX5Bw/xGcu5xRZGZ7eTGe0RaQsRgtR+Pu/bza4wB68 X-Received: by 2002:a05:6870:c69f:b0:203:4bf9:c4f3 with SMTP id cv31-20020a056870c69f00b002034bf9c4f3mr777860oab.26.1702551890221; Thu, 14 Dec 2023 03:04:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702551890; cv=none; d=google.com; s=arc-20160816; b=pGZo2ZuZ/cHNV7XRf/14d84SMLdfVDfeGGNdIy03ZlmxYVdFnVEUbUCKn9DENWqt2n xRQz7WjHIOW6pF/rR9bJGeusG+S7tBhSx/uDvMNY5R05t2/za84nL1aS/+8LVacARcOE Jyr2iioxsJs8VCod3rKg0Yn2IYwjtwBV5rg8wZsHu3suDgGh3gyLVaxZAw2mGUi6mZof dTvIy0giX60dgYBs1re34Xfu9PCuanWcbEvD1XqGVe/ogXmP8DKNVj5zaMgLYQlNRYLo F7fDqZX8cAMfPQtduHHjm6rH0da8eoY6mOWAtsMeVQn7ehq20NE1EofyFtohP2LxdZfI V3PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=iHuh3dQzMKYexoxpBsTGDe0zpWLqWonwx4SiyQy9Ur0=; fh=qEKpUn2xRqJ/aHU90vZxJTif8H1UIWxdx/SBNNK4aGg=; b=N+/6rDZbg0Tz3p982yvQgYB7sXJEKRz2FdckDeHNyLms8r90HtE6lvQUzCF3ZWU9Bf 4FRrmv/Gd77mtwWL9XDpCXaOxgnRFWcxGx5o43MUc+BiNsBAYVONgZtajHGPlf1TWn+O /xeGcFV3H8X+mvetKH++WQh+inPmjqdvl7Nkhgxla0souPcRRypDCoBPMvgPfYBlczaJ 3JV75wk0z3PUrCRM+BpYC/NMNiSWEWHA4J4EFSDJypVu1bNCtGp6shIbZwcAZaVb4vO5 RKNuRV+t08bHEF88izFQAaSXCa/6u2HNT5Q9fi2jAIl4oZ0y0rtnjFPzxTgjAJ3YAngb bYWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=JJ5mxr+j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id u2-20020a656702000000b005b915369810si10570720pgf.590.2023.12.14.03.04.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 03:04:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=JJ5mxr+j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id AB279808EE69; Thu, 14 Dec 2023 03:04:46 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443855AbjLNLEb (ORCPT + 99 others); Thu, 14 Dec 2023 06:04:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443808AbjLNLEa (ORCPT ); Thu, 14 Dec 2023 06:04:30 -0500 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A871A11D; Thu, 14 Dec 2023 03:04:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702551877; x=1734087877; h=message-id:date:mime-version:to:cc:references:from: subject:in-reply-to:content-transfer-encoding; bh=5QYydh+nV7rO0ti2n05onJEK+DBqaZEzvPhqHsdKqkQ=; b=JJ5mxr+jnlSxsqAb9p84T896HqGkJqWhUvWPg4ZsRPQ7cWc8iZrJXn8C abUMpTODzs5ogEdCQUGaJRVxccaRpB+CPiX+8rQ7Ly50ouhQZxWGAhMIT 3QumVcm1ITnv/h9u5QDp5vpEVw3Tl/YsMJikkyd5JQbjQLgeFxiacaz98 C0tbHa4fZv2mXzUNbZWjZk6dBOPHCZxg4MkrrA/HX4tmqN/R61MiV85jn dV7LI5N/NIdxuzzhCObiYPdGKbto6WXs9J0vILBd+6D+Up2/12VeZ6OdZ v18YMQU4KOg87aFprqhBicCYM8+Kl9OZg0BvV79u0AiRsXIHMf+7lSWw1 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10923"; a="2185979" X-IronPort-AV: E=Sophos;i="6.04,275,1695711600"; d="scan'208";a="2185979" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Dec 2023 03:04:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10923"; a="767572456" X-IronPort-AV: E=Sophos;i="6.04,275,1695711600"; d="scan'208";a="767572456" Received: from mattu-haswell.fi.intel.com (HELO [10.237.72.199]) ([10.237.72.199]) by orsmga007.jf.intel.com with ESMTP; 14 Dec 2023 03:04:30 -0800 Message-ID: <7fdd62c6-f492-1f7e-9eca-9f965cdd73ef@linux.intel.com> Date: Thu, 14 Dec 2023 13:05:52 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.13.0 Content-Language: en-US To: Sam Edwards , Mathias Nyman , Thinh Nguyen Cc: Greg Kroah-Hartman , Heiko Stuebner , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org References: <20231208210458.912776-1-CFSworks@gmail.com> From: Mathias Nyman Subject: Re: [PATCH 0/2] Allow disabling USB3 ports in xHCI/DWC3 In-Reply-To: <20231208210458.912776-1-CFSworks@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 14 Dec 2023 03:04:46 -0800 (PST) On 8.12.2023 23.04, Sam Edwards wrote: > Hi USB devs, > > This patchset is a semi-RFC: I haven't discussed this change yet, and it may > turn out to be a bad idea. But if there is a consensus that this change is > appropriate, these patches are the ones I'd submit for inclusion. > > These patches were developed while working with a SoC (Rockchip RK3588) that > contains DWC3-OTG controllers and accompanying USB2 + USB3/DP PHYs. My target > (Turing RK1) uses its first bus in USB2.0-OTG mode only: the associated USB3 > PHY is reserved for DP. Worse, a driver for the USBDP block (though it exists) > has not been merged to mainline. Without lighting up the PHY side of the PIPE, > the DWC3 behaves erratically, even for USB2 operation. > > This could be addressed by patching in the (out-of-tree) USBDP driver and > enabling only its USB backend. However, I found it cleaner (also from a > user-friendliness standpoint) just to disable the unusable USB3 port. These > patches achieve that by (1) making it possible to tell the xHCI driver to > ignore any USB3 port(s), and (2) (perhaps more controversially) making the DWC3 > driver disable USB3 host ports when `maximum-speed` isn't set high enough. I don't think this will work as a generic xhci driver feature. Even if we ignore all USB3 ports in software they will for most xHC hosts be powered and enabled in hardware by default after controller reset. This means they perform link training, generate all kinds of events with interrupts (connect, over-current etc) that driver now can't handle. Sound like the setup you are using has a very specific issue, and it would need a narrow targeted quirk to solve it. > > There are other ways to disable the USB3 ports on RK3588, such as via some > syscon registers. I figured I would start with the most general solution > (benefitting other SoCs) first, getting more specific only if necessary. :) To me a specific solution to a specific problem like this sounds better. Thanks Mathias