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: <20230320132252.GA1440894-robh@kernel.org>
Date:   Mon, 20 Mar 2023 08:22:52 -0500
From:   Rob Herring <robh@...nel.org>
To:     Roger Quadros <rogerq@...nel.org>
Cc:     Thinh.Nguyen@...opsys.com, stern@...land.harvard.edu,
        gregkh@...uxfoundation.org, vigneshr@...com, srk@...com,
        r-gunasekaran@...com, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [RFC PATCH 1/2] dt-bindings: usb: snps,dwc3: Add
 'snps,gadget-keep-connect-sys-sleep'

On Mon, Mar 20, 2023 at 11:34:46AM +0200, Roger Quadros wrote:
> The current USB gadget driver behaviour is to stop the controller
> and disconnect from the bus during System sleep.

What's USB gadget? ;)

> The 'snps,gadget-keep-connect-sys-sleep' property can be used to
> change this behaviour and keep the controller active and connected
> to the bus during System sleep. This is useful for applications
> that want to enter a low power state when USB is suspended but
> remain connected so they can resume activity on USB resume.
> 
> This feature introduces a new constraint if Gadget driver is connected
> to USB host: i.e.  the gadget must be in USB suspend state to allow
> a System sleep as we cannot process any USB transactions
> when in System sleep.
> 
> The system hardware is responsible to detect the end of USB suspend
> and wake up the system so we can begin processing the USB transactions
> as soon as possible.

Sounds like something the user/OS would want to choose rather than fixed 
by your board's firmware.

Is this somehow DWC3 specific? If not, why a DWC3 specific property?

> 
> Cc: devicetree@...r.kernel.org
> Signed-off-by: Roger Quadros <rogerq@...nel.org>
> ---
>  Documentation/devicetree/bindings/usb/snps,dwc3.yaml | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml
> index be36956af53b..1ce8008e7fef 100644
> --- a/Documentation/devicetree/bindings/usb/snps,dwc3.yaml
> +++ b/Documentation/devicetree/bindings/usb/snps,dwc3.yaml
> @@ -262,6 +262,11 @@ properties:
>        asserts utmi_sleep_n.
>      type: boolean
>  
> +  snps,gadget-keep-connect-sys-sleep:
> +    description:
> +      If True then gadget driver will not disconnect during system sleep.
> +      System sleep will not be allowed if gadget is not already in USB suspend.

'gadget' is a Linuxism.

> +
>    snps,hird-threshold:
>      description: HIRD threshold
>      $ref: /schemas/types.yaml#/definitions/uint8
> -- 
> 2.34.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ