Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp392076pxf; Thu, 25 Mar 2021 06:37:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdVsI9B+Hq+6Nr9H7/Xu56OA0zdvxGP58TmrHsT3imDDWy4W3pOeRb+cydmZ3ygCbGcPCZ X-Received: by 2002:aa7:d987:: with SMTP id u7mr8970026eds.326.1616679460475; Thu, 25 Mar 2021 06:37:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616679460; cv=none; d=google.com; s=arc-20160816; b=aVbgbPo1dVvezTKnHre7kIO+Yyx75UVkyiSpiUuM7ziZ2aJM2Yz1npWHGDeo4RFxLN vqdNgAPAIHoSbx0c6RTyce757aeYSNSnFQfqZh83NrAqb4T9oHOvl4OVVKTuC4L4z7MX FhAEjqEddwZHamqetH/iV2oE8iUhJGdyxjWB4aT4ngN7rrDrXplMtYcyYDrtcxW3Rkjd WpSAqPzNK8jTPV49WubTr3ZSniPC+nh5fxWO8gE+GBh9vkBzyLR0s5lBlkU9d/dUOSDq sIlvQnhPg4QBOzDSvueyHLyUlao63OeU112KQ5NGm7FM5EV76VX5mKCX3PoUhoNXvUqq D2ZQ== 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=B0LbmVrLPZ3TIoVun046IN9aEsiQGB2amcMFuU1kpKI=; b=Uhrzl3nrZAWvtMtO1yvjCNKV8RPz9QHKlIrMAwEG/Vd//JengBaUL3oIKWQcOyRSGT PW3Y9lNUeQrCN1qs1cXkpVlfQ+pg2hwxvZ65MnvKtt62xkN57kI29pWE9UbVNnuhoUCg JrdAGClToSsuO8DULg03kwwimJnrp1ly83beFnY3gZmi9nN4e3+ogjKKytPiXsQIitb1 SYuz5jKHlFIbcJj87OcXihrcrCUHblCdsNcfK2u7oPiNfnbFf/HiUHDEQWMpbPoU5KUe MX1LSKt0gPgsFTmfxtU2w/HY8DnrdXiWv0KjIERoA4jTDY0ubrFvd1nzbLnjyCm/eHWs a7HQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cw21si4127868edb.344.2021.03.25.06.37.16; Thu, 25 Mar 2021 06:37:40 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231146AbhCYNej (ORCPT + 99 others); Thu, 25 Mar 2021 09:34:39 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:14876 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230101AbhCYNeL (ORCPT ); Thu, 25 Mar 2021 09:34:11 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4F5mH66m12z9t1D; Thu, 25 Mar 2021 21:32:02 +0800 (CST) Received: from [10.67.102.118] (10.67.102.118) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.498.0; Thu, 25 Mar 2021 21:33:53 +0800 Subject: Re: [RFC PATCH] USB:XHCI:Adjust the log level of hub To: Greg KH CC: , , , , , , References: <1616666652-37920-1-git-send-email-liulongfang@huawei.com> From: liulongfang Message-ID: Date: Thu, 25 Mar 2021 21:33:53 +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: 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/3/25 18:31, Greg KH wrote: > On Thu, Mar 25, 2021 at 06:04:12PM +0800, Longfang Liu wrote: >> When the number of ports of the hub is not between 1 and Maxports, >> it will only exit the registration of the hub on the current controller, >> but it will not affect the function of the controller itself. Its other >> hubs can operate normally, so the log level here can be changed from >> error to information. >> >> Signed-off-by: Longfang Liu >> --- >> drivers/usb/core/hub.c | 10 ++++------ >> 1 file changed, 4 insertions(+), 6 deletions(-) >> >> diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c >> index b1e14be..70294ad 100644 >> --- a/drivers/usb/core/hub.c >> +++ b/drivers/usb/core/hub.c >> @@ -1409,13 +1409,11 @@ static int hub_configure(struct usb_hub *hub, >> maxchild = min_t(unsigned, maxchild, USB_SS_MAXPORTS); >> >> if (hub->descriptor->bNbrPorts > maxchild) { >> - message = "hub has too many ports!"; >> - ret = -ENODEV; >> - goto fail; >> + dev_info(hub_dev, "hub has too many ports!\n"); > > Is this an error? If so, report it as such, not as "information". > >> + return -ENODEV; >> } else if (hub->descriptor->bNbrPorts == 0) { >> - message = "hub doesn't have any ports!"; >> - ret = -ENODEV; >> - goto fail; >> + dev_info(hub_dev, "hub doesn't have any ports!\n"); > > Same here. > > What problem are you trying to solve here? > > What hub do you have that has no ports, or too many, that you think > should still be able to work properly? > > thanks, > > greg k-h > . >On our test platform, the xhci usb3 hub has no port. when initializing the usb3 hub, an error will be reported because the port is 0, but in fact it will not affect the use of usb2, and the usb2 hub is working normally. thanks, therefore, in order to reduce the severity of the log, we hope to lower the level of this log. Longfang thanks.