Right now I don't feel comfortable with large rewrites like this when the
PS/2 driver works for most people (I got burned by the previous problems).
As such, I'd be happier with a much more minimal patch that corrects the
problems you see.
For example, you disable the keyboard in order to be able to send multi-byte
sequences, but I'm not at all certain this works: the keyboard LED setting is
handled by bottom half handlers, and as such will happen regardless of any
keyboard interrupt activity (for example when XFree86 sets the led state at
startup or as a response to "xset" or keyboard action that happened earlier).
Now, a easier way to block any keyboard multi-byte sequences should be to
just do a
+ disable_bh(KEYBOARD_BH); /* no led activity */
.. send multi-byte mouse sequnce ..
+ enable_bh(KEYBOARD_BH); /* led activity on again.. */
Does that kind of locking suffice for you? (I also modified the keyboard
driver not to do the disable/enable kbd inside the interrupt handler)
Linus