Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2952856pxb; Sun, 28 Feb 2021 19:50:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJzBFhpr9K9p9uIifAUEXIm9RU/scoBxniD5Vl9x0sfdkHrOJ6mv4wqXdlrpbMAKXh065Ev2 X-Received: by 2002:a17:906:565a:: with SMTP id v26mr7949908ejr.516.1614570635727; Sun, 28 Feb 2021 19:50:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614570635; cv=none; d=google.com; s=arc-20160816; b=Z3GN5r0eoGu2MOM4i2dXG5I6B3+NrTxUDJTMUWiYDAP5VyQ2YvpEKD/lFKyUq3/XhX pJtE6YWJx4B0RIL5syVipaAuHRli2eFyND+xfpAK1NojF+rvsEcAAs0j6VUEnI+VgS9q vQFbQU6tDzXxk40VQORVO3CCEDkjsJqXc/rbU2ZxFMv8jDx3Id/x/rwqxqvzy0wW77Jm Wvn1U1OmmtQJn2x8okwAlHw3g6m2lJ3MApgRuApS5yv5h3dlTVGHNAVJM/AxhMFE+dwT SWy7SzPkNeBx/2uSkjDC4/tFvgNSRd19CoKXYFN6zU3LupMdtqGT+aRqwxmKm18SYFvx DwPQ== 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 :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=GL8JFPY6lPINkbQymbONoquxg6tQkJI04qIXF0s81hs=; b=T1MQD8gx2QLV6IjFsfX27BY5OooAsIJxTKgVS9Cdd4EGMzyWbHf4Ug061xFTOsT6rD GE0DkJYrI6Isn6x7M1QjSUWrCnry8emHk0SnIQKOJLZFCzH7NnTFxxqGNnqA2LLMz6YE YLQGLGyZwEH2rqS85C1NVfhK563w8hU86WYNcvdZyR5P7UXxUFrXkbAfFKLMx7zsvRhU R1XayWZDAMgu0a9Jw8K3j3JX5ukdvL8Z1pzEhgsf5VzLQHgwByF0W6q8Kp1YNCsU04kx Id61w4+WJ2mlmk4VHcG+WyBRgEUT80Gia0aJ+1yKzgJ2hiSs1R9rtLwnycZ6pd/Qv4Hw Mt4A== 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 x16si3909961edd.234.2021.02.28.19.50.13; Sun, 28 Feb 2021 19:50:35 -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 S231491AbhCAB7g (ORCPT + 99 others); Sun, 28 Feb 2021 20:59:36 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:13023 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230437AbhCAB7f (ORCPT ); Sun, 28 Feb 2021 20:59:35 -0500 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4Dpjzt5SxTzMSfq; Mon, 1 Mar 2021 09:56:42 +0800 (CST) Received: from [10.67.102.118] (10.67.102.118) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.498.0; Mon, 1 Mar 2021 09:58:42 +0800 Subject: Re: [RFC PATCH] USB:XHCI:Modify XHCI driver for USB2.0 controller To: Alan Stern CC: , , , , References: <1614327697-1021-1-git-send-email-liulongfang@huawei.com> <20210226163004.GB1392547@rowland.harvard.edu> <20210227162703.GA1429200@rowland.harvard.edu> From: liulongfang Message-ID: <770f03f2-0df2-1821-0f7e-9f27145c8c6b@huawei.com> Date: Mon, 1 Mar 2021 09:58:42 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20210227162703.GA1429200@rowland.harvard.edu> Content-Type: text/plain; charset="gbk" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.102.118] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/2/28 0:27, Alan Stern Wrote: > 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 > . > Yes, you are right. when I run lsusb on a system that has this xHCI hardware, the system displays two USB buses: a USB-2 bus and a USB-3 bus. Both of these are xHCI host controllers, but USB-3 bus's roothub is zero. Thanks. Longfang Liu.