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:	Wed, 19 Jun 2013 10:25:08 +0100
From:	Russell King - ARM Linux <linux@....linux.org.uk>
To:	Mark Brown <broonie@...nel.org>
Cc:	Mika Westerberg <mika.westerberg@...ux.intel.com>,
	linux-kernel@...r.kernel.org, Eric Miao <eric.y.miao@...il.com>,
	Haojian Zhuang <haojian.zhuang@...il.com>,
	Grant Likely <grant.likely@...aro.org>
Subject: Re: [PATCH 2/2] spi/pxa2xx: use a flag to check if the device is
	runtime suspended

On Tue, Jun 18, 2013 at 07:09:48PM +0100, Mark Brown wrote:
> On Tue, Jun 18, 2013 at 05:29:45PM +0300, Mika Westerberg wrote:
> > Current code calls pm_runtime_suspended() in the interrupt handler to check
> > if the device is suspended or not. However, runtime PM status of the device
> > is only set to suspended once all PM runtime suspend hooks have executed.
> 
> > In our case we have the device bound to the ACPI power domain and its
> > runtime suspend hook will put the device to D3hot (or D3cold if possible).
> > This effectively means that the device is powered off before its state is
> > set to runtime suspended. During this time, it might get an interrupt that
> > is meant for another device (as the interrupt line is shared), and because
> > the device is powered off accessing its registers will return 0xffffffff
> > that the driver misinterprets as an invalid state. When this happens user
> > will see messages like below on the console:
> 
> This sounds like a problem which will affect a lot of devices and hence
> ought to be handled better by the PM core or at least frameworks in
> general.  Is it really device specific?

It's always been something that has been recommended to be dealt with
by the driver.  If reading the interrupt status you read ~0, then it
likely is because the device is powered down or removed from the system.

PCMCIA drivers have done this for years.
--
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