public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* input subsystem config ?
@ 2002-07-16 14:34 Stelian Pop
  2002-07-17  9:56 ` Stelian Pop
  0 siblings, 1 reply; 21+ messages in thread
From: Stelian Pop @ 2002-07-16 14:34 UTC (permalink / raw)
  To: Linux Kernel Mailing List

I have problems with the input subsystem in the latest BK tree,
on a Sony Vaio laptop (regular keyboard, integrated PS/2 trackball):
the keyboard works but the mouse is never initialized (nothing in 
the logs, AUX irq not reserved etc).

Before I submit a proper bug report, could someone confirm that
the input susbystem is supposed to be working now and what
config should I use (I tried several config options, all input
items 'Y', or some items compiled as modules etc).

Thanks,

Stelian.
-- 
Stelian Pop <stelian.pop@fr.alcove.com>
Alcove - http://www.alcove.com

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: input subsystem config ?
  2002-07-16 14:34 input subsystem config ? Stelian Pop
@ 2002-07-17  9:56 ` Stelian Pop
  2002-07-17 10:01   ` Vojtech Pavlik
  0 siblings, 1 reply; 21+ messages in thread
From: Stelian Pop @ 2002-07-17  9:56 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: Vojtech Pavlik

On Tue, Jul 16, 2002 at 04:34:15PM +0200, Stelian Pop wrote:

> I have problems with the input subsystem in the latest BK tree,
> on a Sony Vaio laptop (regular keyboard, integrated PS/2 trackball):
                                                           ^^^^^^^^^
pointing stick in fact

> the keyboard works but the mouse is never initialized (nothing in 
> the logs, AUX irq not reserved etc).
> 
> Before I submit a proper bug report, could someone confirm that
> the input susbystem is supposed to be working now and what
> config should I use (I tried several config options, all input
> items 'Y', or some items compiled as modules etc).

Ok, here comes a more detalied bug report, based upon 2.5.26:

Relevant boot messages:
	ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
	 hda: 23579136 sectors w/512KiB Cache, CHS=23392/16/63, UDMA(33)
	 hda: [PTBL] [1467/255/63] hda1 hda2 hda3 < hda5 hda6 >
	mice: PS/2 mouse device common for all mice
	input.c: calling /sbin/hotplug input [HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add PRODUCT=11/1/2/ab02 NAME=AT Set 2 keyboard]
	input.c: hotplug returned -2
	input: AT Set 2 keyboard on isa0060/serio0
	serio: i8042 KBD port at 0x60,0x64 irq 1
	serio: i8042 AUX port at 0x60,0x64 irq 12
	NET4: Linux TCP/IP 1.0 for NET4.0

However, irq 12 is not used after boot:

           CPU0       
	     0:     443973          XT-PIC  timer
	     1:         18          XT-PIC  i8042
	     2:          0          XT-PIC  cascade
	     3:       2470          XT-PIC  pcnet_cs
	     8:          1          XT-PIC  rtc
	     9:        122          XT-PIC  acpi, uhci-hcd, Ricoh Co Ltd RL5c475
 	    14:       9259          XT-PIC  ide0
	   NMI:          0 
	   ERR:          1

My .config:

	$ egrep "INPUT|MOUSE|KEYB|SERIO|8042" .config | grep -v ^#
	CONFIG_INPUT=y
	CONFIG_INPUT_KEYBDEV=y
	CONFIG_INPUT_MOUSEDEV=y
	CONFIG_INPUT_MOUSEDEV_PSAUX=y
	CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
	CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
	CONFIG_SERIO=y
	CONFIG_SERIO_I8042=y
	CONFIG_I8042_REG_BASE=60
	CONFIG_I8042_KBD_IRQ=1
	CONFIG_I8042_AUX_IRQ=12
	CONFIG_INPUT_KEYBOARD=y
	CONFIG_KEYBOARD_ATKBD=y
	CONFIG_INPUT_MOUSE=y
	CONFIG_MOUSE_PS2=y
	CONFIG_USB_HIDINPUT=y

Should I enable some extra debug somewhere ?

Stelian.
-- 
Stelian Pop <stelian.pop@fr.alcove.com>
Alcove - http://www.alcove.com

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: input subsystem config ?
  2002-07-17  9:56 ` Stelian Pop
@ 2002-07-17 10:01   ` Vojtech Pavlik
  2002-07-17 10:10     ` Stelian Pop
  0 siblings, 1 reply; 21+ messages in thread
From: Vojtech Pavlik @ 2002-07-17 10:01 UTC (permalink / raw)
  To: Stelian Pop, Linux Kernel Mailing List, Vojtech Pavlik

On Wed, Jul 17, 2002 at 11:56:18AM +0200, Stelian Pop wrote:
> On Tue, Jul 16, 2002 at 04:34:15PM +0200, Stelian Pop wrote:
> 
> > I have problems with the input subsystem in the latest BK tree,
> > on a Sony Vaio laptop (regular keyboard, integrated PS/2 trackball):
>                                                            ^^^^^^^^^
> pointing stick in fact
> 
> > the keyboard works but the mouse is never initialized (nothing in 
> > the logs, AUX irq not reserved etc).
> > 
> > Before I submit a proper bug report, could someone confirm that
> > the input susbystem is supposed to be working now and what
> > config should I use (I tried several config options, all input
> > items 'Y', or some items compiled as modules etc).
> 
> Ok, here comes a more detalied bug report, based upon 2.5.26:
> 
> Relevant boot messages:
> 	ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
> 	 hda: 23579136 sectors w/512KiB Cache, CHS=23392/16/63, UDMA(33)
> 	 hda: [PTBL] [1467/255/63] hda1 hda2 hda3 < hda5 hda6 >
> 	mice: PS/2 mouse device common for all mice
> 	input.c: calling /sbin/hotplug input [HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add PRODUCT=11/1/2/ab02 NAME=AT Set 2 keyboard]
> 	input.c: hotplug returned -2
> 	input: AT Set 2 keyboard on isa0060/serio0
> 	serio: i8042 KBD port at 0x60,0x64 irq 1
> 	serio: i8042 AUX port at 0x60,0x64 irq 12
> 	NET4: Linux TCP/IP 1.0 for NET4.0
> 
> However, irq 12 is not used after boot:
> 
>            CPU0       
> 	     0:     443973          XT-PIC  timer
> 	     1:         18          XT-PIC  i8042
> 	     2:          0          XT-PIC  cascade
> 	     3:       2470          XT-PIC  pcnet_cs
> 	     8:          1          XT-PIC  rtc
> 	     9:        122          XT-PIC  acpi, uhci-hcd, Ricoh Co Ltd RL5c475
>  	    14:       9259          XT-PIC  ide0
> 	   NMI:          0 
> 	   ERR:          1
> 
> My .config:
> 
> 	$ egrep "INPUT|MOUSE|KEYB|SERIO|8042" .config | grep -v ^#
> 	CONFIG_INPUT=y
> 	CONFIG_INPUT_KEYBDEV=y
> 	CONFIG_INPUT_MOUSEDEV=y
> 	CONFIG_INPUT_MOUSEDEV_PSAUX=y
> 	CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
> 	CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
> 	CONFIG_SERIO=y
> 	CONFIG_SERIO_I8042=y
> 	CONFIG_I8042_REG_BASE=60
> 	CONFIG_I8042_KBD_IRQ=1
> 	CONFIG_I8042_AUX_IRQ=12
> 	CONFIG_INPUT_KEYBOARD=y
> 	CONFIG_KEYBOARD_ATKBD=y
> 	CONFIG_INPUT_MOUSE=y
> 	CONFIG_MOUSE_PS2=y
> 	CONFIG_USB_HIDINPUT=y
> 
> Should I enable some extra debug somewhere ?

Yes, please, in drivers/input/serio/i8042.h

-- 
Vojtech Pavlik
SuSE Labs

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: input subsystem config ?
  2002-07-17 10:01   ` Vojtech Pavlik
@ 2002-07-17 10:10     ` Stelian Pop
  2002-07-17 12:08       ` Vojtech Pavlik
  0 siblings, 1 reply; 21+ messages in thread
From: Stelian Pop @ 2002-07-17 10:10 UTC (permalink / raw)
  To: Vojtech Pavlik; +Cc: Linux Kernel Mailing List

On Wed, Jul 17, 2002 at 12:01:35PM +0200, Vojtech Pavlik wrote:

> > Should I enable some extra debug somewhere ?
> 
> Yes, please, in drivers/input/serio/i8042.h

Here it comes:

...
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
 hda: 23579136 sectors w/512KiB Cache, CHS=23392/16/63, UDMA(33)
 hda: [PTBL] [1467/255/63] hda1 hda2 hda3 < hda5 hda6 >
mice: PS/2 mouse device common for all mice
i8042.c: fa <- i8042 (flush) [0]
i8042.c: 20 -> i8042 (command) [0]
i8042.c: 47 <- i8042 (return) [0]
i8042.c: 60 -> i8042 (command) [0]
i8042.c: 56 -> i8042 (parameter) [0]
i8042.c: 60 -> i8042 (command) [0]
i8042.c: 57 -> i8042 (parameter) [0]
i8042.c: f6 -> i8042 (kbd-data) [1]
i8042.c: fa <- i8042 (interrupt-kbd, 1) [3]
i8042.c: f2 -> i8042 (kbd-data) [4]
i8042.c: fa <- i8042 (interrupt-kbd, 1) [6]
i8042.c: ab <- i8042 (interrupt-kbd, 1) [12]
i8042.c: 60 -> i8042 (command) [12]
i8042.c: 56 -> i8042 (parameter) [12]
i8042.c: 60 -> i8042 (command) [12]
i8042.c: 57 -> i8042 (parameter) [12]
i8042.c: f5 -> i8042 (kbd-data) [12]
i8042.c: fa <- i8042 (interrupt-kbd, 1) [15]
i8042.c: f2 -> i8042 (kbd-data) [15]
i8042.c: fa <- i8042 (interrupt-kbd, 1) [18]
i8042.c: ab <- i8042 (interrupt-kbd, 1) [23]
i8042.c: 41 <- i8042 (interrupt-kbd, 1) [29]
i8042.c: ea -> i8042 (kbd-data) [29]
i8042.c: fe <- i8042 (interrupt-kbd, 1) [31]
i8042.c: f0 -> i8042 (kbd-data) [31]
i8042.c: fa <- i8042 (interrupt-kbd, 1) [34]
i8042.c: 02 -> i8042 (kbd-data) [34]
i8042.c: fa <- i8042 (interrupt-kbd, 1) [37]
i8042.c: f0 -> i8042 (kbd-data) [37]
i8042.c: fa <- i8042 (interrupt-kbd, 1) [40]
i8042.c: 00 -> i8042 (kbd-data) [40]
i8042.c: fa <- i8042 (interrupt-kbd, 1) [43]
i8042.c: 41 <- i8042 (interrupt-kbd, 1) [45]
input.c: calling /sbin/hotplug input [HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add PRODUCT=11/1/2/ab02 NAME=AT Set 2 keyboard]
input.c: hotplug returned -2
input: AT Set 2 keyboard on isa0060/serio0
i8042.c: f8 -> i8042 (kbd-data) [48]
i8042.c: fa <- i8042 (interrupt-kbd, 1) [51]
i8042.c: ed -> i8042 (kbd-data) [51]
i8042.c: fa <- i8042 (interrupt-kbd, 1) [54]
i8042.c: 00 -> i8042 (kbd-data) [55]
i8042.c: fa <- i8042 (interrupt-kbd, 1) [60]
i8042.c: f4 -> i8042 (kbd-data) [60]
i8042.c: fa <- i8042 (interrupt-kbd, 1) [63]
serio: i8042 KBD port at 0x60,0x64 irq 1
i8042.c: d3 -> i8042 (command) [63]
i8042.c: 5a -> i8042 (parameter) [63]
i8042.c: a5 <- i8042 (return) [63]
i8042.c: a9 -> i8042 (command) [63]
i8042.c: 00 <- i8042 (return) [63]
i8042.c: a7 -> i8042 (command) [63]
i8042.c: 20 -> i8042 (command) [64]
i8042.c: 67 <- i8042 (return) [64]
i8042.c: a9 -> i8042 (command) [64]
i8042.c: 00 <- i8042 (return) [64]
i8042.c: a8 -> i8042 (command) [64]
i8042.c: 20 -> i8042 (command) [64]
i8042.c: 47 <- i8042 (return) [64]
i8042.c: 60 -> i8042 (command) [64]
i8042.c: 75 -> i8042 (parameter) [64]
i8042.c: 60 -> i8042 (command) [65]
i8042.c: 77 -> i8042 (parameter) [65]
i8042.c: d4 -> i8042 (command) [65]
i8042.c: f6 -> i8042 (parameter) [65]
i8042.c: 60 -> i8042 (command) [66]
i8042.c: 77 -> i8042 (parameter) [66]
i8042.c: 60 -> i8042 (command) [153]
i8042.c: 75 -> i8042 (parameter) [153]
i8042.c: 60 -> i8042 (command) [153]
i8042.c: 77 -> i8042 (parameter) [153]
i8042.c: d4 -> i8042 (command) [153]
i8042.c: f5 -> i8042 (parameter) [153]
i8042.c: 60 -> i8042 (command) [154]
i8042.c: 77 -> i8042 (parameter) [154]
i8042.c: 60 -> i8042 (command) [241]
i8042.c: 75 -> i8042 (parameter) [241]
serio: i8042 AUX port at 0x60,0x64 irq 12
i8042.c: 60 -> i8042 (command) [242]
i8042.c: 45 -> i8042 (parameter) [242]
NET4: Linux TCP/IP 1.0 for NET4.0
...

Stelian.
-- 
Stelian Pop <stelian.pop@fr.alcove.com>
Alcove - http://www.alcove.com

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: input subsystem config ?
  2002-07-17 10:10     ` Stelian Pop
@ 2002-07-17 12:08       ` Vojtech Pavlik
  2002-07-17 13:24         ` Stelian Pop
  0 siblings, 1 reply; 21+ messages in thread
From: Vojtech Pavlik @ 2002-07-17 12:08 UTC (permalink / raw)
  To: Stelian Pop, Vojtech Pavlik, Linux Kernel Mailing List

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

On Wed, Jul 17, 2002 at 12:10:01PM +0200, Stelian Pop wrote:
> On Wed, Jul 17, 2002 at 12:01:35PM +0200, Vojtech Pavlik wrote:
> 
> > > Should I enable some extra debug somewhere ?
> > 
> > Yes, please, in drivers/input/serio/i8042.h
> 
> Here it comes:
> 
> i8042.c: 60 -> i8042 (command) [65]
> i8042.c: 77 -> i8042 (parameter) [65]
> i8042.c: d4 -> i8042 (command) [65]
> i8042.c: f6 -> i8042 (parameter) [65]

This is the bug. :) It tries to talk to the mouse before enabling the
mouse interface. I wonder how it could work ... probably many chipsets
ignore the disable bit altogether.

Please try with the attached i8042.c.

-- 
Vojtech Pavlik
SuSE Labs

[-- Attachment #2: i8042.c --]
[-- Type: text/plain, Size: 16544 bytes --]

/*
 *  i8042 keyboard and mouse controller driver for Linux
 *
 *  Copyright (c) 1999-2002 Vojtech Pavlik
 */

/*
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 as published by
 * the Free Software Foundation.
 */

#include <asm/io.h>

#include <linux/delay.h>
#include <linux/module.h>
#include <linux/ioport.h>
#include <linux/config.h>
#include <linux/reboot.h>
#include <linux/init.h>
#include <linux/serio.h>
#include <linux/sched.h>	/* request/free_irq */

#include "i8042.h"

MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
MODULE_DESCRIPTION("i8042 keyboard and mouse controller driver");
MODULE_LICENSE("GPL");

MODULE_PARM(i8042_noaux, "1i");
MODULE_PARM(i8042_unlock, "1i");
MODULE_PARM(i8042_reset, "1i");
MODULE_PARM(i8042_direct, "1i");

static int i8042_noaux;
static int i8042_unlock;
static int i8042_reset;
static int i8042_direct;

spinlock_t i8042_lock = SPIN_LOCK_UNLOCKED;

struct i8042_values {
	int irq;
	unsigned char disable;
	unsigned char irqen;
	unsigned char exists;
	unsigned char *name;
	unsigned char *phys;
};

static struct serio i8042_kbd_port;
static struct serio i8042_aux_port;
static unsigned char i8042_initial_ctr;
static unsigned char i8042_ctr;
struct timer_list i8042_timer;

#ifdef I8042_DEBUG_IO
static unsigned long i8042_start;
#endif

static unsigned long i8042_unxlate_seen[128 / BITS_PER_LONG];
static unsigned char i8042_unxlate_table[128] = {
	  0,118, 22, 30, 38, 37, 46, 54, 61, 62, 70, 69, 78, 85,102, 13,
	 21, 29, 36, 45, 44, 53, 60, 67, 68, 77, 84, 91, 90, 20, 28, 27,
	 35, 43, 52, 51, 59, 66, 75, 76, 82, 14, 18, 93, 26, 34, 33, 42,
	 50, 49, 58, 65, 73, 74, 89,124, 17, 41, 88,  5,  6,  4, 12,  3,
	 11,  2, 10,  1,  9,119,126,108,117,125,123,107,115,116,121,105,
	114,122,112,113,127, 96, 97,120,  7, 15, 23, 31, 39, 47, 55, 63,
	 71, 79, 86, 94,  8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 87,111,
	 19, 25, 57, 81, 83, 92, 95, 98, 99,100,101,103,104,106,109,110
};

static void i8042_interrupt(int irq, void *dev_id, struct pt_regs *regs);

/*
 * The i8042_wait_read() and i8042_wait_write functions wait for the i8042 to
 * be ready for reading values from it / writing values to it.
 */

static int i8042_wait_read(void)
{
	int i = 0;
	while ((~i8042_read_status() & I8042_STR_OBF) && (i < I8042_CTL_TIMEOUT)) {
		udelay(50);
		i++;
	}
	return -(i == I8042_CTL_TIMEOUT);
}

static int i8042_wait_write(void)
{
	int i = 0;
	while ((i8042_read_status() & I8042_STR_IBF) && (i < I8042_CTL_TIMEOUT)) {
		udelay(50);
		i++;
	}
	return -(i == I8042_CTL_TIMEOUT);
}

/*
 * i8042_flush() flushes all data that may be in the keyboard and mouse buffers
 * of the i8042 down the toilet.
 */

static int i8042_flush(void)
{
	unsigned long flags;
	int i = 0;

	spin_lock_irqsave(&i8042_lock, flags);

	while ((i8042_read_status() & I8042_STR_OBF) && (i++ < I8042_BUFFER_SIZE))
#ifdef I8042_DEBUG_IO
		printk(KERN_DEBUG "i8042.c: %02x <- i8042 (flush, %s) [%d]\n",
			i8042_read_data(), i8042_read_status() & I8042_STR_AUXDATA ? "aux" : "kbd",
			(int) (jiffies - i8042_start));
#else
		i8042_read_data();
#endif

	spin_unlock_irqrestore(&i8042_lock, flags);

	return i;
}

/*
 * i8042_command() executes a command on the i8042. It also sends the input parameter(s)
 * of the commands to it, and receives the output value(s). The parameters are to be
 * stored in the param array, and the output is placed into the same array. The number
 * of the parameters and output values is encoded in bits 8-11 of the command
 * number.
 */

static int i8042_command(unsigned char *param, int command)
{ 
	unsigned long flags;
	int retval = 0, i = 0;

	spin_lock_irqsave(&i8042_lock, flags);

	retval = i8042_wait_write();
	if (!retval) {
#ifdef I8042_DEBUG_IO
		printk(KERN_DEBUG "i8042.c: %02x -> i8042 (command) [%d]\n",
			command & 0xff, (int) (jiffies - i8042_start));
#endif
		i8042_write_command(command & 0xff);
	}
	
	if (!retval)
		for (i = 0; i < ((command >> 12) & 0xf); i++) {
			if ((retval = i8042_wait_write())) break;
#ifdef I8042_DEBUG_IO
			printk(KERN_DEBUG "i8042.c: %02x -> i8042 (parameter) [%d]\n",
				param[i], (int) (jiffies - i8042_start));
#endif
			i8042_write_data(param[i]);
		}

	if (!retval)
		for (i = 0; i < ((command >> 8) & 0xf); i++) {
			if ((retval = i8042_wait_read())) break;
			if (i8042_read_status() & I8042_STR_AUXDATA) 
				param[i] = ~i8042_read_data();
			else
				param[i] = i8042_read_data();
#ifdef I8042_DEBUG_IO
			printk(KERN_DEBUG "i8042.c: %02x <- i8042 (return) [%d]\n",
				param[i], (int) (jiffies - i8042_start));
#endif
		}

	spin_unlock_irqrestore(&i8042_lock, flags);

#ifdef I8042_DEBUG_IO
	if (retval)
		printk(KERN_DEBUG "i8042.c:      -- i8042 (timeout) [%d]\n",
			(int) (jiffies - i8042_start));
#endif

	return retval;
}

/*
 * i8042_kbd_write() sends a byte out through the keyboard interface.
 * It also automatically refreshes the CTR value, since some i8042's
 * trash their CTR after attempting to send data to an nonexistent
 * device.
 */

static int i8042_kbd_write(struct serio *port, unsigned char c)
{
	unsigned long flags;
	int retval = 0;

	spin_lock_irqsave(&i8042_lock, flags);

	if(!(retval = i8042_wait_write())) {
#ifdef I8042_DEBUG_IO
		printk(KERN_DEBUG "i8042.c: %02x -> i8042 (kbd-data) [%d]\n",
			c, (int) (jiffies - i8042_start));
#endif
		i8042_write_data(c);
	}

	spin_unlock_irqrestore(&i8042_lock, flags);

	return retval;
}

/*
 * i8042_aux_write() sends a byte out through the aux interface.
 */

static int i8042_aux_write(struct serio *port, unsigned char c)
{
	int retval;

/*
 * Send the byte out.
 */

	retval  = i8042_command(&c, I8042_CMD_AUX_SEND);

/*
 * Here we restore the CTR value. I don't know why, but i8042's in half-AT
 * mode tend to trash their CTR when doing the AUX_SEND command.
 */

	retval |= i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR);

/*
 * Make sure the interrupt happens and the character is received even
 * in the case the IRQ isn't wired, so that we can receive further
 * characters later.
 */

	i8042_interrupt(0, NULL, NULL);
	return retval;
}

/*
 * i8042_open() is called when a port is open by the higher layer.
 * It allocates an interrupt and enables the port.
 */

static int i8042_open(struct serio *port)
{
	struct i8042_values *values = port->driver;

/*
 * Allocate the interrupt
 */

	if (request_irq(values->irq, i8042_interrupt, 0, "i8042", NULL)) {
		printk(KERN_ERR "i8042.c: Can't get irq %d for %s, unregistering the port.\n", values->irq, values->name);
		values->exists = 0;
		serio_unregister_port(port);
		return -1;
	}

/*
 * Enable the interrupt.
 */

	i8042_ctr |= values->irqen;

	if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
		printk(KERN_ERR "i8042.c: Can't write CTR while opening %s.\n", values->name);
		return -1;
	}

	return 0;
}

/*
 * i8042_close() frees the interrupt, and disables the interface when the
 * upper layer doesn't need it anymore.
 */

static void i8042_close(struct serio *port)
{
	struct i8042_values *values = port->driver;

/*
 * Disable the interrupt.
 */

	i8042_ctr &= ~values->irqen;

	if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
		printk(KERN_ERR "i8042.c: Can't write CTR while closing %s.\n", values->name);
		return;
	}

/*
 * Free the interrupt
 */

	free_irq(values->irq, NULL);

/*
 * Flush the interface
 */

	i8042_flush();
}

/*
 * Structures for registering the devices in the serio.c module.
 */

static struct i8042_values i8042_kbd_values = {
	irq:		I8042_KBD_IRQ,
	irqen:		I8042_CTR_KBDINT,
	disable:	I8042_CTR_KBDDIS,
	name:		"KBD",
	exists:		0,
};

static struct serio i8042_kbd_port =
{
	type:		SERIO_8042,
	write:		i8042_kbd_write,
	open:		i8042_open,
	close:		i8042_close,
	driver:		&i8042_kbd_values,
	name:		"i8042 Kbd Port",
	phys:		I8042_KBD_PHYS_DESC,
};

static struct i8042_values i8042_aux_values = {
	irq:		I8042_AUX_IRQ,
	irqen:		I8042_CTR_AUXINT,
	disable:	I8042_CTR_AUXDIS,
	name:		"AUX",
	exists:		0,
};

static struct serio i8042_aux_port =
{
	type:		SERIO_8042,
	write:		i8042_aux_write,
	open:		i8042_open,
	close:		i8042_close,
	driver:		&i8042_aux_values,
	name:		"i8042 Aux Port",
	phys:		I8042_AUX_PHYS_DESC,
};

/*
 * i8042_interrupt() is the most important function in this driver -
 * it handles the interrupts from the i8042, and sends incoming bytes
 * to the upper layers.
 */

static void i8042_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
	unsigned long flags;
	unsigned char str, data;
	unsigned int dfl;

	spin_lock_irqsave(&i8042_lock, flags);

	while ((str = i8042_read_status()) & I8042_STR_OBF) {

		data = i8042_read_data();
		dfl = ((str & I8042_STR_PARITY) ? SERIO_PARITY : 0) |
		      ((str & I8042_STR_TIMEOUT) ? SERIO_TIMEOUT : 0);

#ifdef I8042_DEBUG_IO
		printk(KERN_DEBUG "i8042.c: %02x <- i8042 (interrupt, %s, %d) [%d]\n",
			data, (str & I8042_STR_AUXDATA) ? "aux" : "kbd", irq, (int) (jiffies - i8042_start));
#endif

		if (i8042_aux_values.exists && (str & I8042_STR_AUXDATA)) {
			serio_interrupt(&i8042_aux_port, data, dfl);
		} else {
			if (i8042_kbd_values.exists) {
				if (!i8042_direct) {
					if (data > 0x7f) {
						if (test_and_clear_bit(data & 0x7f, i8042_unxlate_seen)) {
							serio_interrupt(&i8042_kbd_port, 0xf0, dfl);
							data = i8042_unxlate_table[data & 0x7f];
						}
					} else {
						set_bit(data, i8042_unxlate_seen);
						data = i8042_unxlate_table[data];
					}
				}
				serio_interrupt(&i8042_kbd_port, data, dfl);
			}
		}
	}

	spin_unlock_irqrestore(&i8042_lock, flags);
}

/*
 * i8042_controller init initializes the i8042 controller, and,
 * most importantly, sets it into non-xlated mode.
 */
	
static int __init i8042_controller_init(void)
{

/*
 * Check the i/o region before we touch it.
 */
#if !defined(__i386__) && !defined(__sh__) && !defined(__alpha__) 	
	if (check_region(I8042_DATA_REG, 16)) {
		printk(KERN_ERR "i8042.c: %#x port already in use!\n", I8042_DATA_REG);
		return -1;
	}
#endif

/*
 * 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(&param, I8042_CMD_CTL_TEST)) {
			printk(KERN_ERR "i8042.c: i8042 controller self test timeout.\n");
			return -1;
		}

		if (param != I8042_RET_CTL_TEST) {
			printk(KERN_ERR "i8042.c: i8042 controller selftest failed. (%#x != %#x)\n",
				 param, I8042_RET_CTL_TEST);
			return -1;
		}
	}

/*
 * Read the CTR.
 */

	if (i8042_command(&i8042_ctr, I8042_CMD_CTL_RCTR)) {
		printk(KERN_ERR "i8042.c: Can't read CTR while initializing i8042.\n");
		return -1;
	}

/*
 * Save the CTR for restoral on unload / reboot.
 */

	i8042_initial_ctr = i8042_ctr;

/*
 * Disable the keyboard interface and interrupt. 
 */

	i8042_ctr |= I8042_CTR_KBDDIS;
	i8042_ctr &= ~I8042_CTR_KBDINT;

/*
 * Handle keylock.
 */

	if (~i8042_read_status() & I8042_STR_KEYLOCK) {

		if (i8042_unlock) {
			i8042_ctr |= I8042_CTR_IGNKEYLOCK;
		} else {
			printk(KERN_WARNING "i8042.c: Warning: Keylock active.\n");
		}
	}

/*
 * If the chip is configured into nontranslated mode by the BIOS, don't
 * bother enabling translating and just use that happily.
 */

	if (~i8042_ctr & I8042_CTR_XLATE)
		i8042_direct = 1;

/*
 * Set nontranslated mode for the kbd interface if requested by an option.
 * This is vital for a working scancode set 3 support. After this the kbd
 * interface becomes a simple serial in/out, like the aux interface is. If
 * the user doesn't wish this, the driver tries to untranslate the values
 * after the i8042 translates them.
 */

	if (i8042_direct)
		i8042_ctr &= ~I8042_CTR_XLATE;

/*
 * Write CTR back.
 */

	if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
		printk(KERN_ERR "i8042.c: Can't write CTR while initializing i8042.\n");
		return -1;
	}

	return 0;
}

/*
 * Here we try to reset everything back to a state in which the BIOS will be
 * able to talk to the hardware when rebooting.
 */

void i8042_controller_cleanup(void)
{

	i8042_flush();

/*
 * Reset the controller.
 */

	if (i8042_reset) {
		unsigned char param;

		if (i8042_command(&param, I8042_CMD_CTL_TEST))
			printk(KERN_ERR "i8042.c: i8042 controller reset timeout.\n");
	}

/*
 * Restore the original control register setting.
 */

	i8042_ctr = i8042_initial_ctr;

	if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR))
		printk(KERN_WARNING "i8042.c: Can't restore CTR.\n");

/*
 * Reset anything that is connected to the ports if the ports
 * are enabled in the original config.
 */

	if (i8042_kbd_values.exists)
		i8042_kbd_write(&i8042_kbd_port, 0xff);

	if (i8042_aux_values.exists)
		i8042_aux_write(&i8042_aux_port, 0xff);
}

/*
 * i8042_check_aux() applies as much paranoia as it can at detecting
 * the presence of an AUX interface.
 */

static int __init i8042_check_aux(struct i8042_values *values, struct serio *port)
{
	unsigned char param;

/*
 * Check if AUX irq is available. If it isn't, then there is no point
 * in trying to detect AUX presence.
 */

	if (request_irq(values->irq, i8042_interrupt, 0, "i8042", NULL))
                return -1;
	free_irq(values->irq, NULL);

/*
 * Get rid of bytes in the queue.
 */

	i8042_flush();

/*
 * Internal loopback test - filters out AT-type i8042's
 */

	param = 0x5a;

	if (i8042_command(&param, I8042_CMD_AUX_LOOP) || param != 0xa5)
		return -1;

/*
 * External connection test - filters out AT-soldered PS/2 i8042's
 */

	if (i8042_command(&param, I8042_CMD_AUX_TEST) || param)
		return -1;

/*
 * Bit assignment test - filters out PS/2 i8042's in AT mode
 */
	
	if (i8042_command(&param, I8042_CMD_AUX_DISABLE))
		return -1;

	if (i8042_command(&param, I8042_CMD_CTL_RCTR) || (~param & I8042_CTR_AUXDIS))
		return -1;	

	if (i8042_command(&param, I8042_CMD_AUX_TEST) || param) {

/*
 * We've got an old AMI i8042 with 'Bad Cache' commands.
 */

		i8042_command(&param, I8042_CMD_AUX_ENABLE);
		return -1;
	}

	if (i8042_command(&param, I8042_CMD_AUX_ENABLE))
		return -1;

	if (i8042_command(&param, I8042_CMD_CTL_RCTR) || (param & I8042_CTR_AUXDIS))
		return -1;	

/*
 * Disable the interface.
 */

	i8042_ctr |= I8042_CTR_AUXDIS;
	i8042_ctr &= ~I8042_CTR_AUXINT;

	if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR))
		return -1;

	return 0;
}

/*
 * i8042_port_register() marks the device as existing,
 * registers it, and reports to the user.
 */

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)) {
		printk(KERN_WARNING "i8042.c: Can't write CTR while registering.\n");
		return; 
	}

	serio_register_port(port);

	printk(KERN_INFO "serio: i8042 %s port at %#x,%#x irq %d\n",
		values->name, I8042_DATA_REG, I8042_COMMAND_REG, values->irq);

	return 0;
}

static void i8042_timer_func(unsigned long data)
{
	i8042_interrupt(0, NULL, NULL);
	mod_timer(&i8042_timer, jiffies + I8042_POLL_PERIOD);
}

/*
 * Module init and cleanup functions.
 */

void __init i8042_setup(char *str, int *ints)
{
	if (!strcmp(str, "i8042_reset=1"))
		i8042_reset = 1;
	if (!strcmp(str, "i8042_noaux=1"))
		i8042_noaux = 1;
	if (!strcmp(str, "i8042_unlock=1"))
		i8042_unlock = 1;
	if (!strcmp(str, "i8042_direct=1"))
		i8042_direct = 1;
}

/*
 * Reset the 8042 back to original mode.
 */
static int i8042_notify_sys(struct notifier_block *this, unsigned long code,
        		    void *unused)
{
        if (code==SYS_DOWN || code==SYS_HALT) 
        	i8042_controller_cleanup();
        return NOTIFY_DONE;
}

static struct notifier_block i8042_notifier=
{
        i8042_notify_sys,
        NULL,
        0
};

int __init i8042_init(void)
{
#ifdef I8042_DEBUG_IO
	i8042_start = jiffies;
#endif

	if (!i8042_platform_init())
		return -EBUSY;

	if (i8042_controller_init())
		return -ENODEV;
		
	if (!i8042_noaux && !i8042_check_aux(&i8042_aux_values, &i8042_aux_port))
		i8042_port_register(&i8042_aux_values, &i8042_aux_port);

	i8042_port_register(&i8042_kbd_values, &i8042_kbd_port);

	i8042_timer.function = i8042_timer_func;
	mod_timer(&i8042_timer, jiffies + I8042_POLL_PERIOD);

	register_reboot_notifier(&i8042_notifier);

	return 0;
}

void __exit i8042_exit(void)
{
	unregister_reboot_notifier(&i8042_notifier);

	del_timer(&i8042_timer);
	
	if (i8042_kbd_values.exists)
		serio_unregister_port(&i8042_kbd_port);

	if (i8042_aux_values.exists)
		serio_unregister_port(&i8042_aux_port);

	i8042_controller_cleanup();

	i8042_platform_exit();
}

module_init(i8042_init);
module_exit(i8042_exit);

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: input subsystem config ?
  2002-07-17 12:08       ` Vojtech Pavlik
@ 2002-07-17 13:24         ` Stelian Pop
  2002-07-17 13:44           ` Vojtech Pavlik
  0 siblings, 1 reply; 21+ messages in thread
From: Stelian Pop @ 2002-07-17 13:24 UTC (permalink / raw)
  To: Vojtech Pavlik; +Cc: Linux Kernel Mailing List

On Wed, Jul 17, 2002 at 02:08:04PM +0200, Vojtech Pavlik wrote:

> > i8042.c: 60 -> i8042 (command) [65]
> > i8042.c: 77 -> i8042 (parameter) [65]
> > i8042.c: d4 -> i8042 (command) [65]
> > i8042.c: f6 -> i8042 (parameter) [65]
> 
> This is the bug. :) It tries to talk to the mouse before enabling the
> mouse interface. I wonder how it could work ... probably many chipsets
> ignore the disable bit altogether.
> 
> Please try with the attached i8042.c.

I'm afraid it doesn't work either:
...
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
 hda: 23579136 sectors w/512KiB Cache, CHS=23392/16/63, UDMA(33)
 hda: [PTBL] [1467/255/63] hda1 hda2 hda3 < hda5 hda6 >
mice: PS/2 mouse device common for all mice
i8042.c: fa <- i8042 (flush, kbd) [0]
i8042.c: 20 -> i8042 (command) [0]
i8042.c: 47 <- i8042 (return) [0]
i8042.c: 60 -> i8042 (command) [0]
i8042.c: 56 -> i8042 (parameter) [0]
i8042.c: d3 -> i8042 (command) [0]
i8042.c: 5a -> i8042 (parameter) [0]
i8042.c: a5 <- i8042 (return) [0]
i8042.c: a9 -> i8042 (command) [0]
i8042.c: 00 <- i8042 (return) [0]
i8042.c: a7 -> i8042 (command) [1]
i8042.c: 20 -> i8042 (command) [1]
i8042.c: 76 <- i8042 (return) [1]
i8042.c: a9 -> i8042 (command) [1]
i8042.c: 00 <- i8042 (return) [1]
i8042.c: a8 -> i8042 (command) [1]
i8042.c: 20 -> i8042 (command) [1]
i8042.c: 56 <- i8042 (return) [1]
i8042.c: 60 -> i8042 (command) [2]
i8042.c: 74 -> i8042 (parameter) [2]
i8042.c: 60 -> i8042 (command) [2]
i8042.c: 54 -> i8042 (parameter) [2]
i8042.c: 60 -> i8042 (command) [2]
i8042.c: 56 -> i8042 (parameter) [2]
i8042.c: d4 -> i8042 (command) [2]
i8042.c: f6 -> i8042 (parameter) [2]
i8042.c: 60 -> i8042 (command) [3]
i8042.c: 56 -> i8042 (parameter) [3]
i8042.c: 60 -> i8042 (command) [92]
i8042.c: 54 -> i8042 (parameter) [92]
i8042.c: 60 -> i8042 (command) [93]
i8042.c: 56 -> i8042 (parameter) [93]
i8042.c: d4 -> i8042 (command) [93]
i8042.c: f5 -> i8042 (parameter) [93]
i8042.c: 60 -> i8042 (command) [93]
i8042.c: 56 -> i8042 (parameter) [93]
i8042.c: 60 -> i8042 (command) [182]
i8042.c: 54 -> i8042 (parameter) [182]
serio: i8042 AUX port at 0x60,0x64 irq 12
i8042.c: 60 -> i8042 (command) [182]
i8042.c: 44 -> i8042 (parameter) [182]
i8042.c: 60 -> i8042 (command) [182]
i8042.c: 45 -> i8042 (parameter) [182]
i8042.c: f6 -> i8042 (kbd-data) [182]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [185]
i8042.c: f2 -> i8042 (kbd-data) [185]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [187]
i8042.c: ab <- i8042 (interrupt, kbd, 1) [193]
i8042.c: 60 -> i8042 (command) [194]
i8042.c: 44 -> i8042 (parameter) [194]
i8042.c: 60 -> i8042 (command) [194]
i8042.c: 45 -> i8042 (parameter) [194]
i8042.c: f5 -> i8042 (kbd-data) [194]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [197]
i8042.c: f2 -> i8042 (kbd-data) [197]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [200]
i8042.c: ab <- i8042 (interrupt, kbd, 1) [205]
i8042.c: 41 <- i8042 (interrupt, kbd, 1) [210]
i8042.c: ea -> i8042 (kbd-data) [210]
i8042.c: fe <- i8042 (interrupt, kbd, 1) [212]
i8042.c: f0 -> i8042 (kbd-data) [212]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [215]
i8042.c: 02 -> i8042 (kbd-data) [215]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [218]
i8042.c: f0 -> i8042 (kbd-data) [218]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [221]
i8042.c: 00 -> i8042 (kbd-data) [221]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [224]
i8042.c: 41 <- i8042 (interrupt, kbd, 1) [226]
input.c: calling /sbin/hotplug input [HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add PRODUCT=11/1/2/ab02 NAME=AT Set 2 keyboard]
input.c: hotplug returned -2
input: AT Set 2 keyboard on isa0060/serio0
i8042.c: f8 -> i8042 (kbd-data) [229]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [232]
i8042.c: ed -> i8042 (kbd-data) [232]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [235]
i8042.c: 00 -> i8042 (kbd-data) [236]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [241]
i8042.c: f4 -> i8042 (kbd-data) [241]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [244]
serio: i8042 KBD port at 0x60,0x64 irq 1
NET4: Linux TCP/IP 1.0 for NET4.0
...
-- 
Stelian Pop <stelian.pop@fr.alcove.com>
Alcove - http://www.alcove.com

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: input subsystem config ?
  2002-07-17 13:24         ` Stelian Pop
@ 2002-07-17 13:44           ` Vojtech Pavlik
  2002-07-17 13:58             ` Stelian Pop
  0 siblings, 1 reply; 21+ messages in thread
From: Vojtech Pavlik @ 2002-07-17 13:44 UTC (permalink / raw)
  To: Stelian Pop, Vojtech Pavlik, Linux Kernel Mailing List

On Wed, Jul 17, 2002 at 03:24:59PM +0200, Stelian Pop wrote:
> On Wed, Jul 17, 2002 at 02:08:04PM +0200, Vojtech Pavlik wrote:
> 
> > > i8042.c: 60 -> i8042 (command) [65]
> > > i8042.c: 77 -> i8042 (parameter) [65]
> > > i8042.c: d4 -> i8042 (command) [65]
> > > i8042.c: f6 -> i8042 (parameter) [65]
> > 
> > This is the bug. :) It tries to talk to the mouse before enabling the
> > mouse interface. I wonder how it could work ... probably many chipsets
> > ignore the disable bit altogether.
> > 
> > Please try with the attached i8042.c.
> 
> I'm afraid it doesn't work either:
> ...

But it actually looks to do the correct thing this time :(
But for some reason your hardware doesn't like it.

> ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
>  hda: 23579136 sectors w/512KiB Cache, CHS=23392/16/63, UDMA(33)
>  hda: [PTBL] [1467/255/63] hda1 hda2 hda3 < hda5 hda6 >
> mice: PS/2 mouse device common for all mice
> i8042.c: fa <- i8042 (flush, kbd) [0]

Throw away stale data.

> i8042.c: 20 -> i8042 (command) [0]
> i8042.c: 47 <- i8042 (return) [0]

Remember the CTR.

> i8042.c: 60 -> i8042 (command) [0]
> i8042.c: 56 -> i8042 (parameter) [0]

Disable kbd and kbd interupt.

> i8042.c: d3 -> i8042 (command) [0]
> i8042.c: 5a -> i8042 (parameter) [0]
> i8042.c: a5 <- i8042 (return) [0]

Test mouse port loopback.

> i8042.c: a9 -> i8042 (command) [0]
> i8042.c: 00 <- i8042 (return) [0]

Test mouse port.

> i8042.c: a7 -> i8042 (command) [1]
> i8042.c: 20 -> i8042 (command) [1]
> i8042.c: 76 <- i8042 (return) [1]
> i8042.c: a9 -> i8042 (command) [1]
> i8042.c: 00 <- i8042 (return) [1]
> i8042.c: a8 -> i8042 (command) [1]
> i8042.c: 20 -> i8042 (command) [1]
> i8042.c: 56 <- i8042 (return) [1]

More aux port sanity tests, all ok.

> i8042.c: 60 -> i8042 (command) [2]
> i8042.c: 74 -> i8042 (parameter) [2]

Everything disabled.

> i8042.c: 60 -> i8042 (command) [2]
> i8042.c: 54 -> i8042 (parameter) [2]

Ints disabled, kbd disabled, aux enabled.

> i8042.c: 60 -> i8042 (command) [2]
> i8042.c: 56 -> i8042 (parameter) [2]

Aux interrupt enable.

> i8042.c: d4 -> i8042 (command) [2]
> i8042.c: f6 -> i8042 (parameter) [2]
> i8042.c: 60 -> i8042 (command) [3]
> i8042.c: 56 -> i8042 (parameter) [3]

Send reset to the mouse, wait ....

... but nothing comes in after almost a second. :(

> i8042.c: 60 -> i8042 (command) [92]
> i8042.c: 54 -> i8042 (parameter) [92]
> i8042.c: 60 -> i8042 (command) [93]
> i8042.c: 56 -> i8042 (parameter) [93]
> i8042.c: d4 -> i8042 (command) [93]
> i8042.c: f5 -> i8042 (parameter) [93]
> i8042.c: 60 -> i8042 (command) [93]
> i8042.c: 56 -> i8042 (parameter) [93]

Try again later, nothing ...

> i8042.c: 60 -> i8042 (command) [182]
> i8042.c: 54 -> i8042 (parameter) [182]
> serio: i8042 AUX port at 0x60,0x64 irq 12

Try this patch, if it doesn't work, we'll have to try more changes, like
trying to skip the AUX port detection that might confuse the chip ....

--- i8042.c.old	Wed Jul 17 15:36:01 2002
+++ i8042.c	Wed Jul 17 15:37:19 2002
@@ -270,6 +270,8 @@
 		return -1;
 	}
 
+	i8042_interrupt(0, NULL, NULL);
+
 	return 0;
 }
 

Btw, what's the exact chipset involved?

-- 
Vojtech Pavlik
SuSE Labs

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: input subsystem config ?
  2002-07-17 13:44           ` Vojtech Pavlik
@ 2002-07-17 13:58             ` Stelian Pop
  2002-07-17 14:29               ` Vojtech Pavlik
  0 siblings, 1 reply; 21+ messages in thread
From: Stelian Pop @ 2002-07-17 13:58 UTC (permalink / raw)
  To: Vojtech Pavlik; +Cc: Linux Kernel Mailing List

On Wed, Jul 17, 2002 at 03:44:48PM +0200, Vojtech Pavlik wrote:

> Try this patch, 

It doesn't change anything:
...
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
 hda: 23579136 sectors w/512KiB Cache, CHS=23392/16/63, UDMA(33)
 hda: [PTBL] [1467/255/63] hda1 hda2 hda3 < hda5 hda6 >
mice: PS/2 mouse device common for all mice
i8042.c: fa <- i8042 (flush, kbd) [0]
i8042.c: 20 -> i8042 (command) [0]
i8042.c: 47 <- i8042 (return) [0]
i8042.c: 60 -> i8042 (command) [0]
i8042.c: 56 -> i8042 (parameter) [0]
i8042.c: d3 -> i8042 (command) [0]
i8042.c: 5a -> i8042 (parameter) [0]
i8042.c: a5 <- i8042 (return) [0]
i8042.c: a9 -> i8042 (command) [1]
i8042.c: 00 <- i8042 (return) [1]
i8042.c: a7 -> i8042 (command) [1]
i8042.c: 20 -> i8042 (command) [1]
i8042.c: 76 <- i8042 (return) [1]
i8042.c: a9 -> i8042 (command) [1]
i8042.c: 00 <- i8042 (return) [1]
i8042.c: a8 -> i8042 (command) [1]
i8042.c: 20 -> i8042 (command) [1]
i8042.c: 56 <- i8042 (return) [1]
i8042.c: 60 -> i8042 (command) [2]
i8042.c: 74 -> i8042 (parameter) [2]
i8042.c: 60 -> i8042 (command) [2]
i8042.c: 54 -> i8042 (parameter) [2]
i8042.c: 60 -> i8042 (command) [2]
i8042.c: 56 -> i8042 (parameter) [2]
i8042.c: d4 -> i8042 (command) [2]
i8042.c: f6 -> i8042 (parameter) [2]
i8042.c: 60 -> i8042 (command) [3]
i8042.c: 56 -> i8042 (parameter) [3]
i8042.c: 60 -> i8042 (command) [92]
i8042.c: 54 -> i8042 (parameter) [92]
i8042.c: 60 -> i8042 (command) [93]
i8042.c: 56 -> i8042 (parameter) [93]
i8042.c: d4 -> i8042 (command) [93]
i8042.c: f5 -> i8042 (parameter) [93]
i8042.c: 60 -> i8042 (command) [93]
i8042.c: 56 -> i8042 (parameter) [93]
i8042.c: 60 -> i8042 (command) [182]
i8042.c: 54 -> i8042 (parameter) [182]
serio: i8042 AUX port at 0x60,0x64 irq 12
i8042.c: 60 -> i8042 (command) [182]
i8042.c: 44 -> i8042 (parameter) [182]
i8042.c: 60 -> i8042 (command) [182]
i8042.c: 45 -> i8042 (parameter) [182]
i8042.c: f6 -> i8042 (kbd-data) [182]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [185]
i8042.c: f2 -> i8042 (kbd-data) [185]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [188]
i8042.c: ab <- i8042 (interrupt, kbd, 1) [194]
i8042.c: 60 -> i8042 (command) [194]
i8042.c: 44 -> i8042 (parameter) [194]
i8042.c: 60 -> i8042 (command) [194]
i8042.c: 45 -> i8042 (parameter) [194]
i8042.c: f5 -> i8042 (kbd-data) [194]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [197]
i8042.c: f2 -> i8042 (kbd-data) [197]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [200]
i8042.c: ab <- i8042 (interrupt, kbd, 1) [205]
i8042.c: 41 <- i8042 (interrupt, kbd, 1) [210]
i8042.c: ea -> i8042 (kbd-data) [210]
i8042.c: fe <- i8042 (interrupt, kbd, 1) [213]
i8042.c: f0 -> i8042 (kbd-data) [213]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [216]
i8042.c: 02 -> i8042 (kbd-data) [216]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [219]
i8042.c: f0 -> i8042 (kbd-data) [219]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [221]
i8042.c: 00 -> i8042 (kbd-data) [221]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [224]
i8042.c: 41 <- i8042 (interrupt, kbd, 1) [226]
input.c: calling /sbin/hotplug input [HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add PRODUCT=11/1/2/ab02 NAME=AT Set 2 keyboard]
input.c: hotplug returned -2
input: AT Set 2 keyboard on isa0060/serio0
i8042.c: f8 -> i8042 (kbd-data) [230]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [232]
i8042.c: ed -> i8042 (kbd-data) [233]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [236]
i8042.c: 00 -> i8042 (kbd-data) [236]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [242]
i8042.c: f4 -> i8042 (kbd-data) [242]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [245]
serio: i8042 KBD port at 0x60,0x64 irq 1
NET4: Linux TCP/IP 1.0 for NET4.0
...

> if it doesn't work, we'll have to try more changes, like
> trying to skip the AUX port detection that might confuse the chip ....

I should enhance however that it works with the old pc_keyb driver.
I don't know the internals but it may give you a hint...

> Btw, what's the exact chipset involved?

It's a Sony VAIO Picturebook C1VE, lspci:
00:00.0 Host bridge: Transmeta Corporation LongRun Northbridge
00:00.1 RAM memory: Transmeta Corporation SDRAM controller
00:00.2 RAM memory: Transmeta Corporation BIOS scratchpad
00:07.0 ISA bridge: Intel Corp. 82371AB/EB/MB PIIX4 ISA (rev 02)
00:07.1 IDE interface: Intel Corp. 82371AB/EB/MB PIIX4 IDE (rev 01)
00:07.2 USB Controller: Intel Corp. 82371AB/EB/MB PIIX4 USB (rev 01)
00:07.3 Bridge: Intel Corp. 82371AB/EB/MB PIIX4 ACPI (rev 03)
00:08.0 FireWire (IEEE 1394): Texas Instruments TSB43AA22 IEEE-1394 Controller (PHY/Link Integrated) (rev 02)
00:09.0 Multimedia audio controller: Yamaha Corporation YMF-754 [DS-1E Audio Controller]
00:0b.0 Multimedia controller: Kawasaki Steel Corporation: Unknown device ff01 (rev 01)
00:0c.0 CardBus bridge: Ricoh Co Ltd RL5c475 (rev 80)
00:0d.0 VGA compatible controller: ATI Technologies Inc Rage Mobility P/M (rev 64)

Stelian.
-- 
Stelian Pop <stelian.pop@fr.alcove.com>
Alcove - http://www.alcove.com

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: input subsystem config ?
  2002-07-17 13:58             ` Stelian Pop
@ 2002-07-17 14:29               ` Vojtech Pavlik
  2002-07-17 14:55                 ` Stelian Pop
  0 siblings, 1 reply; 21+ messages in thread
From: Vojtech Pavlik @ 2002-07-17 14:29 UTC (permalink / raw)
  To: Stelian Pop, Vojtech Pavlik, Linux Kernel Mailing List

On Wed, Jul 17, 2002 at 03:58:23PM +0200, Stelian Pop wrote:
> On Wed, Jul 17, 2002 at 03:44:48PM +0200, Vojtech Pavlik wrote:
> 
> > Try this patch, 
> 
> It doesn't change anything:
>
> > if it doesn't work, we'll have to try more changes, like
> > trying to skip the AUX port detection that might confuse the chip ....
> 
> I should enhance however that it works with the old pc_keyb driver.

Yes, I know. That's why I suggested skipping the detection, as the
pc_keyb driver doesn't do that.

Try this:

--- i8042.c.old	Wed Jul 17 16:05:57 2002
+++ i8042.c	Wed Jul 17 16:27:54 2002
@@ -571,6 +571,8 @@
 
 	i8042_flush();
 
+#if 0
+
 /*
  * Internal loopback test - filters out AT-type i8042's
  */
@@ -621,6 +625,11 @@
 	i8042_ctr &= ~I8042_CTR_AUXINT;
 
 	if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR))
+		return -1;
+
+#endif
+
+	if (i8042_command(&param, I8042_CMD_AUX_ENABLE))
 		return -1;
 
 	return 0;

> I don't know the internals but it may give you a hint...
> 
> > Btw, what's the exact chipset involved?
> 
> It's a Sony VAIO Picturebook C1VE, lspci:
> 00:00.0 Host bridge: Transmeta Corporation LongRun Northbridge
> 00:00.1 RAM memory: Transmeta Corporation SDRAM controller
> 00:00.2 RAM memory: Transmeta Corporation BIOS scratchpad
> 00:07.0 ISA bridge: Intel Corp. 82371AB/EB/MB PIIX4 ISA (rev 02)
> 00:07.1 IDE interface: Intel Corp. 82371AB/EB/MB PIIX4 IDE (rev 01)
> 00:07.2 USB Controller: Intel Corp. 82371AB/EB/MB PIIX4 USB (rev 01)
> 00:07.3 Bridge: Intel Corp. 82371AB/EB/MB PIIX4 ACPI (rev 03)
> 00:08.0 FireWire (IEEE 1394): Texas Instruments TSB43AA22 IEEE-1394 Controller (PHY/Link Integrated) (rev 02)
> 00:09.0 Multimedia audio controller: Yamaha Corporation YMF-754 [DS-1E Audio Controller]
> 00:0b.0 Multimedia controller: Kawasaki Steel Corporation: Unknown device ff01 (rev 01)
> 00:0c.0 CardBus bridge: Ricoh Co Ltd RL5c475 (rev 80)
> 00:0d.0 VGA compatible controller: ATI Technologies Inc Rage Mobility P/M (rev 64)

Oh my. So likely there the i8042 chip is implemented in software
entirely ...

-- 
Vojtech Pavlik
SuSE Labs

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: input subsystem config ?
  2002-07-17 14:29               ` Vojtech Pavlik
@ 2002-07-17 14:55                 ` Stelian Pop
  2002-07-17 15:22                   ` Vojtech Pavlik
  0 siblings, 1 reply; 21+ messages in thread
From: Stelian Pop @ 2002-07-17 14:55 UTC (permalink / raw)
  To: Vojtech Pavlik; +Cc: Linux Kernel Mailing List

On Wed, Jul 17, 2002 at 04:29:04PM +0200, Vojtech Pavlik wrote:

> > I should enhance however that it works with the old pc_keyb driver.
> 
> Yes, I know. That's why I suggested skipping the detection, as the
> pc_keyb driver doesn't do that.
> 
> Try this:
> 
> --- i8042.c.old	Wed Jul 17 16:05:57 2002
> +++ i8042.c	Wed Jul 17 16:27:54 2002
> @@ -571,6 +571,8 @@
>  
>  	i8042_flush();
>  
> +#if 0
[...]

Argh, with this patch, the mouse still doesn't work but I also
lose the keyboard (but keyboard press/release events are
however present in the logs...)!

[...]
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
 hda: 23579136 sectors w/512KiB Cache, CHS=23392/16/63, UDMA(33)
 hda: [PTBL] [1467/255/63] hda1 hda2 hda3 < hda5 hda6 >
mice: PS/2 mouse device common for all mice
i8042.c: fa <- i8042 (flush, kbd) [0]
i8042.c: 20 -> i8042 (command) [0]
i8042.c: 47 <- i8042 (return) [0]
i8042.c: 60 -> i8042 (command) [1]
i8042.c: 56 -> i8042 (parameter) [1]
i8042.c: a8 -> i8042 (command) [1]
i8042.c: 60 -> i8042 (command) [1]
i8042.c: 56 -> i8042 (parameter) [1]
serio: i8042 AUX port at 0x60,0x64 irq 12
i8042.c: 60 -> i8042 (command) [1]
i8042.c: 46 -> i8042 (parameter) [1]
serio: i8042 KBD port at 0x60,0x64 irq 1
NET4: Linux TCP/IP 1.0 for NET4.0
[...]
i8042.c: 39 <- i8042 (interrupt, kbd, 0) [96160]
i8042.c: b9 <- i8042 (interrupt, kbd, 0) [96260]
i8042.c: 39 <- i8042 (interrupt, kbd, 0) [97310]
i8042.c: b9 <- i8042 (interrupt, kbd, 0) [97410]
i8042.c: 39 <- i8042 (interrupt, kbd, 0) [102010]
i8042.c: b9 <- i8042 (interrupt, kbd, 0) [102110]

Stelian.
-- 
Stelian Pop <stelian.pop@fr.alcove.com>
Alcove - http://www.alcove.com

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: input subsystem config ?
  2002-07-17 14:55                 ` Stelian Pop
@ 2002-07-17 15:22                   ` Vojtech Pavlik
  2002-07-17 15:33                     ` Stelian Pop
  0 siblings, 1 reply; 21+ messages in thread
From: Vojtech Pavlik @ 2002-07-17 15:22 UTC (permalink / raw)
  To: Stelian Pop, Vojtech Pavlik, Linux Kernel Mailing List

On Wed, Jul 17, 2002 at 04:55:23PM +0200, Stelian Pop wrote:
> On Wed, Jul 17, 2002 at 04:29:04PM +0200, Vojtech Pavlik wrote:
> 
> > > I should enhance however that it works with the old pc_keyb driver.
> > 
> > Yes, I know. That's why I suggested skipping the detection, as the
> > pc_keyb driver doesn't do that.
> > 
> > Try this:
> > 
> > --- i8042.c.old	Wed Jul 17 16:05:57 2002
> > +++ i8042.c	Wed Jul 17 16:27:54 2002
> > @@ -571,6 +571,8 @@
> >  
> >  	i8042_flush();
> >  
> > +#if 0
> [...]
> 
> Argh, with this patch, the mouse still doesn't work but I also
> lose the keyboard (but keyboard press/release events are
> however present in the logs...)!
> 
> [...]
> ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
>  hda: 23579136 sectors w/512KiB Cache, CHS=23392/16/63, UDMA(33)
>  hda: [PTBL] [1467/255/63] hda1 hda2 hda3 < hda5 hda6 >
> mice: PS/2 mouse device common for all mice
> i8042.c: fa <- i8042 (flush, kbd) [0]
> i8042.c: 20 -> i8042 (command) [0]
> i8042.c: 47 <- i8042 (return) [0]
> i8042.c: 60 -> i8042 (command) [1]
> i8042.c: 56 -> i8042 (parameter) [1]
> i8042.c: a8 -> i8042 (command) [1]
> i8042.c: 60 -> i8042 (command) [1]
> i8042.c: 56 -> i8042 (parameter) [1]
> serio: i8042 AUX port at 0x60,0x64 irq 12
> i8042.c: 60 -> i8042 (command) [1]
> i8042.c: 46 -> i8042 (parameter) [1]
> serio: i8042 KBD port at 0x60,0x64 irq 1
> NET4: Linux TCP/IP 1.0 for NET4.0
> [...]
> i8042.c: 39 <- i8042 (interrupt, kbd, 0) [96160]
> i8042.c: b9 <- i8042 (interrupt, kbd, 0) [96260]
> i8042.c: 39 <- i8042 (interrupt, kbd, 0) [97310]
> i8042.c: b9 <- i8042 (interrupt, kbd, 0) [97410]
> i8042.c: 39 <- i8042 (interrupt, kbd, 0) [102010]
> i8042.c: b9 <- i8042 (interrupt, kbd, 0) [102110]

Are you sure you didn't change the config? Because this really looks
like if noone is actually even trying to probe. Which is quite
impossible, unless CONFIG_KEYBOARD_ATKBD and CONFIG_MOUSE_PS2 are
disabled.

-- 
Vojtech Pavlik
SuSE Labs

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: input subsystem config ?
  2002-07-17 15:22                   ` Vojtech Pavlik
@ 2002-07-17 15:33                     ` Stelian Pop
  2002-07-18 14:41                       ` Stelian Pop
  0 siblings, 1 reply; 21+ messages in thread
From: Stelian Pop @ 2002-07-17 15:33 UTC (permalink / raw)
  To: Vojtech Pavlik; +Cc: Linux Kernel Mailing List

On Wed, Jul 17, 2002 at 05:22:35PM +0200, Vojtech Pavlik wrote:

> > Argh, with this patch, the mouse still doesn't work but I also
> > lose the keyboard (but keyboard press/release events are
> > however present in the logs...)!
[...]
> Are you sure you didn't change the config? Because this really looks
> like if noone is actually even trying to probe. Which is quite
> impossible, unless CONFIG_KEYBOARD_ATKBD and CONFIG_MOUSE_PS2 are
> disabled.

Of course you're correct, I must have toggled something in the input
section (the i8042 entry probably) from Y to M and that probably
turned off the other settings. Sorry for that.

Anyway, let's start over:
	$ egrep "INPUT|MOUSE|KEYB|SERIO|8042" .config | grep -v ^#
	CONFIG_INPUT=y
	CONFIG_INPUT_KEYBDEV=y
	CONFIG_INPUT_MOUSEDEV=y
	CONFIG_INPUT_MOUSEDEV_PSAUX=y
	CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
	CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
	CONFIG_SERIO=y
	CONFIG_SERIO_I8042=y
	CONFIG_I8042_REG_BASE=60
	CONFIG_I8042_KBD_IRQ=1
	CONFIG_I8042_AUX_IRQ=12
	CONFIG_INPUT_KEYBOARD=y
	CONFIG_KEYBOARD_ATKBD=y
	CONFIG_INPUT_MOUSE=y
	CONFIG_MOUSE_PS2=y
	CONFIG_USB_HIDINPUT=y

The i8042 version used is the one you send me, plus the #if 0 surrounding
the aux probe code.

Result: keyboard works, mouse still doesn't.
...
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
 hda: 23579136 sectors w/512KiB Cache, CHS=23392/16/63, UDMA(33)
 hda: [PTBL] [1467/255/63] hda1 hda2 hda3 < hda5 hda6 >
mice: PS/2 mouse device common for all mice
i8042.c: fa <- i8042 (flush, kbd) [0]
i8042.c: 20 -> i8042 (command) [0]
i8042.c: 47 <- i8042 (return) [0]
i8042.c: 60 -> i8042 (command) [0]
i8042.c: 56 -> i8042 (parameter) [0]
i8042.c: a8 -> i8042 (command) [0]
i8042.c: 60 -> i8042 (command) [0]
i8042.c: 56 -> i8042 (parameter) [0]
i8042.c: 60 -> i8042 (command) [1]
i8042.c: 56 -> i8042 (parameter) [1]
i8042.c: d4 -> i8042 (command) [1]
i8042.c: f6 -> i8042 (parameter) [1]
i8042.c: 60 -> i8042 (command) [1]
i8042.c: 56 -> i8042 (parameter) [1]
i8042.c: 60 -> i8042 (command) [73]
i8042.c: 54 -> i8042 (parameter) [73]
i8042.c: 60 -> i8042 (command) [73]
i8042.c: 56 -> i8042 (parameter) [73]
i8042.c: d4 -> i8042 (command) [73]
i8042.c: f5 -> i8042 (parameter) [73]
i8042.c: 60 -> i8042 (command) [74]
i8042.c: 56 -> i8042 (parameter) [74]
i8042.c: 60 -> i8042 (command) [145]
i8042.c: 54 -> i8042 (parameter) [145]
serio: i8042 AUX port at 0x60,0x64 irq 12
i8042.c: 60 -> i8042 (command) [145]
i8042.c: 44 -> i8042 (parameter) [145]
i8042.c: 60 -> i8042 (command) [145]
i8042.c: 45 -> i8042 (parameter) [145]
i8042.c: f6 -> i8042 (kbd-data) [146]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [148]
i8042.c: f2 -> i8042 (kbd-data) [149]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [151]
i8042.c: ab <- i8042 (interrupt, kbd, 1) [155]
i8042.c: 60 -> i8042 (command) [155]
i8042.c: 44 -> i8042 (parameter) [155]
i8042.c: 60 -> i8042 (command) [155]
i8042.c: 45 -> i8042 (parameter) [155]
i8042.c: f5 -> i8042 (kbd-data) [156]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [158]
i8042.c: f2 -> i8042 (kbd-data) [158]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [161]
i8042.c: ab <- i8042 (interrupt, kbd, 1) [166]
i8042.c: 41 <- i8042 (interrupt, kbd, 1) [171]
i8042.c: ea -> i8042 (kbd-data) [171]
i8042.c: fe <- i8042 (interrupt, kbd, 1) [174]
i8042.c: f0 -> i8042 (kbd-data) [174]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [177]
i8042.c: 02 -> i8042 (kbd-data) [177]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [180]
i8042.c: f0 -> i8042 (kbd-data) [180]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [182]
i8042.c: 00 -> i8042 (kbd-data) [183]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [185]
i8042.c: 41 <- i8042 (interrupt, kbd, 1) [188]
input.c: calling /sbin/hotplug input [HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add PRODUCT=11/1/2/ab02 NAME=AT Set 2 keyboard]
input.c: hotplug returned -2
input: AT Set 2 keyboard on isa0060/serio0
i8042.c: f8 -> i8042 (kbd-data) [191]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [194]
i8042.c: ed -> i8042 (kbd-data) [194]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [197]
i8042.c: 00 -> i8042 (kbd-data) [198]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [203]
i8042.c: f4 -> i8042 (kbd-data) [203]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [206]
serio: i8042 KBD port at 0x60,0x64 irq 1
NET4: Linux TCP/IP 1.0 for NET4.0
...

Stelian.
-- 
Stelian Pop <stelian.pop@fr.alcove.com>
Alcove - http://www.alcove.com

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: input subsystem config ?
  2002-07-17 15:33                     ` Stelian Pop
@ 2002-07-18 14:41                       ` Stelian Pop
  2002-07-18 14:45                         ` Vojtech Pavlik
  0 siblings, 1 reply; 21+ messages in thread
From: Stelian Pop @ 2002-07-18 14:41 UTC (permalink / raw)
  To: Vojtech Pavlik, Linux Kernel Mailing List

On Wed, Jul 17, 2002 at 05:33:36PM +0200, Stelian Pop wrote:

> The i8042 version used is the one you send me, plus the #if 0 surrounding
> the aux probe code.
> 
> Result: keyboard works, mouse still doesn't.
[...]

Ok, I've hacked a bit on the input drivers (trying to look at the
differences between the pc_keyb.c and the new initialisation sequences),
with some limited success.

What I found out is that the mouse is not responding to any of
the commands in psmouse.c:psmouse_probe. However, if I comment out
the 'return -1' statements from this function, the mouse will
be recognised as a default PS/2 mouse. 

Later, in psmouse_initialise, the PSMOUSE_CMD_ENABLE will fail too
(no response from the mouse). But since the error is not propagated
to serio the device remains registered.

And later, the mouse will get enabled somehow and will function
perfectly. I didn't succed in finding out what exactly enables it,
even if I strongly suspect some interraction between the keyboard
enable and aux port enable... 

Any further idea ?

What I also did, maybe you'll find this interesting, is recording 
the events sent by the pc_keyb.c driver to the i8042 port (by tracing
the inb/outb in include/asm-i386/keyboard.h):

kbd_read_status: 1c
kbd_write_command: a7
kbd_read_status: 1e
kbd_read_status: 1c
kbd_write_command: 60
kbd_read_status: 1e
kbd_read_status: 1c
kbd_write_output: 65
kbd_read_status: 14
kbd_write_output: ed
kbd_read_status: 15
kbd_read_input: fa
kbd_read_status: 14
kbd_read_status: 14
kbd_write_output: 00
kbd_read_status: 15
kbd_read_input: fa
kbd_read_status: 14
kbd_read_status: 14
kbd_write_command: a8
kbd_read_status: 1c
kbd_write_command: d4
kbd_read_status: 1e
kbd_read_status: 1c
kbd_write_output: f4
kbd_read_status: 14
kbd_read_status: 14
kbd_write_command: 60
kbd_read_status: 1e
kbd_read_status: 3d
kbd_read_input: fa
kbd_read_status: 3c
kbd_write_output: 47
kbd_read_status: 34
kbd_write_output: f4
kbd_read_status: 15
kbd_read_input: fa
kbd_read_status: 14
kbd_read_status: 14
kbd_write_command: d4
kbd_read_status: 1e
kbd_read_status: 1c
kbd_write_output: ffffffff
kbd_read_status: 35
kbd_read_input: fa
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: aa
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 00
kbd_read_status: 34
kbd_read_status: 34
kbd_write_command: d4
kbd_read_status: 3e
kbd_read_status: 3c
kbd_write_output: fffffff4
kbd_read_status: 35
kbd_read_input: fa
kbd_read_status: 34
kbd_read_status: 34
kbd_write_command: d4
kbd_read_status: 3e
kbd_read_status: 3c
kbd_write_output: fffffff2
kbd_read_status: 35
kbd_read_input: fa
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 00
kbd_read_status: 34
kbd_read_status: 34
kbd_write_command: d4
kbd_read_status: 3e
kbd_read_status: 3c
kbd_write_output: fffffff3
kbd_read_status: 35
kbd_read_input: fa
kbd_read_status: 34
kbd_read_status: 34
kbd_write_command: d4
kbd_read_status: 3e
kbd_read_status: 3c
kbd_write_output: ffffffc8
kbd_read_status: 35
kbd_read_input: fa
kbd_read_status: 34
kbd_read_status: 34
kbd_write_command: d4
kbd_read_status: 3e
kbd_read_status: 3c
kbd_write_output: fffffff3
kbd_read_status: 35
kbd_read_input: fa
kbd_read_status: 34
kbd_read_status: 34
kbd_write_command: d4
kbd_read_status: 3e
kbd_read_status: 3c
kbd_write_output: 64
kbd_read_status: 35
kbd_read_input: fa
kbd_read_status: 34
kbd_read_status: 34
kbd_write_command: d4
kbd_read_status: 3e
kbd_read_status: 3c
kbd_write_output: fffffff3
kbd_read_status: 35
kbd_read_input: fa
kbd_read_status: 34
kbd_read_status: 34
kbd_write_command: d4
kbd_read_status: 3e
kbd_read_status: 3c
kbd_write_output: 50
kbd_read_status: 35
kbd_read_input: fa
kbd_read_status: 34
kbd_read_status: 34
kbd_write_command: d4
kbd_read_status: 3e
kbd_read_status: 3c
kbd_write_output: fffffff2
kbd_read_status: 35
kbd_read_input: fa
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 00
kbd_read_status: 34
kbd_read_status: 34
kbd_write_command: d4
kbd_read_status: 3e
kbd_read_status: 3c
kbd_write_output: ffffffff
kbd_read_status: 35
kbd_read_input: fa
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: aa
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 00
kbd_read_status: 34
kbd_read_status: 34
kbd_write_command: d4
kbd_read_status: 3e
kbd_read_status: 3c
kbd_write_output: fffffff4
kbd_read_status: 35
kbd_read_input: fa
kbd_read_status: 34
kbd_read_status: 34
kbd_write_command: d4
kbd_read_status: 3e
kbd_read_status: 3c
kbd_write_output: fffffff2
kbd_read_status: 35
kbd_read_input: fa
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 00
kbd_read_status: 34
kbd_read_status: 34
kbd_write_command: 60
kbd_read_status: 3e
kbd_read_status: 3c
kbd_write_output: 65
kbd_read_status: 34
kbd_write_command: a7
kbd_read_status: 3c
kbd_write_command: a8
kbd_read_status: 3e
kbd_read_status: 3c
kbd_write_command: d4
kbd_read_status: 3e
kbd_read_status: 3c
kbd_write_output: f4
kbd_read_status: 34
kbd_read_status: 34
kbd_write_command: 60
kbd_read_status: 3e
kbd_read_status: 3d
kbd_read_input: fa
kbd_read_status: 3c
kbd_write_output: 47
kbd_read_status: 34
kbd_write_output: f4
kbd_read_status: 15
kbd_read_input: fa
kbd_read_status: 14
kbd_read_status: 15
kbd_read_input: 22
kbd_read_status: 14
kbd_read_status: 15
kbd_read_input: a2
kbd_read_status: 14
kbd_read_status: 15
kbd_read_input: 22
kbd_read_status: 14
kbd_read_status: 15
kbd_read_input: a2
kbd_read_status: 14
kbd_read_status: 35
kbd_read_input: 08
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 02
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 00
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 08
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 01
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 01
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 08
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 03
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 00
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 08
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 05
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 01
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 08
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 06
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 00
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 08
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 05
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 00
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 08
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 08
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 00
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 08
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 09
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 00
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 08
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 08
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 00
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 08
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 08
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 00
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 08
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 09
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 00
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 28
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 08
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: ff
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 08
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 09
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 00
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 08
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 0a
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 00
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 08
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 0a
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 00
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 08
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 08
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 00
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 28
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 06
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: ff
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 08
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 05
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 00
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 08
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 04
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 00
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 08
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 01
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 00
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 08
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 05
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 00
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 08
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 04
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 01
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 08
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 01
kbd_read_status: 34
kbd_read_status: 35
kbd_read_input: 00
kbd_read_status: 34
Stelian.
-- 
Stelian Pop <stelian.pop@fr.alcove.com>
Alcove - http://www.alcove.com

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: input subsystem config ?
  2002-07-18 14:41                       ` Stelian Pop
@ 2002-07-18 14:45                         ` Vojtech Pavlik
  2002-07-18 14:48                           ` Stelian Pop
  0 siblings, 1 reply; 21+ messages in thread
From: Vojtech Pavlik @ 2002-07-18 14:45 UTC (permalink / raw)
  To: Stelian Pop, Vojtech Pavlik, Linux Kernel Mailing List

On Thu, Jul 18, 2002 at 04:41:30PM +0200, Stelian Pop wrote:
> On Wed, Jul 17, 2002 at 05:33:36PM +0200, Stelian Pop wrote:
> 
> > The i8042 version used is the one you send me, plus the #if 0 surrounding
> > the aux probe code.
> > 
> > Result: keyboard works, mouse still doesn't.
> [...]
> 
> Ok, I've hacked a bit on the input drivers (trying to look at the
> differences between the pc_keyb.c and the new initialisation sequences),
> with some limited success.
> 
> What I found out is that the mouse is not responding to any of
> the commands in psmouse.c:psmouse_probe. However, if I comment out
> the 'return -1' statements from this function, the mouse will
> be recognised as a default PS/2 mouse. 
> 
> Later, in psmouse_initialise, the PSMOUSE_CMD_ENABLE will fail too
> (no response from the mouse). But since the error is not propagated
> to serio the device remains registered.
> 
> And later, the mouse will get enabled somehow and will function
> perfectly. I didn't succed in finding out what exactly enables it,
> even if I strongly suspect some interraction between the keyboard
> enable and aux port enable... 
> 
> Any further idea ?

Yes. Can you try, with i8042 debugging enabled, after the kernel boots,
moving the mouse? I suspect the data will appear in the log ...

> 
> What I also did, maybe you'll find this interesting, is recording 
> the events sent by the pc_keyb.c driver to the i8042 port (by tracing
> the inb/outb in include/asm-i386/keyboard.h):
> 
> kbd_read_status: 1c
> kbd_write_command: a7
> kbd_read_status: 1e
> kbd_read_status: 1c
> kbd_write_command: 60
> kbd_read_status: 1e
> kbd_read_status: 1c
> kbd_write_output: 65
> kbd_read_status: 14
> kbd_write_output: ed
> kbd_read_status: 15
> kbd_read_input: fa
> kbd_read_status: 14
> kbd_read_status: 14
> kbd_write_output: 00
> kbd_read_status: 15
> kbd_read_input: fa
> kbd_read_status: 14
> kbd_read_status: 14
> kbd_write_command: a8
> kbd_read_status: 1c
> kbd_write_command: d4
> kbd_read_status: 1e
> kbd_read_status: 1c
> kbd_write_output: f4
> kbd_read_status: 14
> kbd_read_status: 14
> kbd_write_command: 60
> kbd_read_status: 1e
> kbd_read_status: 3d
> kbd_read_input: fa
> kbd_read_status: 3c
> kbd_write_output: 47
> kbd_read_status: 34
> kbd_write_output: f4
> kbd_read_status: 15
> kbd_read_input: fa
> kbd_read_status: 14
> kbd_read_status: 14
> kbd_write_command: d4
> kbd_read_status: 1e
> kbd_read_status: 1c
> kbd_write_output: ffffffff
> kbd_read_status: 35
> kbd_read_input: fa
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: aa
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 00
> kbd_read_status: 34
> kbd_read_status: 34
> kbd_write_command: d4
> kbd_read_status: 3e
> kbd_read_status: 3c
> kbd_write_output: fffffff4
> kbd_read_status: 35
> kbd_read_input: fa
> kbd_read_status: 34
> kbd_read_status: 34
> kbd_write_command: d4
> kbd_read_status: 3e
> kbd_read_status: 3c
> kbd_write_output: fffffff2
> kbd_read_status: 35
> kbd_read_input: fa
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 00
> kbd_read_status: 34
> kbd_read_status: 34
> kbd_write_command: d4
> kbd_read_status: 3e
> kbd_read_status: 3c
> kbd_write_output: fffffff3
> kbd_read_status: 35
> kbd_read_input: fa
> kbd_read_status: 34
> kbd_read_status: 34
> kbd_write_command: d4
> kbd_read_status: 3e
> kbd_read_status: 3c
> kbd_write_output: ffffffc8
> kbd_read_status: 35
> kbd_read_input: fa
> kbd_read_status: 34
> kbd_read_status: 34
> kbd_write_command: d4
> kbd_read_status: 3e
> kbd_read_status: 3c
> kbd_write_output: fffffff3
> kbd_read_status: 35
> kbd_read_input: fa
> kbd_read_status: 34
> kbd_read_status: 34
> kbd_write_command: d4
> kbd_read_status: 3e
> kbd_read_status: 3c
> kbd_write_output: 64
> kbd_read_status: 35
> kbd_read_input: fa
> kbd_read_status: 34
> kbd_read_status: 34
> kbd_write_command: d4
> kbd_read_status: 3e
> kbd_read_status: 3c
> kbd_write_output: fffffff3
> kbd_read_status: 35
> kbd_read_input: fa
> kbd_read_status: 34
> kbd_read_status: 34
> kbd_write_command: d4
> kbd_read_status: 3e
> kbd_read_status: 3c
> kbd_write_output: 50
> kbd_read_status: 35
> kbd_read_input: fa
> kbd_read_status: 34
> kbd_read_status: 34
> kbd_write_command: d4
> kbd_read_status: 3e
> kbd_read_status: 3c
> kbd_write_output: fffffff2
> kbd_read_status: 35
> kbd_read_input: fa
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 00
> kbd_read_status: 34
> kbd_read_status: 34
> kbd_write_command: d4
> kbd_read_status: 3e
> kbd_read_status: 3c
> kbd_write_output: ffffffff
> kbd_read_status: 35
> kbd_read_input: fa
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: aa
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 00
> kbd_read_status: 34
> kbd_read_status: 34
> kbd_write_command: d4
> kbd_read_status: 3e
> kbd_read_status: 3c
> kbd_write_output: fffffff4
> kbd_read_status: 35
> kbd_read_input: fa
> kbd_read_status: 34
> kbd_read_status: 34
> kbd_write_command: d4
> kbd_read_status: 3e
> kbd_read_status: 3c
> kbd_write_output: fffffff2
> kbd_read_status: 35
> kbd_read_input: fa
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 00
> kbd_read_status: 34
> kbd_read_status: 34
> kbd_write_command: 60
> kbd_read_status: 3e
> kbd_read_status: 3c
> kbd_write_output: 65
> kbd_read_status: 34
> kbd_write_command: a7
> kbd_read_status: 3c
> kbd_write_command: a8
> kbd_read_status: 3e
> kbd_read_status: 3c
> kbd_write_command: d4
> kbd_read_status: 3e
> kbd_read_status: 3c
> kbd_write_output: f4
> kbd_read_status: 34
> kbd_read_status: 34
> kbd_write_command: 60
> kbd_read_status: 3e
> kbd_read_status: 3d
> kbd_read_input: fa
> kbd_read_status: 3c
> kbd_write_output: 47
> kbd_read_status: 34
> kbd_write_output: f4
> kbd_read_status: 15
> kbd_read_input: fa
> kbd_read_status: 14
> kbd_read_status: 15
> kbd_read_input: 22
> kbd_read_status: 14
> kbd_read_status: 15
> kbd_read_input: a2
> kbd_read_status: 14
> kbd_read_status: 15
> kbd_read_input: 22
> kbd_read_status: 14
> kbd_read_status: 15
> kbd_read_input: a2
> kbd_read_status: 14
> kbd_read_status: 35
> kbd_read_input: 08
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 02
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 00
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 08
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 01
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 01
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 08
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 03
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 00
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 08
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 05
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 01
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 08
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 06
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 00
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 08
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 05
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 00
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 08
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 08
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 00
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 08
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 09
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 00
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 08
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 08
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 00
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 08
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 08
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 00
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 08
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 09
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 00
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 28
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 08
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: ff
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 08
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 09
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 00
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 08
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 0a
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 00
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 08
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 0a
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 00
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 08
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 08
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 00
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 28
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 06
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: ff
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 08
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 05
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 00
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 08
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 04
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 00
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 08
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 01
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 00
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 08
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 05
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 00
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 08
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 04
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 01
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 08
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 01
> kbd_read_status: 34
> kbd_read_status: 35
> kbd_read_input: 00
> kbd_read_status: 34
> Stelian.
> -- 
> Stelian Pop <stelian.pop@fr.alcove.com>
> Alcove - http://www.alcove.com

-- 
Vojtech Pavlik
SuSE Labs

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: input subsystem config ?
  2002-07-18 14:45                         ` Vojtech Pavlik
@ 2002-07-18 14:48                           ` Stelian Pop
  2002-07-18 15:15                             ` Vojtech Pavlik
  0 siblings, 1 reply; 21+ messages in thread
From: Stelian Pop @ 2002-07-18 14:48 UTC (permalink / raw)
  To: Vojtech Pavlik; +Cc: Linux Kernel Mailing List

On Thu, Jul 18, 2002 at 04:45:36PM +0200, Vojtech Pavlik wrote:

> On Thu, Jul 18, 2002 at 04:41:30PM +0200, Stelian Pop wrote:
> > On Wed, Jul 17, 2002 at 05:33:36PM +0200, Stelian Pop wrote:
> > 
> > > The i8042 version used is the one you send me, plus the #if 0 surrounding
> > > the aux probe code.
> > > 
> > > Result: keyboard works, mouse still doesn't.
> > [...]
> > 
> > Ok, I've hacked a bit on the input drivers (trying to look at the
> > differences between the pc_keyb.c and the new initialisation sequences),
> > with some limited success.
> > 
> > What I found out is that the mouse is not responding to any of
> > the commands in psmouse.c:psmouse_probe. However, if I comment out
> > the 'return -1' statements from this function, the mouse will
> > be recognised as a default PS/2 mouse. 
> > 
> > Later, in psmouse_initialise, the PSMOUSE_CMD_ENABLE will fail too
> > (no response from the mouse). But since the error is not propagated
> > to serio the device remains registered.
> > 
> > And later, the mouse will get enabled somehow and will function
> > perfectly. I didn't succed in finding out what exactly enables it,
> > even if I strongly suspect some interraction between the keyboard
> > enable and aux port enable... 
> > 
> > Any further idea ?
> 
> Yes. Can you try, with i8042 debugging enabled, after the kernel boots,
> moving the mouse? I suspect the data will appear in the log ...

Maybe I wasn't very clear, but if I disable the 'return -1', the mouse
will work, and the debugging data is like in:
	...
	i8042.c: 08 <- i8042 (interrupt, aux, 12) [627526]
	i8042.c: 03 <- i8042 (interrupt, aux, 12) [627527]
	i8042.c: 00 <- i8042 (interrupt, aux, 12) [627528]
	...

If I do not disable the 'return -1', the mouse will not be found at
all, and moving it will get no messages in the logs...

Stelian.
-- 
Stelian Pop <stelian.pop@fr.alcove.com>
Alcove - http://www.alcove.com

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: input subsystem config ?
  2002-07-18 14:48                           ` Stelian Pop
@ 2002-07-18 15:15                             ` Vojtech Pavlik
  2002-07-18 15:28                               ` Stelian Pop
  0 siblings, 1 reply; 21+ messages in thread
From: Vojtech Pavlik @ 2002-07-18 15:15 UTC (permalink / raw)
  To: Stelian Pop, Vojtech Pavlik, Linux Kernel Mailing List

On Thu, Jul 18, 2002 at 04:48:38PM +0200, Stelian Pop wrote:

> > > Any further idea ?
> > 
> > Yes. Can you try, with i8042 debugging enabled, after the kernel boots,
> > moving the mouse? I suspect the data will appear in the log ...
> 
> Maybe I wasn't very clear, but if I disable the 'return -1', the mouse
> will work, and the debugging data is like in:
> 	...
> 	i8042.c: 08 <- i8042 (interrupt, aux, 12) [627526]
> 	i8042.c: 03 <- i8042 (interrupt, aux, 12) [627527]
> 	i8042.c: 00 <- i8042 (interrupt, aux, 12) [627528]
> 	...
> 
> If I do not disable the 'return -1', the mouse will not be found at
> all, and moving it will get no messages in the logs...

Ok, that's what I wanted to know - I was wondering whether the mouse
would simply ignore all control commands. And it doesn't not. It needs
the commands, but doesn't send any replies.

Can you check what happens if you use an external mouse together with
the internal one?

I suspect both will work OK.

-- 
Vojtech Pavlik
SuSE Labs

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: input subsystem config ?
  2002-07-18 15:15                             ` Vojtech Pavlik
@ 2002-07-18 15:28                               ` Stelian Pop
  2002-07-18 15:31                                 ` Vojtech Pavlik
  0 siblings, 1 reply; 21+ messages in thread
From: Stelian Pop @ 2002-07-18 15:28 UTC (permalink / raw)
  To: Vojtech Pavlik; +Cc: Linux Kernel Mailing List

On Thu, Jul 18, 2002 at 05:15:31PM +0200, Vojtech Pavlik wrote:

> > If I do not disable the 'return -1', the mouse will not be found at
> > all, and moving it will get no messages in the logs...
> 
> Ok, that's what I wanted to know - I was wondering whether the mouse
> would simply ignore all control commands. And it doesn't not. It needs
> the commands, 

I'm not sure about that. It will not work if I do not disable the
'return -1' because the irq will get freed, so the driver will have
no chance to get any mouse event.

> but doesn't send any replies.

Maybe I should put some debug statements in the pc_keyb.c interrupt
handler and see if the mouse does answer the control commands ?

> Can you check what happens if you use an external mouse together with
> the internal one?
>
> I suspect both will work OK.

External like in 'external PS/2' mouse ? Bad luck, this laptop 
has no PS/2 (or serial) port. :-(

I can plug in a USB mouse, but I doubt it will show any useful
information...

Stelian.
-- 
Stelian Pop <stelian.pop@fr.alcove.com>
Alcove - http://www.alcove.com

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: input subsystem config ?
  2002-07-18 15:28                               ` Stelian Pop
@ 2002-07-18 15:31                                 ` Vojtech Pavlik
  2002-07-18 16:02                                   ` Stelian Pop
  2002-07-19 14:36                                   ` Stelian Pop
  0 siblings, 2 replies; 21+ messages in thread
From: Vojtech Pavlik @ 2002-07-18 15:31 UTC (permalink / raw)
  To: Stelian Pop, Vojtech Pavlik, Linux Kernel Mailing List

On Thu, Jul 18, 2002 at 05:28:29PM +0200, Stelian Pop wrote:
> On Thu, Jul 18, 2002 at 05:15:31PM +0200, Vojtech Pavlik wrote:
> 
> > > If I do not disable the 'return -1', the mouse will not be found at
> > > all, and moving it will get no messages in the logs...
> > 
> > Ok, that's what I wanted to know - I was wondering whether the mouse
> > would simply ignore all control commands. And it doesn't not. It needs
> > the commands, 
> 
> I'm not sure about that. It will not work if I do not disable the
> 'return -1' because the irq will get freed, so the driver will have
> no chance to get any mouse event.

Actually, no. It also polls the chip repeatedly without needing an irq,
so it can receive bytes even when no irq happens.

> > but doesn't send any replies.
> 
> Maybe I should put some debug statements in the pc_keyb.c interrupt
> handler and see if the mouse does answer the control commands ?

That's a good idea, yes.

> > Can you check what happens if you use an external mouse together with
> > the internal one?
> >
> > I suspect both will work OK.
> 
> External like in 'external PS/2' mouse ? Bad luck, this laptop 
> has no PS/2 (or serial) port. :-(

Ok.

> I can plug in a USB mouse, but I doubt it will show any useful
> information...

No, it won't.

-- 
Vojtech Pavlik
SuSE Labs

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: input subsystem config ?
  2002-07-18 15:31                                 ` Vojtech Pavlik
@ 2002-07-18 16:02                                   ` Stelian Pop
  2002-07-19 14:36                                   ` Stelian Pop
  1 sibling, 0 replies; 21+ messages in thread
From: Stelian Pop @ 2002-07-18 16:02 UTC (permalink / raw)
  To: Vojtech Pavlik; +Cc: Linux Kernel Mailing List

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

On Thu, Jul 18, 2002 at 05:31:32PM +0200, Vojtech Pavlik wrote:

> > I'm not sure about that. It will not work if I do not disable the
> > 'return -1' because the irq will get freed, so the driver will have
> > no chance to get any mouse event.
> 
> Actually, no. It also polls the chip repeatedly without needing an irq,
> so it can receive bytes even when no irq happens.

Ok, tried again and I confirm again, no events from the mouse.

> > Maybe I should put some debug statements in the pc_keyb.c interrupt
> > handler and see if the mouse does answer the control commands ?
> 
> That's a good idea, yes.

Ok, the mouse seems to answer the control commands. See the
attached files:
	DIFFS: the diffs I made to put tracing into 
		include/asm-i386/keyboard.h and drivers/char/pc_keyb.c
	DMESG-INPUT: kernel logs when input drivers are activated
	DMESG-NOINPUT: good old pc_keyb.c driver :-)

At the end of each DMESG files I tried to type on the keyboard and
move the mouse. In the first you have only the keyboard events, in
the second both of them.

Stelian.
-- 
Stelian Pop <stelian.pop@fr.alcove.com>
Alcove - http://www.alcove.com

[-- Attachment #2: DIFFS --]
[-- Type: text/plain, Size: 3008 bytes --]

===== include/asm/keyboard.h 1.4 vs edited =====
--- 1.4/include/asm-i386/keyboard.h	Tue Feb  5 08:55:11 2002
+++ edited/include/asm/keyboard.h	Thu Jul 18 16:56:40 2002
@@ -48,11 +48,26 @@
 #define kbd_request_irq(handler) request_irq(KEYBOARD_IRQ, handler, 0, \
                                              "keyboard", NULL)
 
+#define KBD_DATA_REG            0x60    /* Keyboard data register (R/W) */
+#define KBD_STATUS_REG          0x64    /* Status register (R) */
+
 /* How to access the keyboard macros on this platform.  */
-#define kbd_read_input() inb(KBD_DATA_REG)
-#define kbd_read_status() inb(KBD_STATUS_REG)
-#define kbd_write_output(val) outb(val, KBD_DATA_REG)
-#define kbd_write_command(val) outb(val, KBD_CNTL_REG)
+static inline char kbd_read_input(void) { 
+	unsigned char tmp = inb(KBD_DATA_REG); 
+	printk("%02x <- KBD.C (input)\n", tmp); 
+	return tmp;
+}
+
+static inline char kbd_read_status(void) {
+	unsigned char tmp = inb(KBD_STATUS_REG); 
+	printk("%02x <- KBD.C (status)\n", tmp); 
+	return tmp;
+}
+
+#define kbd_write_output(val) \
+	{ printk("%02x -> KBD.C (output)\n", val); outb(val, KBD_DATA_REG); }
+#define kbd_write_command(val) \
+	{ printk("%02x -> KBD.C (command)\n", val); outb(val, KBD_CNTL_REG); }
 
 /* Some stoneage hardware needs delays after some operations.  */
 #define kbd_pause() do { } while(0)
===== drivers/char/pc_keyb.c 1.16 vs edited =====
--- 1.16/drivers/char/pc_keyb.c	Wed Jul 10 02:06:27 2002
+++ edited/drivers/char/pc_keyb.c	Thu Jul 18 17:00:42 2002
@@ -70,7 +70,7 @@
 #endif
 
 static spinlock_t kbd_controller_lock = SPIN_LOCK_UNLOCKED;
-static unsigned char handle_kbd_event(void);
+static unsigned char handle_kbd_event(int irq);
 
 /* used only by send_data - set by keyboard_interrupt */
 static volatile unsigned char reply_expected;
@@ -122,7 +122,7 @@
 		 * "handle_kbd_event()" will handle any incoming events
 		 * while we wait - keypresses or mouse movement.
 		 */
-		unsigned char status = handle_kbd_event();
+		unsigned char status = handle_kbd_event(0);
 
 		if (! (status & KBD_STAT_IBF))
 			return;
@@ -487,7 +487,7 @@
  * It requires that we hold the keyboard controller
  * spinlock.
  */
-static unsigned char handle_kbd_event(void)
+static unsigned char handle_kbd_event(int irq)
 {
 	unsigned char status = kbd_read_status();
 	unsigned int work = 10000;
@@ -504,11 +504,16 @@
 		if (!(status & (KBD_STAT_GTO | KBD_STAT_PERR)))
 #endif
 		{
+			printk("%02x <- KBD.C (interrupt, %s, %d)\n",
+				scancode, (status & KBD_STAT_MOUSE_OBF) ? "aux" : "kbd", irq);
 			if (status & KBD_STAT_MOUSE_OBF)
 				handle_mouse_event(scancode);
 			else
 				handle_keyboard_event(scancode);
 		}
+		else
+			printk("%02x <- KBD.C (FAKE interrupt, %s, %d)\n",
+				scancode, (status & KBD_STAT_MOUSE_OBF) ? "aux" : "kbd", irq);
 
 		status = kbd_read_status();
 	}
@@ -527,7 +532,7 @@
 #endif
 
 	spin_lock_irq(&kbd_controller_lock);
-	handle_kbd_event();
+	handle_kbd_event(irq);
 	spin_unlock_irq(&kbd_controller_lock);
 }
 

[-- Attachment #3: DMESG-INPUT --]
[-- Type: text/plain, Size: 11230 bytes --]

Linux version 2.5.26 (tiniou@crusoe.alcove-fr) (gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-110)) #2 Thu Jul 18 17:02:17 CEST 2002
Video mode to be used for restore is f00
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009b800 (usable)
 BIOS-e820: 000000000009b800 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000e8000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 0000000006ff0000 (usable)
 BIOS-e820: 0000000006ff0000 - 0000000006fff800 (ACPI data)
 BIOS-e820: 0000000006fff800 - 0000000007000000 (ACPI NVS)
 BIOS-e820: 00000000fff80000 - 0000000100000000 (reserved)
111MB LOWMEM available.
ACPI: have wakeup address 0xc0001000
On node 0 totalpages: 28656
zone(0): 4096 pages.
zone(1): 24560 pages.
zone(2): 0 pages.
ACPI: RSDP (v000 SONY                       ) @ 0x000f8070
ACPI: RSDT (v001 SONY   P1       08193.02342) @ 0x06ffcfbe
ACPI: FADT (v002 SONY   P1       08193.02342) @ 0x06fff754
ACPI: BOOT (v001 SONY   P1       08193.02342) @ 0x06fff7d8
Sony Vaio laptop detected.
Kernel command line: ro root=/dev/hda2 LOCATION=work
Initializing CPU#0
Detected 595.655 MHz processor.
Console: colour VGA+ 80x25
Calibrating delay loop... 1026.04 BogoMIPS
Memory: 111336k/114624k available (1147k kernel code, 2884k reserved, 294k data, 192k init, 0k highmem)
Dentry-cache hash table entries: 16384 (order: 5, 131072 bytes)
Inode-cache hash table entries: 8192 (order: 4, 65536 bytes)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU: Before vendor init, caps: 0080803f 00000000 00000006, vendor = 7
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (32 bytes/line)
CPU: L2 Cache: 512K (128 bytes/line)
CPU: Processor revision 1.3.1.3, 600 MHz
CPU: Code Morphing Software revision 4.1.4-7-51
CPU: 20000805 23:30 official release 4.1.4#2
CPU: After vendor init, caps: 0080813f 00000000 00000006 00000000
CPU:     After generic, caps: 0080813f 00000000 00000006 00000000
CPU:             Common caps: 0080813f 00000000 00000006 00000000
CPU: Transmeta(tm) Crusoe(tm) Processor TM5600 stepping 03
Checking 'hlt' instruction... OK.
POSIX conformance testing by UNIFIX
mtrr: v1.40 (20010327) Richard Gooch (rgooch@atnf.csiro.au)
mtrr: detected mtrr type: none
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
PCI: PCI BIOS revision 2.10 entry at 0xfd98e, last bus=0
PCI: Using configuration type 1
ACPI: Subsystem revision 20020702
 tbxface-0099 [03] Acpi_load_tables      : ACPI Tables successfully loaded
Parsing Methods:..................................................................................................................
Table [DSDT] - 429 Objects with 35 Devices 114 Methods 14 Regions
ACPI Namespace successfully loaded at root c02ac5dc
evxfevnt-0076 [04] Acpi_enable           : Transition to ACPI mode successful
Executing all Device _STA and_INI methods:...................................
35 Devices found containing: 35 _STA, 2 _INI methods
Completing Region/Field/Buffer/Package initialization:............................................
Initialized 8/14 Regions 0/0 Fields 19/19 Buffers 17/17 Packages (429 nodes)
ACPI: Interpreter enabled
ACPI: Using PIC for interrupt routing
ACPI: System [ACPI] (supports S0 S3 S4 S5)
ACPI: PCI Root Bridge [PCI0] (00:00)
PCI: Probing PCI hardware (bus 00)
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
pci_bind-0191 [94] acpi_pci_bind         : Device 00:00:0a.00 not present in PCI namespace
ACPI: Embedded Controller [EC0] (gpe 9)
ACPI: PCI Interrupt Link [LNKA] (IRQs *9)
ACPI: PCI Interrupt Link [LNKB] (IRQs *9)
ACPI: PCI Interrupt Link [LNKC] (IRQs *9)
ACPI: PCI Interrupt Link [LNKD] (IRQs *9)
ACPI: Power Resource [LRP0] (off)
PCI: Using ACPI for IRQ routing
PCI: if you experience problems, try using option 'pci=noacpi'
PCI: Cannot allocate resource region 4 of device 00:07.1
SBF: Simple Boot Flag extension found and enabled.
SBF: Setting boot flags 0x1
Starting kswapd
BIO: pool of 256 setup, 14Kb (56 bytes/bio)
biovec: init pool 0, 1 entries, 12 bytes
biovec: init pool 1, 4 entries, 48 bytes
biovec: init pool 2, 16 entries, 192 bytes
biovec: init pool 3, 64 entries, 768 bytes
biovec: init pool 4, 128 entries, 1536 bytes
biovec: init pool 5, 256 entries, 3072 bytes
VFS: Disk quotas vdquot_6.5.1
Journalled Block Device driver loaded
ACPI: AC Adapter [ACAD] (off-line)
ACPI: Battery Slot [BAT1] (battery present)
ACPI: Lid Switch [LID]
ACPI: Power Button (CM) [PWRB]
ACPI: Fan [LRA0] (off)
acpi_processor-0897 [173] acpi_processor_get_per: Unsupported address space [127] (control_register)
ACPI: Processor [CPU0] (supports C1 C2 C3)
ACPI: Thermal Zone [ATF0] (64 C)
1c <- KBD.C (status)
ed -> KBD.C (output)
keyboard: Timeout - AT keyboard not present?(ed)
15 <- KBD.C (status)
fa <- KBD.C (input)
fa <- KBD.C (interrupt, kbd, 0)
14 <- KBD.C (status)
f4 -> KBD.C (output)
pty: 256 Unix98 ptys configured
Real Time Clock Driver v1.11
block: 256 slots per queue, batch=32
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
ATA/ATAPI device driver v7.0.0
ATA: PCI bus speed 33.3MHz
ATA: Intel Corp. 82371AB PIIX4 IDE, PCI slot 00:07.1
ATA: chipset rev.: 1
ATA: non-legacy mode: IRQ probe delayed
PIIX: Intel Corp. 82371AB PIIX4 IDE UDMA33 controller on pci00:07.1
    ide0: BM-DMA at 0x1090-0x1097, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0x1098-0x109f, BIOS settings: hdc:pio, hdd:pio
hda: HITACHI_DK23AA-12, DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
 hda: 23579136 sectors w/512KiB Cache, CHS=23392/16/63, UDMA(33)
 hda: [PTBL] [1467/255/63] hda1 hda2 hda3 < hda5 hda6 >
mice: PS/2 mouse device common for all mice
i8042.c: fa <- i8042 (flush, kbd) [0]
i8042.c: 20 -> i8042 (command) [0]
i8042.c: 47 <- i8042 (return) [0]
i8042.c: 60 -> i8042 (command) [0]
i8042.c: 56 -> i8042 (parameter) [0]
i8042.c: d3 -> i8042 (command) [1]
i8042.c: 5a -> i8042 (parameter) [1]
i8042.c: a5 <- i8042 (return) [1]
i8042.c: a9 -> i8042 (command) [1]
i8042.c: 00 <- i8042 (return) [1]
i8042.c: a7 -> i8042 (command) [1]
i8042.c: 20 -> i8042 (command) [1]
i8042.c: 76 <- i8042 (return) [1]
i8042.c: a9 -> i8042 (command) [2]
i8042.c: 00 <- i8042 (return) [2]
i8042.c: a8 -> i8042 (command) [2]
i8042.c: 20 -> i8042 (command) [2]
i8042.c: 56 <- i8042 (return) [2]
i8042.c: 60 -> i8042 (command) [2]
i8042.c: 74 -> i8042 (parameter) [2]
i8042.c: 60 -> i8042 (command) [2]
i8042.c: 54 -> i8042 (parameter) [2]
i8042.c: 60 -> i8042 (command) [3]
i8042.c: 56 -> i8042 (parameter) [3]
i8042.c: d4 -> i8042 (command) [3]
i8042.c: f6 -> i8042 (parameter) [3]
i8042.c: 60 -> i8042 (command) [3]
i8042.c: 56 -> i8042 (parameter) [3]
i8042.c: 60 -> i8042 (command) [91]
i8042.c: 54 -> i8042 (parameter) [91]
i8042.c: 60 -> i8042 (command) [92]
i8042.c: 56 -> i8042 (parameter) [92]
i8042.c: d4 -> i8042 (command) [92]
i8042.c: f5 -> i8042 (parameter) [92]
i8042.c: 60 -> i8042 (command) [92]
i8042.c: 56 -> i8042 (parameter) [92]
i8042.c: 60 -> i8042 (command) [180]
i8042.c: 54 -> i8042 (parameter) [180]
serio: i8042 AUX port at 0x60,0x64 irq 12
i8042.c: 60 -> i8042 (command) [180]
i8042.c: 44 -> i8042 (parameter) [180]
i8042.c: 60 -> i8042 (command) [180]
i8042.c: 45 -> i8042 (parameter) [180]
i8042.c: f6 -> i8042 (kbd-data) [180]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [183]
i8042.c: f2 -> i8042 (kbd-data) [183]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [186]
i8042.c: ab <- i8042 (interrupt, kbd, 1) [192]
i8042.c: 60 -> i8042 (command) [192]
i8042.c: 44 -> i8042 (parameter) [192]
i8042.c: 60 -> i8042 (command) [192]
i8042.c: 45 -> i8042 (parameter) [192]
i8042.c: f5 -> i8042 (kbd-data) [192]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [195]
i8042.c: f2 -> i8042 (kbd-data) [195]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [198]
i8042.c: ab <- i8042 (interrupt, kbd, 1) [203]
i8042.c: 41 <- i8042 (interrupt, kbd, 1) [208]
i8042.c: ea -> i8042 (kbd-data) [208]
i8042.c: fe <- i8042 (interrupt, kbd, 1) [211]
i8042.c: f0 -> i8042 (kbd-data) [211]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [214]
i8042.c: 02 -> i8042 (kbd-data) [214]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [216]
i8042.c: f0 -> i8042 (kbd-data) [216]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [219]
i8042.c: 00 -> i8042 (kbd-data) [219]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [222]
i8042.c: 41 <- i8042 (interrupt, kbd, 1) [224]
input.c: calling /sbin/hotplug input [HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add PRODUCT=11/1/2/ab02 NAME=AT Set 2 keyboard]
input.c: hotplug returned -2
input: AT Set 2 keyboard on isa0060/serio0
i8042.c: f8 -> i8042 (kbd-data) [227]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [230]
i8042.c: ed -> i8042 (kbd-data) [230]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [233]
i8042.c: 00 -> i8042 (kbd-data) [234]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [239]
i8042.c: f4 -> i8042 (kbd-data) [239]
i8042.c: fa <- i8042 (interrupt, kbd, 1) [242]
serio: i8042 KBD port at 0x60,0x64 irq 1
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 8192 bind 8192)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 192k freed
Adding 530104k swap on /dev/hda5.  Priority:-1 extents:1
usb.c: registered new driver usbfs
usb.c: registered new driver hub
EXT3 FS 2.4-0.9.16, 02 Dec 2001 on ide0(3,2), internal journal
kjournald starting.  Commit interval 5 seconds
EXT3 FS 2.4-0.9.16, 02 Dec 2001 on ide0(3,6), internal journal
EXT3-fs: mounted filesystem with ordered data mode.
FAT: Using codepage cp437
FAT: Using IO charset iso8859-1
uhci-hcd.c: USB Universal Host Controller Interface driver v2.0
hcd-pci.c: uhci-hcd @ 00:07.2, Intel Corp. 82371AB PIIX4 USB
hcd-pci.c: irq 9, io base 00001060
hcd.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found at /
hub.c: 2 ports detected
hcd-pci.c: remove: 00:07.2, state 3
usb.c: USB disconnect on device 1
usb.c: USB disconnect on device 1
hcd.c: USB bus 1 deregistered
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
SCSI subsystem driver Revision: 1.00
ip_tables: (C) 2000-2002 Netfilter core team
ip_conntrack version 2.0 (895 buckets, 7160 max) - 292 bytes per conntrack
Linux Kernel Card Services 3.1.22
  options:  [pci] [cardbus] [pm]
ds: no socket drivers loaded!
unloading Kernel Card Services
Linux Kernel Card Services 3.1.22
  options:  [pci] [cardbus] [pm]
Yenta IRQ list 0cb8, PCI irq9
Socket status: 30000419
cs: IO port probe 0x0c00-0x0cff: clean.
cs: IO port probe 0x0100-0x04ff: excluding 0x170-0x177 0x370-0x377 0x4d0-0x4d7
cs: IO port probe 0x0a00-0x0aff: clean.
cs: memory probe 0xa0000000-0xa0ffffff: clean.
eth0: NE2000 Compatible: io 0x300, irq 3, hw_addr 00:50:BA:8E:38:DE
i8042.c: 39 <- i8042 (interrupt, kbd, 1) [87790]
i8042.c: b9 <- i8042 (interrupt, kbd, 1) [87894]
i8042.c: 39 <- i8042 (interrupt, kbd, 1) [88077]
i8042.c: b9 <- i8042 (interrupt, kbd, 1) [88193]
i8042.c: 23 <- i8042 (interrupt, kbd, 1) [100363]
i8042.c: a3 <- i8042 (interrupt, kbd, 1) [100463]
spurious 8259A interrupt: IRQ7.

[-- Attachment #4: DMESG-NOINPUT --]
[-- Type: text/plain, Size: 18533 bytes --]

Linux version 2.5.26 (tiniou@crusoe.alcove-fr) (gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-110)) #2 Thu Jul 18 17:02:17 CEST 2002
Video mode to be used for restore is f00
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009b800 (usable)
 BIOS-e820: 000000000009b800 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000e8000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 0000000006ff0000 (usable)
 BIOS-e820: 0000000006ff0000 - 0000000006fff800 (ACPI data)
 BIOS-e820: 0000000006fff800 - 0000000007000000 (ACPI NVS)
 BIOS-e820: 00000000fff80000 - 0000000100000000 (reserved)
111MB LOWMEM available.
ACPI: have wakeup address 0xc0001000
On node 0 totalpages: 28656
zone(0): 4096 pages.
zone(1): 24560 pages.
zone(2): 0 pages.
ACPI: RSDP (v000 SONY                       ) @ 0x000f8070
ACPI: RSDT (v001 SONY   P1       08193.02342) @ 0x06ffcfbe
ACPI: FADT (v002 SONY   P1       08193.02342) @ 0x06fff754
ACPI: BOOT (v001 SONY   P1       08193.02342) @ 0x06fff7d8
Sony Vaio laptop detected.
Kernel command line: ro root=/dev/hda2 LOCATION=work
Initializing CPU#0
Detected 595.655 MHz processor.
Console: colour VGA+ 80x25
Calibrating delay loop... 1026.04 BogoMIPS
Memory: 111336k/114624k available (1147k kernel code, 2884k reserved, 294k data, 192k init, 0k highmem)
Dentry-cache hash table entries: 16384 (order: 5, 131072 bytes)
Inode-cache hash table entries: 8192 (order: 4, 65536 bytes)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU: Before vendor init, caps: 0080803f 00000000 00000006, vendor = 7
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (32 bytes/line)
CPU: L2 Cache: 512K (128 bytes/line)
CPU: Processor revision 1.3.1.3, 600 MHz
CPU: Code Morphing Software revision 4.1.4-7-51
CPU: 20000805 23:30 official release 4.1.4#2
CPU: After vendor init, caps: 0080813f 00000000 00000006 00000000
CPU:     After generic, caps: 0080813f 00000000 00000006 00000000
CPU:             Common caps: 0080813f 00000000 00000006 00000000
CPU: Transmeta(tm) Crusoe(tm) Processor TM5600 stepping 03
Checking 'hlt' instruction... OK.
POSIX conformance testing by UNIFIX
mtrr: v1.40 (20010327) Richard Gooch (rgooch@atnf.csiro.au)
mtrr: detected mtrr type: none
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
PCI: PCI BIOS revision 2.10 entry at 0xfd98e, last bus=0
PCI: Using configuration type 1
ACPI: Subsystem revision 20020702
 tbxface-0099 [03] Acpi_load_tables      : ACPI Tables successfully loaded
Parsing Methods:..................................................................................................................
Table [DSDT] - 429 Objects with 35 Devices 114 Methods 14 Regions
ACPI Namespace successfully loaded at root c02ac5dc
evxfevnt-0076 [04] Acpi_enable           : Transition to ACPI mode successful
Executing all Device _STA and_INI methods:...................................
35 Devices found containing: 35 _STA, 2 _INI methods
Completing Region/Field/Buffer/Package initialization:............................................
Initialized 8/14 Regions 0/0 Fields 19/19 Buffers 17/17 Packages (429 nodes)
ACPI: Interpreter enabled
ACPI: Using PIC for interrupt routing
ACPI: System [ACPI] (supports S0 S3 S4 S5)
ACPI: PCI Root Bridge [PCI0] (00:00)
PCI: Probing PCI hardware (bus 00)
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
pci_bind-0191 [94] acpi_pci_bind         : Device 00:00:0a.00 not present in PCI namespace
ACPI: Embedded Controller [EC0] (gpe 9)
ACPI: PCI Interrupt Link [LNKA] (IRQs *9)
ACPI: PCI Interrupt Link [LNKB] (IRQs *9)
ACPI: PCI Interrupt Link [LNKC] (IRQs *9)
ACPI: PCI Interrupt Link [LNKD] (IRQs *9)
ACPI: Power Resource [LRP0] (off)
PCI: Using ACPI for IRQ routing
PCI: if you experience problems, try using option 'pci=noacpi'
PCI: Cannot allocate resource region 4 of device 00:07.1
SBF: Simple Boot Flag extension found and enabled.
SBF: Setting boot flags 0x1
Starting kswapd
BIO: pool of 256 setup, 14Kb (56 bytes/bio)
biovec: init pool 0, 1 entries, 12 bytes
biovec: init pool 1, 4 entries, 48 bytes
biovec: init pool 2, 16 entries, 192 bytes
biovec: init pool 3, 64 entries, 768 bytes
biovec: init pool 4, 128 entries, 1536 bytes
biovec: init pool 5, 256 entries, 3072 bytes
VFS: Disk quotas vdquot_6.5.1
Journalled Block Device driver loaded
ACPI: AC Adapter [ACAD] (off-line)
ACPI: Battery Slot [BAT1] (battery present)
ACPI: Lid Switch [LID]
ACPI: Power Button (CM) [PWRB]
ACPI: Fan [LRA0] (off)
acpi_processor-0897 [173] acpi_processor_get_per: Unsupported address space [127] (control_register)
ACPI: Processor [CPU0] (supports C1 C2 C3)
ACPI: Thermal Zone [ATF0] (64 C)
1c <- KBD.C (status)
a7 -> KBD.C (command)
1e <- KBD.C (status)
1c <- KBD.C (status)
60 -> KBD.C (command)
1e <- KBD.C (status)
1c <- KBD.C (status)
65 -> KBD.C (output)
14 <- KBD.C (status)
ed -> KBD.C (output)
15 <- KBD.C (status)
fa <- KBD.C (input)
fa <- KBD.C (interrupt, kbd, 1)
14 <- KBD.C (status)
14 <- KBD.C (status)
00 -> KBD.C (output)
15 <- KBD.C (status)
fa <- KBD.C (input)
fa <- KBD.C (interrupt, kbd, 1)
14 <- KBD.C (status)
pty: 256 Unix98 ptys configured
Real Time Clock Driver v1.11
block: 256 slots per queue, batch=32
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
ATA/ATAPI device driver v7.0.0
ATA: PCI bus speed 33.3MHz
ATA: Intel Corp. 82371AB PIIX4 IDE, PCI slot 00:07.1
ATA: chipset rev.: 1
ATA: non-legacy mode: IRQ probe delayed
PIIX: Intel Corp. 82371AB PIIX4 IDE UDMA33 controller on pci00:07.1
    ide0: BM-DMA at 0x1090-0x1097, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0x1098-0x109f, BIOS settings: hdc:pio, hdd:pio
hda: HITACHI_DK23AA-12, DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
 hda: 23579136 sectors w/512KiB Cache, CHS=23392/16/63, UDMA(33)
 hda: [PTBL] [1467/255/63] hda1 hda2 hda3 < hda5 hda6 >
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 8192 bind 8192)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 192k freed
Adding 530104k swap on /dev/hda5.  Priority:-1 extents:1
usb.c: registered new driver usbfs
usb.c: registered new driver hub
uhci-hcd.c: USB Universal Host Controller Interface driver v2.0
hcd-pci.c: uhci-hcd @ 00:07.2, Intel Corp. 82371AB PIIX4 USB
hcd-pci.c: irq 9, io base 00001060
hcd.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found at /
hub.c: 2 ports detected
hub.c: new USB device 00:07.2-2, assigned address 2
spurious 8259A interrupt: IRQ7.
usb.c: USB device 2 (vend/prod 0x54c/0x32) is not claimed by any active driver.
SCSI subsystem driver Revision: 1.00
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
scsi0 : SCSI emulation for USB Mass Storage devices
  Vendor: Sony      Model: MSC-U01N          Rev: 1.00
  Type:   Direct-Access                      ANSI SCSI revision: 02
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 2
USB Mass Storage support registered.
EXT3 FS 2.4-0.9.16, 02 Dec 2001 on ide0(3,2), internal journal
kjournald starting.  Commit interval 5 seconds
EXT3 FS 2.4-0.9.16, 02 Dec 2001 on ide0(3,6), internal journal
EXT3-fs: mounted filesystem with ordered data mode.
FAT: Using codepage cp437
FAT: Using IO charset iso8859-1
14 <- KBD.C (status)
a8 -> KBD.C (command)
1e <- KBD.C (status)
1c <- KBD.C (status)
d4 -> KBD.C (command)
1e <- KBD.C (status)
1c <- KBD.C (status)
f4 -> KBD.C (output)
14 <- KBD.C (status)
14 <- KBD.C (status)
60 -> KBD.C (command)
1e <- KBD.C (status)
1e <- KBD.C (status)
1e <- KBD.C (status)
1e <- KBD.C (status)
1e <- KBD.C (status)
1e <- KBD.C (status)
1e <- KBD.C (status)
1e <- KBD.C (status)
3d <- KBD.C (status)
fa <- KBD.C (input)
fa <- KBD.C (interrupt, aux, 0)
3c <- KBD.C (status)
47 -> KBD.C (output)
34 <- KBD.C (status)
f4 -> KBD.C (output)
15 <- KBD.C (status)
fa <- KBD.C (input)
fa <- KBD.C (interrupt, kbd, 1)
14 <- KBD.C (status)
14 <- KBD.C (status)
d4 -> KBD.C (command)
1e <- KBD.C (status)
1c <- KBD.C (status)
ffffffff -> KBD.C (output)
35 <- KBD.C (status)
fa <- KBD.C (input)
fa <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
aa <- KBD.C (input)
aa <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
00 <- KBD.C (input)
00 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
34 <- KBD.C (status)
d4 -> KBD.C (command)
3e <- KBD.C (status)
3c <- KBD.C (status)
fffffff4 -> KBD.C (output)
35 <- KBD.C (status)
fa <- KBD.C (input)
fa <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
34 <- KBD.C (status)
d4 -> KBD.C (command)
3e <- KBD.C (status)
3c <- KBD.C (status)
fffffff2 -> KBD.C (output)
35 <- KBD.C (status)
fa <- KBD.C (input)
fa <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
00 <- KBD.C (input)
00 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
34 <- KBD.C (status)
d4 -> KBD.C (command)
3e <- KBD.C (status)
3c <- KBD.C (status)
fffffff3 -> KBD.C (output)
35 <- KBD.C (status)
fa <- KBD.C (input)
fa <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
34 <- KBD.C (status)
d4 -> KBD.C (command)
3e <- KBD.C (status)
3c <- KBD.C (status)
ffffffc8 -> KBD.C (output)
35 <- KBD.C (status)
fa <- KBD.C (input)
fa <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
34 <- KBD.C (status)
d4 -> KBD.C (command)
3e <- KBD.C (status)
3c <- KBD.C (status)
fffffff3 -> KBD.C (output)
35 <- KBD.C (status)
fa <- KBD.C (input)
fa <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
34 <- KBD.C (status)
d4 -> KBD.C (command)
3e <- KBD.C (status)
3c <- KBD.C (status)
64 -> KBD.C (output)
35 <- KBD.C (status)
fa <- KBD.C (input)
fa <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
34 <- KBD.C (status)
d4 -> KBD.C (command)
3e <- KBD.C (status)
3c <- KBD.C (status)
fffffff3 -> KBD.C (output)
35 <- KBD.C (status)
fa <- KBD.C (input)
fa <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
34 <- KBD.C (status)
d4 -> KBD.C (command)
3e <- KBD.C (status)
3c <- KBD.C (status)
50 -> KBD.C (output)
35 <- KBD.C (status)
fa <- KBD.C (input)
fa <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
34 <- KBD.C (status)
d4 -> KBD.C (command)
3e <- KBD.C (status)
3c <- KBD.C (status)
fffffff2 -> KBD.C (output)
35 <- KBD.C (status)
fa <- KBD.C (input)
fa <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
00 <- KBD.C (input)
00 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
34 <- KBD.C (status)
d4 -> KBD.C (command)
3e <- KBD.C (status)
3c <- KBD.C (status)
ffffffff -> KBD.C (output)
35 <- KBD.C (status)
fa <- KBD.C (input)
fa <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
aa <- KBD.C (input)
aa <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
00 <- KBD.C (input)
00 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
34 <- KBD.C (status)
d4 -> KBD.C (command)
3e <- KBD.C (status)
3c <- KBD.C (status)
fffffff4 -> KBD.C (output)
35 <- KBD.C (status)
fa <- KBD.C (input)
fa <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
34 <- KBD.C (status)
d4 -> KBD.C (command)
3e <- KBD.C (status)
3c <- KBD.C (status)
fffffff2 -> KBD.C (output)
35 <- KBD.C (status)
fa <- KBD.C (input)
fa <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
00 <- KBD.C (input)
00 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
34 <- KBD.C (status)
60 -> KBD.C (command)
3e <- KBD.C (status)
3c <- KBD.C (status)
65 -> KBD.C (output)
34 <- KBD.C (status)
a7 -> KBD.C (command)
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled
Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
sda : READ CAPACITY failed.
sda : status=0, message=00, host=7, driver=00 
sda : sense not available. 
sda: test WP failed, assume Write Enabled
 sda:SCSI disk error : host 0 channel 0 id 0 lun 0 return code = 70000
end_request: I/O error, dev 08:00, sector 0
Buffer I/O error on device sd(8,0), logical block 0
SCSI disk error : host 0 channel 0 id 0 lun 0 return code = 70000
end_request: I/O error, dev 08:00, sector 0
Buffer I/O error on device sd(8,0), logical block 0
 unable to read partition table
ip_tables: (C) 2000-2002 Netfilter core team
ip_conntrack version 2.0 (895 buckets, 7160 max) - 292 bytes per conntrack
Linux Kernel Card Services 3.1.22
  options:  [pci] [cardbus] [pm]
ds: no socket drivers loaded!
unloading Kernel Card Services
Linux Kernel Card Services 3.1.22
  options:  [pci] [cardbus] [pm]
Yenta IRQ list 0cb8, PCI irq9
Socket status: 30000419
cs: IO port probe 0x0c00-0x0cff: clean.
cs: IO port probe 0x0100-0x04ff: excluding 0x170-0x177 0x370-0x377 0x4d0-0x4d7
cs: IO port probe 0x0a00-0x0aff: clean.
cs: memory probe 0xa0000000-0xa0ffffff: clean.
eth0: NE2000 Compatible: io 0x300, irq 3, hw_addr 00:50:BA:8E:38:DE
3c <- KBD.C (status)
a8 -> KBD.C (command)
3c <- KBD.C (status)
d4 -> KBD.C (command)
3e <- KBD.C (status)
3c <- KBD.C (status)
f4 -> KBD.C (output)
34 <- KBD.C (status)
34 <- KBD.C (status)
60 -> KBD.C (command)
3e <- KBD.C (status)
3e <- KBD.C (status)
3e <- KBD.C (status)
3d <- KBD.C (status)
fa <- KBD.C (input)
fa <- KBD.C (interrupt, aux, 0)
3c <- KBD.C (status)
47 -> KBD.C (output)
34 <- KBD.C (status)
f4 -> KBD.C (output)
15 <- KBD.C (status)
fa <- KBD.C (input)
fa <- KBD.C (interrupt, kbd, 1)
14 <- KBD.C (status)
15 <- KBD.C (status)
39 <- KBD.C (input)
39 <- KBD.C (interrupt, kbd, 1)
14 <- KBD.C (status)
15 <- KBD.C (status)
b9 <- KBD.C (input)
b9 <- KBD.C (interrupt, kbd, 1)
14 <- KBD.C (status)
35 <- KBD.C (status)
08 <- KBD.C (input)
08 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
02 <- KBD.C (input)
02 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
00 <- KBD.C (input)
00 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
08 <- KBD.C (input)
08 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
01 <- KBD.C (input)
01 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
00 <- KBD.C (input)
00 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
08 <- KBD.C (input)
08 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
02 <- KBD.C (input)
02 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
01 <- KBD.C (input)
01 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
08 <- KBD.C (input)
08 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
03 <- KBD.C (input)
03 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
00 <- KBD.C (input)
00 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
08 <- KBD.C (input)
08 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
05 <- KBD.C (input)
05 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
00 <- KBD.C (input)
00 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
08 <- KBD.C (input)
08 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
07 <- KBD.C (input)
07 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
01 <- KBD.C (input)
01 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
08 <- KBD.C (input)
08 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
08 <- KBD.C (input)
08 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
01 <- KBD.C (input)
01 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
08 <- KBD.C (input)
08 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
0a <- KBD.C (input)
0a <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
00 <- KBD.C (input)
00 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
08 <- KBD.C (input)
08 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
09 <- KBD.C (input)
09 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
01 <- KBD.C (input)
01 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
08 <- KBD.C (input)
08 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
0a <- KBD.C (input)
0a <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
00 <- KBD.C (input)
00 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
08 <- KBD.C (input)
08 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
09 <- KBD.C (input)
09 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
00 <- KBD.C (input)
00 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
08 <- KBD.C (input)
08 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
0a <- KBD.C (input)
0a <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
01 <- KBD.C (input)
01 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
08 <- KBD.C (input)
08 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
09 <- KBD.C (input)
09 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
00 <- KBD.C (input)
00 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
08 <- KBD.C (input)
08 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
05 <- KBD.C (input)
05 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
00 <- KBD.C (input)
00 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
08 <- KBD.C (input)
08 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
05 <- KBD.C (input)
05 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
00 <- KBD.C (input)
00 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
08 <- KBD.C (input)
08 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
04 <- KBD.C (input)
04 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
00 <- KBD.C (input)
00 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
08 <- KBD.C (input)
08 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
05 <- KBD.C (input)
05 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)
35 <- KBD.C (status)
00 <- KBD.C (input)
00 <- KBD.C (interrupt, aux, 12)
34 <- KBD.C (status)

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: input subsystem config ?
  2002-07-18 15:31                                 ` Vojtech Pavlik
  2002-07-18 16:02                                   ` Stelian Pop
@ 2002-07-19 14:36                                   ` Stelian Pop
  2002-07-19 19:32                                     ` Vojtech Pavlik
  1 sibling, 1 reply; 21+ messages in thread
From: Stelian Pop @ 2002-07-19 14:36 UTC (permalink / raw)
  To: Vojtech Pavlik; +Cc: Linux Kernel Mailing List

On Thu, Jul 18, 2002 at 05:31:32PM +0200, Vojtech Pavlik wrote:

> > > Ok, that's what I wanted to know - I was wondering whether the mouse
> > > would simply ignore all control commands. And it doesn't not. It needs
> > > the commands, 
[...]

Ok, I've finally found out what's happenning: in i8042_aux_write()
you restore the CTR value each time. For some obscure reasons, my
laptop's controller does not like this at all. Disabling this
section makes the mouse function perfectly.

Is this CTR restore command really needed ? If it is, we should
probably add an option like "i8042_noctrrestore=1" to the i8042
driver...

Or maybe you have a better idea...

Stelian.

===== drivers/input/serio/i8042.c 1.5 vs edited =====
--- 1.5/drivers/input/serio/i8042.c	Sat Jul 13 20:31:00 2002
+++ edited/drivers/input/serio/i8042.c	Fri Jul 19 15:36:09 2002
@@ -221,12 +221,16 @@
 
 	retval  = i8042_command(&c, I8042_CMD_AUX_SEND);
 
+#if 0
 /*
  * Here we restore the CTR value. I don't know why, but i8042's in half-AT
  * mode tend to trash their CTR when doing the AUX_SEND command.
+ *
+ * However, for some reasons this breaks (at least) my Sony VAIO C1VE
+ * aux interface.
  */
-
 	retval |= i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR);
+#endif
 
 /*
  * Make sure the interrupt happens and the character is received even
-- 
Stelian Pop <stelian.pop@fr.alcove.com>
Alcove - http://www.alcove.com

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: input subsystem config ?
  2002-07-19 14:36                                   ` Stelian Pop
@ 2002-07-19 19:32                                     ` Vojtech Pavlik
  0 siblings, 0 replies; 21+ messages in thread
From: Vojtech Pavlik @ 2002-07-19 19:32 UTC (permalink / raw)
  To: Stelian Pop, Vojtech Pavlik, Linux Kernel Mailing List

On Fri, Jul 19, 2002 at 04:36:02PM +0200, Stelian Pop wrote:
> On Thu, Jul 18, 2002 at 05:31:32PM +0200, Vojtech Pavlik wrote:
> 
> > > > Ok, that's what I wanted to know - I was wondering whether the mouse
> > > > would simply ignore all control commands. And it doesn't not. It needs
> > > > the commands, 
> [...]
> 
> Ok, I've finally found out what's happenning: in i8042_aux_write()
> you restore the CTR value each time. For some obscure reasons, my
> laptop's controller does not like this at all. Disabling this
> section makes the mouse function perfectly.
> 
> Is this CTR restore command really needed ? If it is, we should
> probably add an option like "i8042_noctrrestore=1" to the i8042
> driver...

Thanks a lot for finding this! I thnk we can remove it for now, or
actually add a reverse option to force the restore only if needed - most
machines don't need it.

I'm doing the change immediately.

> Or maybe you have a better idea...
> 
> Stelian.
> 
> ===== drivers/input/serio/i8042.c 1.5 vs edited =====
> --- 1.5/drivers/input/serio/i8042.c	Sat Jul 13 20:31:00 2002
> +++ edited/drivers/input/serio/i8042.c	Fri Jul 19 15:36:09 2002
> @@ -221,12 +221,16 @@
>  
>  	retval  = i8042_command(&c, I8042_CMD_AUX_SEND);
>  
> +#if 0
>  /*
>   * Here we restore the CTR value. I don't know why, but i8042's in half-AT
>   * mode tend to trash their CTR when doing the AUX_SEND command.
> + *
> + * However, for some reasons this breaks (at least) my Sony VAIO C1VE
> + * aux interface.
>   */
> -
>  	retval |= i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR);
> +#endif
>  
>  /*
>   * Make sure the interrupt happens and the character is received even
> -- 
> Stelian Pop <stelian.pop@fr.alcove.com>
> Alcove - http://www.alcove.com

-- 
Vojtech Pavlik
SuSE Labs

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2002-07-19 19:29 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-16 14:34 input subsystem config ? Stelian Pop
2002-07-17  9:56 ` Stelian Pop
2002-07-17 10:01   ` Vojtech Pavlik
2002-07-17 10:10     ` Stelian Pop
2002-07-17 12:08       ` Vojtech Pavlik
2002-07-17 13:24         ` Stelian Pop
2002-07-17 13:44           ` Vojtech Pavlik
2002-07-17 13:58             ` Stelian Pop
2002-07-17 14:29               ` Vojtech Pavlik
2002-07-17 14:55                 ` Stelian Pop
2002-07-17 15:22                   ` Vojtech Pavlik
2002-07-17 15:33                     ` Stelian Pop
2002-07-18 14:41                       ` Stelian Pop
2002-07-18 14:45                         ` Vojtech Pavlik
2002-07-18 14:48                           ` Stelian Pop
2002-07-18 15:15                             ` Vojtech Pavlik
2002-07-18 15:28                               ` Stelian Pop
2002-07-18 15:31                                 ` Vojtech Pavlik
2002-07-18 16:02                                   ` Stelian Pop
2002-07-19 14:36                                   ` Stelian Pop
2002-07-19 19:32                                     ` Vojtech Pavlik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox