Re: 2.6 input drivers FAQ

From: Vojtech Pavlik
Date: Mon Feb 02 2004 - 04:36:52 EST


On Sun, Feb 01, 2004 at 04:14:52PM +0100, Andries Brouwer wrote:

> > One more question: Will kbdrate work properly (use ioctls) when compiled
> > on a 2.6 kernels?
>
> kbdrate first tries the KDKBDREP ioctl, then the KIOCSRATE ioctl,
> and if both fail it will try to write to /dev/port.

Could you disable accessing /dev/port if running on a 2.6 kernel?

If the controller is in MUX mode it can disturb it rather badly. It's
wrong anyway, because if the user has an USB keyboard, and in the case
of a legacyless system it'll even try to access nonexisting hardware.

The problem is that when you're in X, and root, the ioctls will fail,
but /dev/port will still work, and cause trouble.

I'd even vote in favor of ditching the /dev/port code completely,
because all reasonable kernels support the ioctls, but that's your call.

----

Btw, what would you think about having the setkeycodes and kbdrate (and
possibly some other tools, too) take an optional argument of
/dev/input/event#, and then use the EVIOCSKEYCODE ioctl and EV_REP write
to set the scancodes and repeat on that single device? It'd be very
useful if one has more than one keyboard in the system.

--
Vojtech Pavlik
SuSE Labs, SuSE CR
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/