Hi,

Current powermgmt branch includes my always_on patch for mouse and
keyboard, thanks for that! Unfortunately it seems the mouse does _not_
come back to life in that branch, it needs a kick to get going again.
You can do a

# echo -n reconnect > /sys/bus/serio/devices/serio1/drvctl

to bring it back to life, I'll suggest adding the first included patch
here to disable always_on for the olpc mouse until we find out what the
issue is. The keyboard works fine.

Second, while testing this, I did an rmmod psmouse which oopsed the
kernel. The problem is that drivers/input/evdev.c:evdev_release() does
a list_del() on the evdev_list node, but evdev_disconnect() does a
list_for_each_entry() on that node. So if release is called before
disconnect, we'll oops because list->next will be the list poison value.
The fix is easy, just use list_del_init() to reinit the list on
deletion. I'll send this one to the maintainer as well.

-- 
Jens Axboe

diff --git a/drivers/input/mouse/olpc.c b/drivers/input/mouse/olpc.c
index a02d0af..74575b8 100644
--- a/drivers/input/mouse/olpc.c
+++ b/drivers/input/mouse/olpc.c
@@ -513,7 +513,13 @@ int olpc_init(struct psmouse *psmouse)
 	psmouse->disconnect = olpc_disconnect;
 	psmouse->reconnect = olpc_reconnect;
 	psmouse->pktsize = 6;
-	psmouse->ps2dev.serio->always_on = 1;
+
+	/*
+	 * this SHOULD work set to 1 to reduce suspend/resume time, but
+	 * currently (on b2 hardware), we need to connect/reconnect to bring
+	 * the mouse back to life.
+	 */
+	psmouse->ps2dev.serio->always_on = 0;
 
 	/* Disable the idle resync. */
 	psmouse->resync_time = 0;
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index 6439f37..e3a6241 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -110,7 +110,7 @@ static int evdev_release(struct inode * inode, struct file * file)
 	}
 
 	evdev_fasync(-1, file, 0);
-	list_del(&list->node);
+	list_del_init(&list->node);
 
 	if (!--list->evdev->open) {
 		if (list->evdev->exist)

_______________________________________________
Devel mailing list
[email protected]
http://mailman.laptop.org/mailman/listinfo/devel

Reply via email to