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]
Message-ID: <b6669d20-935f-5d81-7975-cd36518cd0d4@skidata.com>
Date:   Mon, 23 Oct 2017 23:55:12 +0200
From:   Richard Leitner <richard.leitner@...data.com>
To:     Serge Semin <fancer.lancer@...il.com>,
        <gregkh@...uxfoundation.org>, <robh+dt@...nel.org>,
        <mark.rutland@....com>
CC:     <Sergey.Semin@...latforms.ru>, <linux-usb@...r.kernel.org>,
        <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        Richard Leitner <richard.leitner@...data.com>
Subject: Re: [PATCH 09/10 v3] usb: usb251xb: Add max power/current dts
 property support

Hi,
again some nit-picks below...

On 10/22/2017 10:38 PM, Serge Semin wrote:
> This parameters may be varied in accordance with hardware specifics.
> So lets add the corresponding settings to the usb251xb driver dts
> specification.
> 
> Signed-off-by: Serge Semin <fancer.lancer@...il.com>
> ---
>   drivers/usb/misc/usb251xb.c | 24 ++++++++++++++++++++----
>   1 file changed, 20 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c
> index 29432fd3b..669b98be2 100644
> --- a/drivers/usb/misc/usb251xb.c
> +++ b/drivers/usb/misc/usb251xb.c
> @@ -500,6 +500,26 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
>   		}
>   	}
>   
> +	hub->max_power_sp = USB251XB_DEF_MAX_POWER_SELF;
> +	if (!of_property_read_u32(np, "sp-max-total-current-microamp",
> +	    &property_u32))

Please match the "correct" (of_property_read_u32) opening parenthesis 
here...

> +		hub->max_power_sp = min_t(u8, property_u32 / 2000, 50);
> +
> +	hub->max_power_bp = USB251XB_DEF_MAX_POWER_BUS;
> +	if (!of_property_read_u32(np, "bp-max-total-current-microamp",
> +	    &property_u32))

... and here ...

> +		hub->max_power_bp = min_t(u8, property_u32 / 2000, 255);
> +
> +	hub->max_current_sp = USB251XB_DEF_MAX_CURRENT_SELF;
> +	if (!of_property_read_u32(np, "sp-max-removable-current-microamp",
> +	    &property_u32))

... and here ...

> +		hub->max_current_sp = min_t(u8, property_u32 / 2000, 50);
> +
> +	hub->max_current_bp = USB251XB_DEF_MAX_CURRENT_BUS;
> +	if (!of_property_read_u32(np, "bp-max-removable-current-microamp",
> +	    &property_u32))

... and here ...

> +		hub->max_current_bp = min_t(u8, property_u32 / 2000, 255);
> +
>   	hub->power_on_time = USB251XB_DEF_POWER_ON_TIME;
>   	if (!of_property_read_u32(np, "power-on-time-ms", &property_u32))
>   		hub->power_on_time = min_t(u8, property_u32 / 2, 255);

Thanks!

kind regards,
Richard.L

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ