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: <20130402082952.GG30286@arwen.pp.htv.fi>
Date:	Tue, 2 Apr 2013 11:29:52 +0300
From:	Felipe Balbi <balbi@...com>
To:	Vivek Gautam <gautam.vivek@...sung.com>
CC:	<linux-usb@...r.kernel.org>, <linux-samsung-soc@...r.kernel.org>,
	<linux-omap@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<gregkh@...uxfoundation.org>, <balbi@...com>,
	<stern@...land.harvard.edu>, <sarah.a.sharp@...ux.intel.com>,
	<rob.herring@...xeda.com>, <kgene.kim@...sung.com>,
	<kishon@...com>, <dianders@...omium.org>, <t.figa@...sung.com>,
	<p.paneri@...sung.com>
Subject: Re: [PATCH v3 02/11] USB: dwc3: Adjust runtime pm to allow
 autosuspend

On Mon, Apr 01, 2013 at 07:24:01PM +0530, Vivek Gautam wrote:
> The current code in the dwc3 probe effectively disables runtime pm
> from ever working because it calls a get() that was never put() until
> device removal.  Change the runtime pm code to match the standard
> formula and allow runtime pm to function.
> 
> Signed-off-by: Vivek Gautam <gautam.vivek@...sung.com>
> CC: Doug Anderson <dianders@...omium.org>
> ---
>  drivers/usb/dwc3/core.c |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index e2325ad..3a6993c 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -491,6 +491,11 @@ static int dwc3_probe(struct platform_device *pdev)
>  
>  	dwc->needs_fifo_resize = of_property_read_bool(node, "tx-fifo-resize");
>  
> +	/* Setting device state as 'suspended' initially,

wrong comment style.

> +	 * to make sure we know device state prior to
> +	 * pm_runtime_enable
> +	 */
> +	pm_runtime_set_suspended(dev);

didn't Alan mention this should be done at the Bus level ? In that case,
shouldn't you have call pm_runtime_set_active/suspended() based on
DT's status=okay or status=disabled ? Or something similar ?

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ