From: Geert U. <ge...@li...> - 2002-03-26 10:42:54
|
On Tue, 26 Mar 2002, Reinhard Nissl wrote: > Reinhard Nissl wrote: > > I'm confused now, after doing some tests. > > > > The kbdrate binary from the distribution works with 2.2.10 und crashes with > > 2.4.18 while accessing /dev/ports. > > I've investigated this further with strace. kbdrate does an ioctl() call. In > 2.2.10, the call returns 0 and kbdrate exits. In 2.4.18, the call returns > EINVAL and kbdrate tries to set the rate via /dev/ports, with fails on APUS. > > Looking at drivers/char/vt.c, I found that the ioctl() handler for KDKBDREP > calls kbd_rate(). kbd_rate is a function pointer which initially points to > _kbd_rate() and this is an empty implementation which simply returns EINVAL. > > Digging around further, I found a function amiga_kbdrate(), which has the same > declaration as _kbd_rate(). There is also a function pointer mach_kbdrate that > is similar to kbd_rate, and amiga_kbdrate gets assigned to it in > arch/ppc/amiga/config.c. But I didn't find any location, that calls > mach_kbdrate(). > > To make kbdrate work, I assume kbd_rate should be assigned the value of > mach_kbdrate. (Where would an appropriate locaten be for this assignment?) > > A different solution would be, to drop mach_kbdrate and substitute it with > kbd_rate. This would then be similar to kd_mksound. > > kd_mksound is also a function pointer, that is assigned a dummy implementation > in drivers/char/vt.c. In arch/ppc/amiga/config.c, kd_mksound is overwritten > with amiga_mksound. > > I would like to substitute mach_kbdrate with kdb_rate for all the archs that > use it. What are your comments about doing so? I think the best solution is to kill mach_kbdrate and initialize _kbd_rate to amiga_kbdrate in amiga_keyb_init(), cfr. pc_keyb.c. The same is true for atari_kbdrate, bvme6000_kbdrate, hp300_kbdrate, mvme147_kbdrate, mvme16x_kbdrate, and sun3x_kbdrate. And dn_dummy_kbdrate() can die as well. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@li... In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds |