Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp525471pxf; Thu, 8 Apr 2021 07:55:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7FCFnGCszbPRZr4uC0HhwAzYU29i0LLPJsLwrEUcDD9N/FNXkd6yHe0WDt7K9yh4thOHM X-Received: by 2002:a50:c3c2:: with SMTP id i2mr12005517edf.23.1617893707512; Thu, 08 Apr 2021 07:55:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617893707; cv=none; d=google.com; s=arc-20160816; b=sZLNH1CTfG+hFBES0Tl0qEaid7A5rZMgBV7XIRoG+lw+EnOahPqf2CZcM/wG6cQr1b WdmJeSnes7x623Fc9g4oZMV9lLwt7BFkixW/DT/03dtUFmClvowM62rFIuVPhQxpI6J+ 7RzKISM+YWcVba8AbFOegcgSLRPCjBy4yyMlUjVjekclGy1HfiNEtDMNXtq6tfnCQV/E RmVJMvNpHfh11vg0MCE1zeYbZf+wnLRie2KtLbRu3GjSFFxCuXhxuSTQlQoGxlPICLXM m81mRErM7yd6M9jRVA2kseHpSRd9GIOsVApzDL+oqBRbTLUcBJs+oKJgqLyZrWjD9Txw Sj9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=FIlzwIDjqcI5q9TeT0aQ//espJDItPhUo+Yz5/eEL/s=; b=ct+vorTSUau5mguEQCNelbEWnejWT++YAAghWSs4bApD5x7YiWnlwVHFIXPVZ9Y6sA /29wAGrAsK16CHqEVhvmsOPrw+5iy9F3tT65tW6R/Xcp49nYXWoyBcsvmId9YjoY2mVv hIEBfAkqaqULLzv7MgvNR74PF24ng3xwa4tT4PGuNkkDYAmt0TDNoRIm6kHABV+FnygB b60EyGqiqQXfnJv53/oa7BTBeRnkpPuzM8K8BwqNnX12aS/4L31Gxb1gXabE+L1dSm3L aePGgVwORcnLWC6YtcqmcEsL8rw592exiSE/8Ar8YEcrV/uszrY0YrYS/6vi5hgW1HGD RsaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rShlUtv3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lv2si11703711ejb.181.2021.04.08.07.54.44; Thu, 08 Apr 2021 07:55:07 -0700 (PDT) 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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rShlUtv3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231893AbhDHOxy (ORCPT + 99 others); Thu, 8 Apr 2021 10:53:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:40334 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231892AbhDHOxw (ORCPT ); Thu, 8 Apr 2021 10:53:52 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2F26460C3D; Thu, 8 Apr 2021 14:53:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617893620; bh=nW2krWtHpkH/S3XIOU+fa0NbL43wi1gA8FHgLCxc8E8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rShlUtv3O87kuYTXexcR9miWFcQCYNsisI+GId/PjnJYp2QhgV0ykD2rz39e724uO kLFgz2CXV5xSIYi1U6CbcDxCoqKpH1BNwBygEBJAlNSjaIYq/alPDIceO8s6kNPZWo +xSPxMsiCmrFk9aGCwh5PH2lCLrcn9UOrr6C2ZuI= Date: Thu, 8 Apr 2021 16:53:38 +0200 From: Greg KH To: liulongfang Cc: mathias.nyman@intel.com, stern@rowland.harvard.edu, liudongdong3@huawei.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, kong.kongxinwei@hisilicon.com, yisen.zhuang@huawei.com Subject: Re: [PATCH 1/2] USB:ehci:Add a whitelist for EHCI controllers Message-ID: References: <1617873073-37371-1-git-send-email-liulongfang@huawei.com> <1617873073-37371-2-git-send-email-liulongfang@huawei.com> <13446834-afc5-e713-d232-36c771059712@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <13446834-afc5-e713-d232-36c771059712@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 08, 2021 at 09:04:17PM +0800, liulongfang wrote: > On 2021/4/8 17:22, Greg KH Wrote: > > On Thu, Apr 08, 2021 at 05:11:12PM +0800, Longfang Liu wrote: > >> Some types of EHCI controllers do not have SBRN registers. > >> By comparing the white list, the operation of reading the SBRN > >> registers is skipped. > >> > >> Subsequent EHCI controller types without SBRN registers can be > >> directly added to the white list. > >> > >> The current patch does not affect the drive function. > >> > >> Signed-off-by: Longfang Liu > >> --- > >> drivers/usb/host/ehci-pci.c | 27 +++++++++++++++++++++++---- > >> 1 file changed, 23 insertions(+), 4 deletions(-) > >> > >> diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c > >> index 3c3820a..6a30afa 100644 > >> --- a/drivers/usb/host/ehci-pci.c > >> +++ b/drivers/usb/host/ehci-pci.c > >> @@ -47,6 +47,28 @@ static inline bool is_bypassed_id(struct pci_dev *pdev) > >> return !!pci_match_id(bypass_pci_id_table, pdev); > >> } > >> > >> +static const struct usb_nosbrn_whitelist_entry { > >> + unsigned short vendor; > >> + unsigned short device; > > > > u16 here please. > > > >> +} usb_nosbrn_whitelist[] = { > >> + /* STMICRO ConneXT has no sbrn register */ > >> + {PCI_VENDOR_ID_STMICRO, PCI_DEVICE_ID_STMICRO_USB_HOST}, > >> + {} > > > > trailing , please. > > > > Is it necessary to add "," at the end here? Yes please.