RE: 2.6.21-rc1: known regressions (part 1)

Karasyov, Konstantin A
2007-02-28T18:16:59Z

[-- Attachment #1: Type: text/plain, Size: 1706 bytes --]

Arkadiusz,

Could try the attached patch to see if it solves the problem?
If not, please send the output of acpidump command and log.

Regards.
Konstantin.

>-----Original Message-----
>From: Adrian Bunk [mailto:bunk@stusta.de]
>Sent: Sunday, February 25, 2007 8:53 PM
>To: Linus Torvalds; Andrew Morton
>Cc: Linux Kernel Mailing List; Pavel Machek; Marcel Holtmann; linux-
>pm@lists.osdl.org; Michael S. Tsirkin; Ingo Molnar; lenb@kernel.org;
linux-
>acpi@vger.kernel.org; Yu, Luming; Arkadiusz Miskiewicz; Karasyov,
>Konstantin A; linux-usb-devel@lists.sourceforge.net; Thomas Meyer;
Andrew;
>Janosch Machowinski; Lebedev, Vladimir P; Lukas Hejtmanek;
>jgarzik@pobox.com; linux-ide@vger.kernel.org; Meelis Roos; Alan Cox;
Fabio
>Comolli; Jean-Luc Coulon; Markus Trippelsdorf; Tejun Heo; Rafael J.
Wysocki
>Subject: 2.6.21-rc1: known regressions (part 1)
>
>This email lists some known regressions in 2.6.21-rc1 compared to
2.6.20
>that are not yet fixed in Linus' tree.
>
>If you find your name in the Cc header, you are either submitter of one
>of the bugs, maintainer of an affectected subsystem or driver, a patch
>of you caused a breakage or I'm considering you in any other way
possibly
>involved with one or more of these issues.
>
>Due to the huge amount of recipients, please trim the Cc when
answering.
>
>
>Subject : HP nx6325 notebook: usb mouse stops working after suspend
to
>ram
>References : http://lkml.org/lkml/2007/2/21/413
>Submitter : Arkadiusz Miskiewicz <arekm@maven.pl>
>Caused-By : Konstantin Karasyov <konstantin.a.karasyov@intel.com>
> commit 0a6139027f3986162233adc17285151e78b39cac
>Status : unknown
>
>

[-- Attachment #2: usb_power.patch --]
[-- Type: application/octet-stream, Size: 1443 bytes --]

diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c
index 1ef3385..866c8e7 100644
--- a/drivers/acpi/power.c
+++ b/drivers/acpi/power.c
@@ -436,8 +436,6 @@ int acpi_power_transition(struct acpi_device *device, int state)
cl = &device->power.states[device->power.state].resources;
tl = &device->power.states[state].resources;

- device->power.state = ACPI_STATE_UNKNOWN;
-
if (!cl->count && !tl->count) {
result = -ENODEV;
goto end;
@@ -468,12 +466,15 @@ int acpi_power_transition(struct acpi_device *device, int state)
goto end;
}

- /* We shouldn't change the state till all above operations succeed */
- device->power.state = state;
- end:
- if (result)
+ end:
+ if (result) {
+ device->power.state = ACPI_STATE_UNKNOWN;
printk(KERN_WARNING PREFIX "Transitioning device [%s] to D%d\n",
device->pnp.bus_id, state);
+ } else {
+ /* We shouldn't change the state till all above operations succeed */
+ device->power.state = state;
+ }

return result;
}
@@ -690,7 +691,8 @@ static int acpi_power_resume(struct acpi_device *device)
if ((resource->state == ACPI_POWER_RESOURCE_STATE_ON) &&
list_empty(&resource->reference)) {
mutex_unlock(&resource->resource_lock);
- result = acpi_power_off_device(device->handle, NULL);
+// result = acpi_power_off_device(device->handle, NULL);
+printk("RESUME: power resource %s found to be OFF\n", device->pnp.bus_id);
return result;
}