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]
Date:	Mon, 5 Dec 2011 19:08:27 +1100
From:	NeilBrown <neilb@...e.de>
To:	Chen Peter-B29397 <B29397@...escale.com>
Cc:	Ming Lei <tom.leiming@...il.com>,
	"Rafael J. Wysocki" <rjw@...k.pl>, Greg KH <greg@...ah.com>,
	"gregkh@...e.de" <gregkh@...e.de>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	"stern@...land.harvard.edu" <stern@...land.harvard.edu>,
	"hzpeterchen@...il.com" <hzpeterchen@...il.com>,
	Igor Grinberg <grinberg@...pulab.co.il>
Subject: Re: [PATCH 1/1] driver core: disable device's runtime pm during
 shutdown

On Mon, 5 Dec 2011 05:53:27 +0000 Chen Peter-B29397 <B29397@...escale.com>
wrote:

> 
>  
> > > > So it is asleep when the new pm_runtime_disable() call is made, so it
> > stays
> > > > asleep, omap_i2c_xfer cannot wake it, the transfer doesn't happen and
> > the
> > > > system doesn't get powered off.
> > > >
> > > > So here is a device that should *not* have pm disabled at shutdown.
> > > >
> > > > So I feel this fix is a little too heavy-handed.
> > >
> > > Maybe the device's runtime PM should not be disabled if
> > > there is no ->shutdown defined in its driver, how about the blew?
> > 
> > Thanks, but that won't actually help.
> > 
> > dev->bus->shutdown is i2c_device_shutdown so there is a shutdown method.
> > However i2c_device_shutdown just finds the driver can calls
> > driver->shutdown(), and that is the 'shutdown' that is NULL.
> > 
> Then, i2c should be registered before than twl4030 as a platform device, since
> twl4030 is an i2c device. Just let i2c shut down later than twl4030's. 

It almost certainly is, but that is totally irrelevant.

The problem has nothing to do with ordering and nothing much to do with
->shutdown() being called.

The problem is simply that pm_runtime_disable() is being called on all
devices, and that stops devices that are asleep from waking up.

I think the intention of putting that call in was to stop devices that are
awake from going to sleep, and maybe that is justified.  But stopping devices
that are asleep from waking up isn't.

NeilBrown


> 
> > Thanks,
> > NeilBrown
> > 
> > 
> > 


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ