* trackpoint dead after S3 suspend
@ 2003-11-13 17:05 Brian Perkins
[not found] ` <3FB3B9D0.5020408-ooduxAEi7gVg9hUCZPvPmw@public.gmane.org>
0 siblings, 1 reply; 8+ messages in thread
From: Brian Perkins @ 2003-11-13 17:05 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Suspend is becoming downright usable on my Thinkpad R32 under
2.6.0-test9, but I still have a showstopper:
http://bugme.osdl.org/show_bug.cgi?id=1279
describes the mouse being dead after resume. Reloading the psmouse
modules doesn't work for me either, but I don't get the same error
message for some reason.
Looks to me that this bug was improperly filed under "other" instead of
ACPI.
Any thoughts?
I also noticed that ACPID stopped receicing events for some, reason.
I have the exact same behavior of S4 susepend, FWIW.
My DSDT, in case it is of interest:
http://throb.netspace.org/~bperk/dsdt-IBMR32.dsl
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
^ permalink raw reply [flat|nested] 8+ messages in thread[parent not found: <3FB3B9D0.5020408-ooduxAEi7gVg9hUCZPvPmw@public.gmane.org>]
* Re: trackpoint dead after S3 suspend [not found] ` <3FB3B9D0.5020408-ooduxAEi7gVg9hUCZPvPmw@public.gmane.org> @ 2003-11-13 18:12 ` Karol Kozimor 2003-11-16 22:53 ` Pavel Machek 1 sibling, 0 replies; 8+ messages in thread From: Karol Kozimor @ 2003-11-13 18:12 UTC (permalink / raw) To: Brian Perkins; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f Thus wrote Brian Perkins: > Suspend is becoming downright usable on my Thinkpad R32 under > 2.6.0-test9, but I still have a showstopper: > > http://bugme.osdl.org/show_bug.cgi?id=1279 > > describes the mouse being dead after resume. Reloading the psmouse > modules doesn't work for me either, but I don't get the same error > message for some reason. > > Looks to me that this bug was improperly filed under "other" instead of > ACPI. This may be well related to the input core not supporting suspend / resume. FYI: my keyboard and touchpad will not work after S3 resume. Reloading atkbd.ko helps for the keyboard, don't know for the touchpad though. Vojtek says it's on his todo-lit, but this particular problem has gone unfixed for more than half a year... see if reloading the whole serio and input core helps, it might. Also, do a cat /proc/interrupts to see if there are any serio interrupts after resume. Best regards, -- Karol 'sziwan' Kozimor sziwan-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org ------------------------------------------------------- This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: trackpoint dead after S3 suspend [not found] ` <3FB3B9D0.5020408-ooduxAEi7gVg9hUCZPvPmw@public.gmane.org> 2003-11-13 18:12 ` Karol Kozimor @ 2003-11-16 22:53 ` Pavel Machek [not found] ` <20031116225331.GA206-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org> 1 sibling, 1 reply; 8+ messages in thread From: Pavel Machek @ 2003-11-16 22:53 UTC (permalink / raw) To: Brian Perkins; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f Hi! > Suspend is becoming downright usable on my Thinkpad R32 under > 2.6.0-test9, but I still have a showstopper: > > http://bugme.osdl.org/show_bug.cgi?id=1279 > > describes the mouse being dead after resume. Reloading the psmouse > modules doesn't work for me either, but I don't get the same error > message for some reason. > > Looks to me that this bug was improperly filed under "other" instead of > ACPI. Its actually input problem. This might help, (untested!). Pavel --- clean/drivers/input/serio/i8042.c 2003-09-28 22:05:48.000000000 +0200 +++ linux/drivers/input/serio/i8042.c 2003-11-16 23:39:32.000000000 +0100 @@ -18,6 +18,7 @@ #include <linux/reboot.h> #include <linux/init.h> #include <linux/serio.h> +#include <linux/sysdev.h> #include <asm/io.h> @@ -398,18 +399,15 @@ * desired. */ -static int __init i8042_controller_init(void) +static int i8042_controller_init(void) { - /* * Test the i8042. We need to know if it thinks it's working correctly * before doing anything else. */ i8042_flush(); - if (i8042_reset) { - unsigned char param; if (i8042_command(¶m, I8042_CMD_CTL_TEST)) { @@ -783,6 +781,38 @@ values->mux = index; } +static int i8042_resume_port(struct serio *port) +{ + struct serio_dev *dev = port->dev; + if (dev) { +#if 0 + dev->disconnect(port); + dev->connect(port, dev); +#endif + serio_close(port); + serio_open(port, dev); + } +} + +static int i8042_resume(struct sys_device *dev) +{ + if (i8042_controller_init()) + printk(KERN_ERR "i8042: resume failed\n"); + i8042_resume_port(&i8042_aux_port); + i8042_resume_port(&i8042_kbd_port); + return 0; +} + +static struct sysdev_class kbc_sysclass = { + set_kset_name("i8042"), + .resume = i8042_resume, +}; + +static struct sys_device device_i8042 = { + .id = 0, + .cls = &kbc_sysclass, +}; + int __init i8042_init(void) { int i; @@ -819,6 +849,14 @@ register_reboot_notifier(&i8042_notifier); + { + int error = sysdev_class_register(&kbc_sysclass); + if (!error) + error = sys_device_register(&device_i8042); + if (error) + printk(KERN_CRIT "Unable to register i8042 to driver model\n"); + } + return 0; } -- When do you have a heart between your knees? [Johanka's followup: and *two* hearts?] ------------------------------------------------------- This SF. Net email is sponsored by: GoToMyPC GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free! https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <20031116225331.GA206-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>]
* Re: trackpoint dead after S3 suspend [not found] ` <20031116225331.GA206-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org> @ 2003-11-19 14:58 ` Karol Kozimor [not found] ` <20031119145809.GA14399-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org> 0 siblings, 1 reply; 8+ messages in thread From: Karol Kozimor @ 2003-11-19 14:58 UTC (permalink / raw) To: Pavel Machek; +Cc: Brian Perkins, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f Thus wrote Pavel Machek: > Its actually input problem. This might help, (untested!). This actually makes my keyboard *not* work after any suspend, including the previously-OK S1. Your last patch was better for my system, it seems. Best regards, -- Karol 'sziwan' Kozimor sziwan-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <20031119145809.GA14399-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>]
* Re: trackpoint dead after S3 suspend [not found] ` <20031119145809.GA14399-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org> @ 2003-11-19 19:08 ` Pavel Machek 2003-11-23 7:13 ` Brian Perkins 1 sibling, 0 replies; 8+ messages in thread From: Pavel Machek @ 2003-11-19 19:08 UTC (permalink / raw) To: Pavel Machek, Brian Perkins, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f Hi! > > Its actually input problem. This might help, (untested!). > > This actually makes my keyboard *not* work after any suspend, including the > previously-OK S1. Your last patch was better for my system, it seems. Does at least your mouse work after S1? If so you probably want to comment out resume of aux port. -- Pavel Written on sharp zaurus, because my Velo1 broke. If you have Velo you don't need... ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: trackpoint dead after S3 suspend [not found] ` <20031119145809.GA14399-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org> 2003-11-19 19:08 ` Pavel Machek @ 2003-11-23 7:13 ` Brian Perkins [not found] ` <3FC05E17.1010208-ooduxAEi7gVg9hUCZPvPmw@public.gmane.org> 1 sibling, 1 reply; 8+ messages in thread From: Brian Perkins @ 2003-11-23 7:13 UTC (permalink / raw) To: Karol Kozimor; +Cc: Pavel Machek, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f Karol Kozimor wrote: >Thus wrote Pavel Machek: > > >>Its actually input problem. This might help, (untested!). >> >> > >This actually makes my keyboard *not* work after any suspend, including the >previously-OK S1. Your last patch was better for my system, it seems. >Best regards, > > > I tried a very naive hack, which gets a step closer to fixing things. I essentially copied i8042_init to the resume function. It's terribly ugly, and incorrect in a myriad of ways, but the mouse is responding. Unfortunately it appears that the mouse is still not generating interrupts, so the mouse response is slow and jerky. I fooled around quite a bit, but wasn't able to do any better than this. Probably not very helpful, but I thought I pass this on. ===== i8042.c 1.32 vs 1.34 ===== --- 1.32/drivers/input/serio/i8042.c Fri Sep 26 02:56:26 2003 +++ 1.34/drivers/input/serio/i8042.c Sun Nov 23 01:33:42 2003 @@ -18,6 +18,7 @@ #include <linux/reboot.h> #include <linux/init.h> #include <linux/serio.h> +#include <linux/sysdev.h> #include <asm/io.h> @@ -398,18 +399,15 @@ * desired. */ -static int __init i8042_controller_init(void) +static int i8042_controller_init(void) { - /* * Test the i8042. We need to know if it thinks it's working correctly * before doing anything else. */ i8042_flush(); - if (i8042_reset) { - unsigned char param; if (i8042_command(¶m, I8042_CMD_CTL_TEST)) { @@ -683,7 +681,7 @@ static int __init i8042_port_register(struct i8042_values *values, struct serio *port) { values->exists = 1; - + i8042_ctr &= ~values->disable; if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) { @@ -783,6 +781,83 @@ values->mux = index; } +static int i8042_resume_port(struct serio *port) +{ + struct serio_dev *dev = port->dev; + if (dev) { +#if 1 + dev->disconnect(port); + dev->connect(port, dev); +#endif + serio_close(port); + serio_open(port, dev); + serio_rescan(port); + } +} + +static int i8042_resume(struct sys_device *dev) +{ + if (i8042_controller_init()) + printk(KERN_ERR "i8042: resume failed\n"); + i8042_resume_port(&i8042_aux_port); + i8042_resume_port(&i8042_kbd_port); + return 0; +} + +static int i8042_resume2(struct sys_device *dev) +{ + + int i; + printk(KERN_ERR "i8042_resume2 line:%d\n",__LINE__); + + if (i8042_platform_init()) + return -EBUSY; + printk(KERN_ERR "i8042_resume2 line:%d\n",__LINE__); + i8042_aux_values.irq = I8042_AUX_IRQ; + i8042_kbd_values.irq = I8042_KBD_IRQ; + printk(KERN_ERR "i8042_resume2 line:%d\n",__LINE__); + if (i8042_controller_init()) + return -ENODEV; + printk(KERN_ERR "i8042_resume2 line:%d\n",__LINE__); + if (i8042_dumbkbd) + i8042_kbd_port.write = NULL; + printk(KERN_ERR "i8042_resume2 line:%d\n",__LINE__); + + for (i = 0; i < 4; i++) + i8042_init_mux_values(i8042_mux_values + i, i8042_mux_port + i, i); + + if (!i8042_nomux && !i8042_check_mux(&i8042_aux_values)) + for (i = 0; i < 4; i++) + i8042_port_register(i8042_mux_values + i, i8042_mux_port + i); + else + if (!i8042_noaux && !i8042_check_aux(&i8042_aux_values)) + i8042_port_register(&i8042_aux_values, &i8042_aux_port); + + i8042_port_register(&i8042_kbd_values, &i8042_kbd_port); + init_timer(&i8042_timer); + printk(KERN_ERR "i8042_resume2 line:%d\n",__LINE__); + i8042_timer.function = i8042_timer_func; + printk(KERN_ERR "i8042_resume2 line:%d\n",__LINE__); + mod_timer(&i8042_timer, jiffies + I8042_POLL_PERIOD); + printk(KERN_ERR "i8042_resume2 line:%d\n",__LINE__); + + i8042_resume_port(&i8042_aux_port); + i8042_resume_port(&i8042_kbd_port); + + + return 0; +} + +static struct sysdev_class kbc_sysclass = { + set_kset_name("i8042"), + .resume = i8042_resume2, +}; + +static struct sys_device device_i8042 = { + .id = 0, + .cls = &kbc_sysclass, +}; + int __init i8042_init(void) { int i; @@ -818,6 +893,14 @@ mod_timer(&i8042_timer, jiffies + I8042_POLL_PERIOD); register_reboot_notifier(&i8042_notifier); + + { + int error = sysdev_class_register(&kbc_sysclass); + if (!error) + error = sys_device_register(&device_i8042); + if (error) + printk(KERN_CRIT "Unable to register i8042 to driver model\n"); + } return 0; } ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <3FC05E17.1010208-ooduxAEi7gVg9hUCZPvPmw@public.gmane.org>]
* Re: trackpoint dead after S3 suspend [not found] ` <3FC05E17.1010208-ooduxAEi7gVg9hUCZPvPmw@public.gmane.org> @ 2003-11-23 10:32 ` Pavel Machek [not found] ` <3FC1A754.5080209@netspace.org> 0 siblings, 1 reply; 8+ messages in thread From: Pavel Machek @ 2003-11-23 10:32 UTC (permalink / raw) To: Brian Perkins; +Cc: Karol Kozimor, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f Hi! > >>Its actually input problem. This might help, (untested!). > >> > >> > > > >This actually makes my keyboard *not* work after any suspend, including the > >previously-OK S1. Your last patch was better for my system, it seems. > >Best regards, > > > > > > > I tried a very naive hack, which gets a step closer to fixing things. > I essentially copied i8042_init to the resume function. It's terribly > ugly, and incorrect in a myriad of ways, but the mouse is responding. > Unfortunately it appears that the mouse is still not generating > interrupts, so the mouse response is slow and jerky. > I fooled around quite a bit, but wasn't able to do any better than this. > > Probably not very helpful, but I thought I pass this on. Uhmm, yes this is really way too ugly. See l-k to find similar code done less ugly way... (I did it yesterday). Pavel -- When do you have a heart between your knees? [Johanka's followup: and *two* hearts?] ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <3FC1A754.5080209@netspace.org>]
[parent not found: <3FC1A754.5080209-ooduxAEi7gVg9hUCZPvPmw@public.gmane.org>]
* Re: trackpoint dead after S3 suspend [not found] ` <3FC1A754.5080209-ooduxAEi7gVg9hUCZPvPmw@public.gmane.org> @ 2003-11-24 9:54 ` Pavel Machek 0 siblings, 0 replies; 8+ messages in thread From: Pavel Machek @ 2003-11-24 9:54 UTC (permalink / raw) To: Brian Perkins; +Cc: ACPI mailing list Hi! > the patch you posted to l-k still doesn't work. > It wasn't clean, so I had to hand patch it against the current bk tree. > I'm not sure if I might have been missing another patch. > Anyway, the following patch to i8042.c(instead of yours) causes my > keyboard to work. > It's not a major modification, mostly it saves the control register > before suspending, and then resetting it on resume. It is at least whitespace-damaged... [And I do not like the approach... You only reinit single register; is it possible that it breaks on another system where other registers are forgotten over suspend?] Pavel -- When do you have a heart between your knees? [Johanka's followup: and *two* hearts?] ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2003-11-24 9:54 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-13 17:05 trackpoint dead after S3 suspend Brian Perkins
[not found] ` <3FB3B9D0.5020408-ooduxAEi7gVg9hUCZPvPmw@public.gmane.org>
2003-11-13 18:12 ` Karol Kozimor
2003-11-16 22:53 ` Pavel Machek
[not found] ` <20031116225331.GA206-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2003-11-19 14:58 ` Karol Kozimor
[not found] ` <20031119145809.GA14399-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
2003-11-19 19:08 ` Pavel Machek
2003-11-23 7:13 ` Brian Perkins
[not found] ` <3FC05E17.1010208-ooduxAEi7gVg9hUCZPvPmw@public.gmane.org>
2003-11-23 10:32 ` Pavel Machek
[not found] ` <3FC1A754.5080209@netspace.org>
[not found] ` <3FC1A754.5080209-ooduxAEi7gVg9hUCZPvPmw@public.gmane.org>
2003-11-24 9:54 ` Pavel Machek
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox