* fix for broken pc_keyb.c (late 2.2.x all 2.4.x kernel)
@ 2001-10-27 15:09 Walter Harms
0 siblings, 0 replies; only message in thread
From: Walter Harms @ 2001-10-27 15:09 UTC (permalink / raw)
To: linux-kernel
hi list,
there is a logical problem with pc_keyb.c. if setting the leds does not work the keyboard will no longer exists.
attention:
pckbd_leds() is also know as kbd_leds() what is used quit often !
This is a quick fix ! (read: no real solution !)
some comments from my side:
1. the kbd_exists stuff is not realy documented. I should be removed or explaind properly.
2. the next better way is to check for the returncode from
send_data() and send kbd_exists accordingly.
3. kdb_rate works the same way but does not set kbd_exists
walter
*** pc_keyb.c Sat Oct 27 15:57:20 2001
--- pc_keyb.c.broken Sat Oct 27 15:46:45 2001
***************
*** 525,543 ****
return 0;
}
-
- /* someone added kbd_exists i dont know when or why */
- /* but there a few routines that ever check kdb_exists */
- /* if somebody understands it *please* document */
- /* The old code liked to shut down my keyboad */
- /* the routine is also known as kbd_leds() */
- /* walter.harms@informatik.uni-oldenburg.de */
-
void pckbd_leds(unsigned char leds)
{
if (kbd_exists && (!send_data(KBD_CMD_SET_LEDS) || !send_data(leds))) {
send_data(KBD_CMD_ENABLE); /* re-enable kbd if any errors */
! kbd_exists = 1;
}
}
--- 525,535 ----
return 0;
}
void pckbd_leds(unsigned char leds)
{
if (kbd_exists && (!send_data(KBD_CMD_SET_LEDS) || !send_data(leds))) {
send_data(KBD_CMD_ENABLE); /* re-enable kbd if any errors */
! kbd_exists = 0;
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-10-27 14:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-27 15:09 fix for broken pc_keyb.c (late 2.2.x all 2.4.x kernel) Walter Harms
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®