mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Pascal Lengard <pascal.lengard@wanadoo.fr>
Cc: alan@lxorguk.ukuu.org.uk, suonpaa@iki.fi, linux-kernel@vger.kernel.org
Subject: Re: apm suspend broken ?
Date: Thu, 1 Nov 2001 01:51:36 +1100	[thread overview]
Message-ID: <20011101015136.084c65cd.sfr@canb.auug.org.au> (raw)
In-Reply-To: <Pine.LNX.4.33.0110310208410.2024-100000@co2.localdomain>
In-Reply-To: <E15yXjJ-0006Hr-00@the-village.bc.nu> <Pine.LNX.4.33.0110310208410.2024-100000@co2.localdomain>

Hi Pascal,

On Wed, 31 Oct 2001 02:27:31 +0100 (CET) Pascal Lengard <pascal.lengard@wanadoo.fr> wrote:
>
> 2.4.10-pre11 ==> apm works
> 2.4.10-pre12 ==> apm broken

Can you try the following patch, please?  This is the relevant part of a
patch that was applied to Alan Cox's kernels.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

--- 2.4.14-pre5/drivers/char/pc_keyb.c	Mon Sep 24 05:12:49 2001
+++ 2.4.13-ac5/drivers/char/pc_keyb.c	Tue Oct 30 17:42:28 2001
@@ -34,6 +34,7 @@
 #include <linux/vt_kern.h>
 #include <linux/smp_lock.h>
 #include <linux/kd.h>
+#include <linux/pm.h>
 
 #include <asm/keyboard.h>
 #include <asm/bitops.h>
@@ -397,29 +398,32 @@
 	    return 0200;
 }
 
-void pckbd_pm_resume(void)
+int pckbd_pm_resume(struct pm_dev *dev, pm_request_t rqst, void *data) 
 {
 #if defined CONFIG_PSMOUSE
        unsigned long flags;
 
-       if (queue) {                    /* Aux port detected */
-               if (aux_count == 0) {   /* Mouse not in use */ 
-                       spin_lock_irqsave(&kbd_controller_lock, flags);
-                       /*
-                        * Dell Lat. C600 A06 enables mouse after resume.
-                        * When user touches the pad, it posts IRQ 12
-                        * (which we do not process), thus holding keyboard.
-                        */
-                       kbd_write_command(KBD_CCMD_MOUSE_DISABLE);
-                       /* kbd_write_cmd(AUX_INTS_OFF); */ /* Config & lock */
-                       kb_wait();
-                       kbd_write_command(KBD_CCMD_WRITE_MODE);
-                       kb_wait();
-                       kbd_write_output(AUX_INTS_OFF);
-                       spin_unlock_irqrestore(&kbd_controller_lock, flags);
-               }
+       if (rqst == PM_RESUME) {
+               if (queue) {                    /* Aux port detected */
+                       if (aux_count == 0) {   /* Mouse not in use */ 
+                               spin_lock_irqsave(&kbd_controller_lock, flags);
+			       /*
+				* Dell Lat. C600 A06 enables mouse after resume.
+				* When user touches the pad, it posts IRQ 12
+				* (which we do not process), thus holding keyboard.
+				*/
+			       kbd_write_command(KBD_CCMD_MOUSE_DISABLE);
+			       /* kbd_write_cmd(AUX_INTS_OFF); */ /* Config & lock */
+			       kb_wait();
+			       kbd_write_command(KBD_CCMD_WRITE_MODE);
+			       kb_wait();
+			       kbd_write_output(AUX_INTS_OFF);
+			       spin_unlock_irqrestore(&kbd_controller_lock, flags);
+		       }
+	       }
        }
-#endif       
+#endif
+       return 0;
 }
 
 
--- 2.4.14-pre5/include/asm-i386/keyboard.h	Wed Oct 24 22:05:26 2001
+++ 2.4.13-ac5/include/asm-i386/keyboard.h	Tue Oct 30 17:42:41 2001
@@ -16,6 +16,7 @@
 #include <linux/kernel.h>
 #include <linux/ioport.h>
 #include <linux/kd.h>
+#include <linux/pm.h>
 #include <asm/io.h>
 
 #define KEYBOARD_IRQ			1
@@ -28,7 +29,8 @@
 extern char pckbd_unexpected_up(unsigned char keycode);
 extern void pckbd_leds(unsigned char leds);
 extern void pckbd_init_hw(void);
-extern void pckbd_pm_resume(void);
+extern int pckbd_pm_resume(struct pm_dev *, pm_request_t, void *);
+extern pm_callback pm_kbd_request_override;
 extern unsigned char pckbd_sysrq_xlate[128];
 
 #define kbd_setkeycode		pckbd_setkeycode

  parent reply	other threads:[~2001-11-01  0:01 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-30 10:55 Pascal Lengard
2001-10-30 11:43 ` Samuli Suonpaa
2001-10-30 12:10   ` Alan Cox
2001-10-31  1:27     ` Pascal Lengard
2001-10-31 11:08       ` Alan Cox
2001-10-31 13:54       ` [lkml] " Ian Soboroff
2001-10-31 14:51     ` Stephen Rothwell [this message]
2001-11-02  8:31       ` Pascal Lengard
2001-11-29 18:50         ` Pascal Lengard
2001-11-15 17:43     ` Samuli Suonpaa
2001-11-15 17:58       ` Alan Cox
2002-01-21 16:24 ` preemption and pccard ? Pascal Lengard
2001-10-30 15:58 apm suspend broken ? Thomas Hood
2001-10-30 16:04 Thomas Hood
2001-10-30 16:18 Thomas Hood
2001-10-31 14:28 ` Stephen Rothwell
2001-10-31  4:05 Thomas Hood
2001-11-02 12:38 Thomas Hood
2001-11-29 19:59 Thomas Hood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011101015136.084c65cd.sfr@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pascal.lengard@wanadoo.fr \
    --cc=suonpaa@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®