lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 25 Mar 2021 21:33:53 +0800
From:   liulongfang <liulongfang@...wei.com>
To:     Greg KH <gregkh@...uxfoundation.org>
CC:     <mathias.nyman@...el.com>, <stern@...land.harvard.edu>,
        <linux-usb@...r.kernel.org>, <yisen.zhuang@...wei.com>,
        <tanxiaofei@...wei.com>, <liudongdong3@...wei.com>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH] USB:XHCI:Adjust the log level of hub

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 <liulongfang@...wei.com>
>> ---
>>  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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ