RE: 2.6.21-rc1: known regressions (part 1)
"Karasyov, Konstantin A" <[email protected]>
| Newsgroups | gmane.linux.acpi.devel,gmane.linux.kernel,gmane.linux.power-management.general,gmane.linux.usb.devel |
|---|---|
| Message-ID | <E3C0BCA40296C347AF7142161DB9FC82B2EDB2@mssmsx411> |
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:[email protected]] >Sent: Sunday, February 25, 2007 8:53 PM >To: Linus Torvalds; Andrew Morton >Cc: Linux Kernel Mailing List; Pavel Machek; Marcel Holtmann; linux- >[email protected]; Michael S. Tsirkin; Ingo Molnar; [email protected]; linux- >[email protected]; Yu, Luming; Arkadiusz Miskiewicz; Karasyov, >Konstantin A; [email protected]; Thomas Meyer; Andrew; >Janosch Machowinski; Lebedev, Vladimir P; Lukas Hejtmanek; >[email protected]; [email protected]; 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 <[email protected]> >Caused-By : Konstantin Karasyov <[email protected]> > commit 0a6139027f3986162233adc17285151e78b39cac >Status : unknown > >
usb_power.patch
(application/octet-stream, 1.4 KB)
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;
}