linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] acpi: fix regression on D3hot detection
@ 2012-05-15 15:28 Lekensteyn
  2012-05-15 15:47 ` Rafael J. Wysocki
  0 siblings, 1 reply; 10+ messages in thread
From: Lekensteyn @ 2012-05-15 15:28 UTC (permalink / raw)
  To: Len Brown; +Cc: linux-acpi

Commit 1cc0c998fdf2cb665d625fb565a0d6db5c81c639 tried clear up some confusion
around D3hot and D3cold but accidentally changed behaviour on validating device
power states. It added an extra condition: i < ACPI_STATE_D3_HOT which means
that only states D0, D1 and D2 are accepted if there are no power resources but
the _PSx method exist. D3(hot) is missing here.

This fixes https://bugzilla.kernel.org/show_bug.cgi?id=43228

Reported-by: rockorequin@hotmail.com
Signed-off-by: Peter Lekensteyn <lekensteyn@gmail.com>
Tested-by: rockorequin@hotmail.com
---
 drivers/acpi/scan.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 7417267..932c427 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -895,7 +895,7 @@ static int acpi_bus_get_power_flags(struct acpi_device *device)
 		 * D3hot is only valid if _PR3 present.
 		 */
 		if (ps->resources.count ||
-		    (ps->flags.explicit_set && i < ACPI_STATE_D3_HOT))
+		    (ps->flags.explicit_set && i <= ACPI_STATE_D3_HOT))
 			ps->flags.valid = 1;
 
 		ps->power = -1;	/* Unknown - driver assigned */
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-05-17 21:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-15 15:28 [PATCH] acpi: fix regression on D3hot detection Lekensteyn
2012-05-15 15:47 ` Rafael J. Wysocki
     [not found]   ` <1430051.zWhrZKIcmE@penguin>
2012-05-15 17:28     ` Rafael J. Wysocki
2012-05-16 10:24       ` Rafael J. Wysocki
2012-05-16 20:15         ` [PATCH] ACPI / PCI / PM: Fix device PM regression related to D3hot/D3cold Rafael J. Wysocki
2012-05-16 20:50           ` [Update][PATCH] " Rafael J. Wysocki
2012-05-16 20:47             ` Cristian Rodríguez
2012-05-16 21:01               ` Rafael J. Wysocki
2012-05-17 19:34                 ` [Update 3x][PATCH] " Rafael J. Wysocki
2012-05-17 21:56                   ` [Update 4x][PATCH] " Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).