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: <3a69b51c-9e2a-2d36-27cd-2619f9e3a356@quicinc.com>
Date:   Sat, 25 Feb 2023 12:05:04 +0530
From:   Prashanth K <quic_prashk@...cinc.com>
To:     Thinh Nguyen <Thinh.Nguyen@...opsys.com>
CC:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jakob Koschel <jakobkoschel@...il.com>,
        Jó Ágila Bitsch <jgilab@...il.com>,
        Alan Stern <stern@...land.harvard.edu>,
        Pratham Pratap <quic_ppratap@...cinc.com>,
        Jack Pham <quic_jackp@...cinc.com>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 2/2] usb: gadget: composite: Draw 100mA current if not
 configured



On 25-02-23 12:08 am, Thinh Nguyen wrote:
> On Fri, Feb 24, 2023, Prashanth K wrote:
>>
>>
>> On 24-02-23 01:40 am, Thinh Nguyen wrote:
>>> On Thu, Feb 23, 2023, Prashanth K wrote:
>>>> Currently we don't change the current value if device isn't in
>>>> configured state. But the battery charging specification says,
>>>
>>> Can you provide the spec section also?
>>>
>> 1.2 Background
>> 1.4.13 Standard Downstream Port
>>
>> Did you mean to add these in the commit message?
> 
> Yes, it's better to have the reference in case we need to revisit this.
I have added it in v4 patch, thanks for pointing it out.
> 
>>>> device can draw up to 100mA of current if its in unconfigured
>>>
>>> Is this related to being self-powered?
> 
>> I think its applicable for bus-powered devices.
> 
> No, I mean before configured state, is the device considered
> self-powered? Since being self-powered means drawing 100mA or less, we
> can use USB_SELF_POWER_VBUS_MAX_DRAW to provide more context. If it's
> totally unrelated, then you can ignore this.
> 
> Thanks,
> Thinh
As per my understanding, those are 2 different things. A self-powered 
device isn't allowed to draw more than 100mA. And an unconfigured device
isn't allowed to draw more than 100mA (in HS). One thing that I recently 
found out is that, as per usb3.0 spec, SS device can only draw up to 
150mA if its unconfigured state. So i have to check the speed and set 
the current values accordingly.

Thanks,
Prashanth K

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ