From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A97CBC433B4 for ; Fri, 9 Apr 2021 06:47:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7EBA2600D1 for ; Fri, 9 Apr 2021 06:47:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233492AbhDIGrw (ORCPT ); Fri, 9 Apr 2021 02:47:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:38752 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233335AbhDIGru (ORCPT ); Fri, 9 Apr 2021 02:47:50 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 13105610CF; Fri, 9 Apr 2021 06:47:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617950858; bh=rSrNGxxYkNoifYjlH9dOruBnwxN9o3793XnSWs7r/v0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Gwdz1GorxTe6LSDaLHoXzr4Q8RxAVqWFutm4Qtc5DCrGCaZgZ0WbF8UCzrwuMbpAW nV4+2b9dpoOt/pHpo2ZwCpkhgT9CRnOc+BJtEY2Jd4tOJQSKGWWXpf1UONF7GToI+n 77iuhvK0wgBr2TjoLg/4uHG56CYmQFKLkpdZtEKc= Date: Fri, 9 Apr 2021 08:47:36 +0200 From: Greg KH To: liulongfang Cc: Alan Stern , mathias.nyman@intel.com, liudongdong3@huawei.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, kong.kongxinwei@hisilicon.com, yisen.zhuang@huawei.com Subject: Re: [PATCH v2 0/2] USB:ehci:fix the no SRBN register problem Message-ID: References: <1617889760-17733-1-git-send-email-liulongfang@huawei.com> <20210408145332.GA1296449@rowland.harvard.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 09, 2021 at 10:42:35AM +0800, liulongfang wrote: > On 2021/4/8 22:53, Alan Stern wrote: > > On Thu, Apr 08, 2021 at 09:49:18PM +0800, Longfang Liu wrote: > >> (1) Add a whitelist for EHCI devices without SBRN registers. > >> (2) Add Kunpeng920's EHCI device to the whitelist. > >> > >> Changes in v2: > >> - Fix some code style issues. > >> - Update function name. > >> > >> Longfang Liu (2): > >> USB:ehci:Add a whitelist for EHCI controllers > >> USB:ehci:fix Kunpeng920 ehci hardware problem > >> > >> drivers/usb/host/ehci-pci.c | 30 ++++++++++++++++++++++++++---- > >> 1 file changed, 26 insertions(+), 4 deletions(-) > > > > I don't think we need a whole list, along with an associated lookup > > routine, when there are only two entries. The total amount of code will > > be smaller if you just add a check for the Kunpeng920 controller to > > the existing check for the STMICRO controller. > > > > Alan Stern > > . > > > Now there are two EHCI controllers that do not have SBRN registers, > and there may be more in the future. This list is added for subsequent > compatibility if there are such controllers, instead of a series of if-else. Why would more people create new EHCI controllers these days with the cheapness of USB 3 cores? Anyway, let us worry about that if this list gets "too long", a simple if statement is fine for now. thanks, greg k-h