Re: [RFC/PATCH] Uncap max number of evdev devices [was: Re: need more events]
From: Dmitry Torokhov
Date: Mon Nov 27 2006 - 22:47:14 EST
On Monday 27 November 2006 13:56, Linas Vepstas wrote:
> On Fri, Nov 24, 2006 at 05:09:52PM -0800, juanslayton@xxxxxxxxxxxxxx wrote:
> >
> > The object is to poll 20 usb keyboards in an elementary school
> > classroom, each of which generates 2
> > events (one keyboard and one mouse). The stock kernel maxes out at event
> > 31, leaving me 4
> > keyboards short.
> > I thought to fix this by changing the definition of EVDEV_MINORS
> > (line 12, evdev.c) from 32 to 64. It almost worked. The extra
> > events showed up in /dev/input/* and /proc/bus/input/devices.
> > However, attempting to access the new events in the application
> > program only yields a segmentation fault. Obviously I've got to change
> > something else.
>
> The problem is in input_register_handler() in drivers/input/input.c
> which does things like
> if (input_table[handler->minor >> 5])
> and
> input_table[handler->minor >> 5] = handler;
>
> which implicitly makes 32 the max.
>
> The kernel path below removes this limitation. Does it fix your problem?
>
This makes /dev/input/js32-63 take over /dev/input/mouse0-31 which is
contrary to what Documentation/devices.txt says and therefore not a good
idea for the mainline.
I am planning to convert input core to cdevs and that table will go away
completely and then it can be discussed how to extend range of input
devices (probably by going beyond 256 minors?).
--
Dmitry
-
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/