From: jem@lk-hp-6.hut.fi (Johan Myreen)
Newsgroups: comp.os.linux
Subject: PS/2 mouse patch (Was: Re: (Q) Various Subjects)
Date: 12 Oct 92 18:38:22 GMT
Organization: Helsinki University of Technology, Finland

In article <rickm.921011224335@eng.auburn.edu> rickm@eng.auburn.edu (Rick Martindale) writes:

>  I am using a Packard Bell PS2 mouse.  On boot up it is not 
>detected.  Will the ps2mouse patch for 0.97.1 still fix this?
>If not ...?

I'm not sure which patch you are talking about (there have been a
few...), but here is a patch from Dean Troyer that should work. The
problem was with using the BIOS to do some initializations
at bootup, which didn't work on some machines.

--
Johan Myreen
jem@cs.hut.fi

----- Cut here ----

*** linux/kernel/chr_drv/psaux.c@	Sun Aug 30 09:00:44 1992
--- linux/kernel/chr_drv/psaux.c	Sat Oct  3 10:27:59 1992
***************
*** 6,11 ****
--- 6,15 ----
   * Supports pointing devices attached to a PS/2 type
   * Keyboard and Auxiliary Device Controller.
   *
+  * Modified by Dean Troyer (troyer@saifr00.cfsat.Honeywell.COM) 03Oct92
+  *   to perform (some of) the hardware initialization formerly done in
+  *   setup.S by the BIOS
+  *
   */
  
  #include <linux/timer.h>
***************
*** 89,94 ****
--- 93,102 ----
  	poll_status();
  	outb_p(0xa7,AUX_COMMAND);      	/* Disable Aux device */
  	poll_status();
+ 	outb_p(0xd4,AUX_COMMAND);
+ 	poll_status();
+ 	outb_p(0xf5,AUX_OUTPUT_PORT);	/* disable port */
+ 	poll_status();
  	outb_p(0x60,AUX_COMMAND);
  	poll_status();
  	outb_p(0x65,AUX_OUTPUT_PORT);
***************
*** 114,119 ****
--- 122,131 ----
  	queue->head = queue->tail = 0;  /* Flush input queue */
  	if (request_irq(AUX_IRQ, aux_interrupt))
  		return -EBUSY;
+ 	outb_p(0xd4,AUX_COMMAND);
+ 	poll_status();
+ 	outb_p(0xf4,AUX_OUTPUT_PORT);	/* enable port */
+ 	poll_status();
  	outb_p(0x60,AUX_COMMAND);	/* Write command */
  	poll_status();
  	outb_p(0x47,AUX_OUTPUT_PORT);	/* Enable AUX and keyb interrupts */
*** linux/boot/setup.S@	Thu Sep 17 10:58:50 1992
--- linux/boot/setup.S	Sat Oct  3 10:32:17 1992
***************
*** 11,16 ****
--- 11,19 ----
  ! system to read them from there before the area is overwritten
  ! for buffer-blocks.
  !
+ ! Move PS/2 aux init code to psaux.c
+ ! (troyer@saifr00.cfsat.Honeywell.COM) 03Oct92
+ !
  
  ! NOTE! These had better be the same as in bootsect.s!
  #include <linux/config.h>
***************
*** 134,162 ****
  	int	0x11		! int 0x11: equipment determination
  	test	al,#0x04	! check if pointing device installed
  	jz	no_psmouse
- 	mov	ax,#0xc201	! reset pointing device
- 	int	0x15
- 	jc	no_psmouse
- 	mov	bh,#0x03	! 3 bytes/packet
- 	mov	ax,#0xc205	! initialize pointing device
- 	int	0x15
- 	jc	no_psmouse
- 	mov	ax,#0xc203	! set resolution
- 	mov	bh,#0x03	! 8 counts/mm
- 	int	0x15
- 	jc	no_psmouse
- 	mov	ax,#0xc206	! set scaling
- 	mov	bh,0x02		! 2:1 scaling
- 	int	0x15
- 	jc	no_psmouse
- 	mov	ax,#0xc202	! set sample rate
- 	mov	bh,#0x05	! 100 reports per second
- 	int	0x15
- 	jc	no_psmouse
- 	mov	bh,#0x01
- 	mov	ax,#0xc200	! enable pointing device
- 	int	0x15
- 	jc	no_psmouse
  	mov	[0x1ff],#0xaa	! device present
  no_psmouse:
  
--- 137,142 ----
Newsgroups: comp.os.linux