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: <Pine.LNX.4.44L0.0908071130440.3063-100000@iolanthe.rowland.org>
Date:	Fri, 7 Aug 2009 11:41:23 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
cc:	Linux-pm mailing list <linux-pm@...ts.linux-foundation.org>,
	Magnus Damm <magnus.damm@...il.com>, Greg KH <gregkh@...e.de>,
	Pavel Machek <pavel@....cz>, Len Brown <lenb@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH update x2] PM: Introduce core framework for run-time PM
 of I/O devices (rev. 13)

On Thu, 6 Aug 2009, Rafael J. Wysocki wrote:

> Hi,
> 
> The patch below should address all of your most recent comments.

Only two comments.


> +static int __pm_request_idle(struct device *dev)
> +{
...
> +	if (dev->power.request_pending) {
> +		/* Any requests other then RPM_REQ_IDLE take precedence. */
> +		if (dev->power.request != RPM_REQ_NONE)

Replace != with ==.

> +			dev->power.request = RPM_REQ_IDLE;
> +		else if (dev->power.request != RPM_REQ_IDLE)
> +			retval = -EAGAIN;
> +		return retval;


> --- linux-2.6.orig/drivers/base/dd.c
> +++ linux-2.6/drivers/base/dd.c
...
> @@ -306,6 +317,8 @@ static void __device_release_driver(stru
>  
>  	drv = dev->driver;
>  	if (drv) {
> +		pm_runtime_disable(dev);
> +
>  		driver_sysfs_remove(dev);
>  
>  		if (dev->bus)
> @@ -324,6 +337,8 @@ static void __device_release_driver(stru
>  			blocking_notifier_call_chain(&dev->bus->p->bus_notifier,
>  						     BUS_NOTIFY_UNBOUND_DRIVER,
>  						     dev);
> +
> +		pm_runtime_enable(dev);
>  	}
>  }

We may need to be more careful here.  The driver's remove method may
want to do some runtime PM stuff to the device before giving up
control.  On the other hand I'm not sure what _should_ be done here, so
I can't suggest anything better.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ