psmouse: fix mouse hotplugging
PATCH 1/1 psmouse: fix mouse hotplugging
Note to myself: make small patches not big confusing ones.
This patch fixes hotplugging of PS/2 devices on hardware which don't support hotplugging of PS/2 devices. In other words, most desktop machines. Applies to at least 2.6.5, 2.6.6, 2.6.6-rc2 and 2.6.6-rc2-mm1.
Kim
drivers/input/mouse/psmouse-base.c +1 -1
@@ -470,7 +470,7 @@* Then we reset and disable the mouse so that it doesn't generate events. */ -if (psmouse_command (psmouse,NULL ,PSMOUSE_CMD_RESET_DIS )) +if (psmouse_reset (psmouse))printk (KERN_WARNING "psmouse.c: Failed to reset mouse on %s\n" , psmouse->serio->phys);/*
Quoted 2 lines · Kim Holviala
This patch fixes hotplugging of PS/2 devices on hardware which don't support hotplugging of PS/2 devices. In other words, most desktop
machines.
I have seen "hoplugging of mice" fry PS/2 ports, and heard of motherboards killed that way.
Signature · 4 lines
Dr. Horst H. von Brand User #22616 counter.li.org Departamento de Informatica Fono: +56 32 654431 Universidad Tecnica Federico Santa Maria +56 32 654239 Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513
Quoted 6 lines · Horst von Brand
Quoted 2 lines
This patch fixes hotplugging of PS/2 devices on hardware which don't support hotplugging of PS/2 devices. In other words, most desktop
machines.
I have seen "hoplugging of mice" fry PS/2 ports, and heard of motherboards killed that way.
For older systems, a fuse would often blow on these ports, which
depending on the implementation would require a power cycle or a soldering iron. Then one of those PCxx specs from Microsoft required the PS/2 ports to support hot-plugging, so chances are it may pretty safe with recent equipment.
Signature · 3 lines
+ Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: [email protected], PGP key available +
Quoted 12 lines · Maciej W. Rozycki
Quoted 7 lines · Horst von Brand
Quoted 2 lines
This patch fixes hotplugging of PS/2 devices on hardware which don't support hotplugging of PS/2 devices. In other words, most desktop
machines.
I have seen "hoplugging of mice" fry PS/2 ports, and heard of motherboards killed that way.
Quoted 5 lines
For older systems, a fuse would often blow on these ports, which
depending on the implementation would require a power cycle or a soldering iron. Then one of those PCxx specs from Microsoft required the PS/2 ports to support hot-plugging, so chances are it may pretty safe with recent equipment.
Even for relatively newer kit, wierd stuff can happen.
I recall one keyboard/athlon 500 system that would reboot 10s after the keyboard was plugged in, about 1% of the time.
Probably a KBC code bug, but unfixable.
HvB> I have seen "hoplugging of mice" fry PS/2 ports, and heard of motherboards HvB> killed that way.
AFAIK, PS/2 ports are since 1998 specified to be able to handle hotplugging in the sense that they must not fry when devices are plugged at runtime (but I don't remeber about any need to be able to _use_ these hotplugged devices).
Signature · 1 line
Meelis Roos
Quoted 6 lines · Horst von Brand
Quoted 3 lines
This patch fixes hotplugging of PS/2 devices on hardware which don't support hotplugging of PS/2 devices. In other words, most desktop machines.
I have seen "hoplugging of mice" fry PS/2 ports, and heard of motherboards killed that way.
And I've heard people rm -rf'ing their root. Yet rm is still included.
Anyway, the patch should also fix rare cases of KVM weirdness and an even rarer cases of mouse not detected properly at boot.
Kim
Quoted 4 lines · Kim Holviala
Note to myself: make small patches not big confusing ones.
This patch fixes hotplugging of PS/2 devices on hardware which don't support hotplugging of PS/2 devices. In other words, most desktop machines.
Is this needed? I frequently "hotplug" my trackball when 2.6 is forgeting
about it. Replugin make it work again, spitting in logs:
Apr 18 20:04:35 mother input.agent[30260]: ... no modules for INPUT product Apr 18 20:04:35 mother input.agent[30241]: ... no modules for INPUT product Apr 18 20:04:35 mother input.agent[30266]: ... no modules for INPUT product 11/2/5/0 Apr 18 20:04:35 mother kernel: input: ImPS/2 Generic Wheel Mouse on isa0060/serio1 Apr 18 20:04:37 mother udev[30307]: removing device node '/udev/input/mouse0' Apr 18 20:04:37 mother udev[30309]: removing device node '/udev/input/event0' Apr 18 20:04:38 mother udev[30312]: configured rule in '/etc/udev/udev.rules' at line 76 applied, 'mouse0' becomes 'input/%k' Apr 18 20:04:38 mother udev[30312]: creating device node '/udev/input/mouse0' Apr 18 20:04:38 mother udev[30313]: configured rule in '/etc/udev/udev.rules' at line 77 applied, 'event0' becomes 'input/%k' Apr 18 20:04:38 mother udev[30313]: creating device node '/udev/input/event0'
Signature · 2 lines
Tomasz Torcz ,,(...) today's high-end is tomorrow's embedded processor.'' [email protected] -- Mitchell Blank on LKML
Quoted 6 lines · Tomasz Torcz
Quoted 3 lines
This patch fixes hotplugging of PS/2 devices on hardware which don't support hotplugging of PS/2 devices. In other words, most desktop machines.
Is this needed? I frequently "hotplug" my trackball when 2.6 is forgeting
about it. Replugin make it work again, spitting in logs:
It's mostly meant for cases where you hotplug some other mouse, not the same one.
Kim