Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2042497pxb; Sat, 27 Feb 2021 08:29:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJzxP0G6JQUTQ0PPOTxCXWWWS7BfqHTcI6VyN5TH2VE1SG0pwmd57IGqks1uduG8cFLc2dCu X-Received: by 2002:aa7:db0c:: with SMTP id t12mr1802261eds.34.1614443350629; Sat, 27 Feb 2021 08:29:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614443350; cv=none; d=google.com; s=arc-20160816; b=HyjB22MJQ6FxfmkwupmagU9OVEEkq6V5gRA+umP8+7ueMEQQPe+Kx4JLTy327L//py 2yxN2104tiVR/KS4ShYz4we2bIhUIJKat5VmCDGHN3waM6sApPx7hLIzjVMqPn3GnAy2 IRUsF6qOfbmeYTYOKT7LxkYcu7fZcbCMlIs2ldKGUSfCBIdGrrbsLxEq6iVa1/fq27lE 7Cn/fX2HIEENdpmAOssALMZwphxc8WCiKCiM6tTG5dzTu9UwAkXRTwwQd4ZC+IoNm2NJ KjHtw5bmc+VVudGsLJwovKNz+6dg2cWqqoQRyTIEdLopwPB2/ni/fbNC6xvwUN3MRlcT UNoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=VniPXjwvI1yRhfRvZjL8MbdBDh7vIw7hcsemAlwIGaU=; b=DdfmcCgaGsdzi8SlA9bo8Oo1LjLPDaUEx1ts/GPOsPiisVrUzOmzuO2BCUCnMrDgj0 2Dcx4o7W+a2kOf+xiEySi0adb+0AmQJhlVEnO72egsh+08qS8V+X6j/to+HifBeRSyzp SQNLWOC0LlpQn2HDJhADo5y2u8nRMU+FngI/tDBiqzXNw56ZnGgOfxDuTGSbs53MI9Eo +josoXswj/g5u3vLlk8j0x/ATumYzuO497rvTZWENWAd2Qqp8C+BBLI6iEhvzWAMf6jb lH2owjC0Ivxlhudg8xyqTRcJhYVcYrl07TePQe/xqI9MQhapJ0eRzVtCUWsA0VQa4YBh njTA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id eb13si8559477edb.8.2021.02.27.08.28.48; Sat, 27 Feb 2021 08:29:10 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230194AbhB0Q1x (ORCPT + 99 others); Sat, 27 Feb 2021 11:27:53 -0500 Received: from netrider.rowland.org ([192.131.102.5]:55941 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S230169AbhB0Q1q (ORCPT ); Sat, 27 Feb 2021 11:27:46 -0500 Received: (qmail 1429364 invoked by uid 1000); 27 Feb 2021 11:27:03 -0500 Date: Sat, 27 Feb 2021 11:27:03 -0500 From: Alan Stern To: liulongfang Cc: gregkh@linuxfoundation.org, mathias.nyman@intel.com, linux-usb@vger.kernel.org, yisen.zhuang@huawei.com, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] USB:XHCI:Modify XHCI driver for USB2.0 controller Message-ID: <20210227162703.GA1429200@rowland.harvard.edu> References: <1614327697-1021-1-git-send-email-liulongfang@huawei.com> <20210226163004.GB1392547@rowland.harvard.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 27, 2021 at 11:38:08AM +0800, liulongfang wrote: > On 2021/2/27 0:30, Alan Stern wrote: > > On Fri, Feb 26, 2021 at 04:21:37PM +0800, Longfang Liu wrote: > >> Our current XHCI hardware controller has been customized to only > >> support USB 2.0 ports. When using the current xhci driver, an xhci > >> controller device and an ehci controller device will be created > >> automatically. > > > > That sentence makes no sense at all. An EHCI controller device is a > > piece of hardware. How can an xHCI driver, which is a piece of > > software, create a piece of hardware? > > > > Alan Stern > > . > > > The hardware device is a complete USB3.0 controller, > but I hope to support a USB2.0-only mode through software configuration. Even if it only supports USB-2.0 connections, an xHCI controller is still an xHCI controller. It doesn't magically transform into an EHCI controller. You are not creating an EHCI controller device. Rather, you are trying to restrict an xHCI controller device to make it handle only USB-2.0 connections. If you run lsusb on a system that has an xHCI controller, you'll see that the controller is bound to two USB buses: a USB-2 bus and a USB-3 bus. But for both buses, the controller is xHCI -- not EHCI. Your patch description is inaccurate. Alan Stern