Bug 28682
Summary: | input drivers support limited device numbers (EVDEV_MINORS is 32) | ||
---|---|---|---|
Product: | Drivers | Reporter: | Alexander Todorov (atodorov) |
Component: | Input Devices | Assignee: | drivers_input-devices |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | alan, atodorov, dmitry.torokhov, kay, nightguard2020 |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 3.5 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Alexander Todorov
2011-02-09 12:02:28 UTC
"If you want to increase number of EVDEV_MINORS you need to disable mousedev & joydev, get rid of this selector (and hardcode to always get evdev handler)." That's a joke, right? Minors are 20 bits wide since quite some years. Dmitry, let me know if there are any unsolved technical problems in porting the input layer's device handling to the year 2012. :) (In reply to comment #1) > Dmitry, let me know if there are any unsolved technical problems in porting > the input layer's device handling to the year 2012. :) Lack of patches from interested parties. I know only a bit about C, but I caught another implicit hardcoding in the code snippet shown. EVDEV_MINORS is Hardcoded =32. Devices are divided into 32 unit groups and routed via 5 bit ( ">>5") shift. (2^5 = 32) It seems clear raising the EVDEV_MINORS limit actually runs up against other X=32 based limits. Given only EVDEV_MINORS and the code shown, I'd test like this. Old Code EVDEV_MINORS = 32 drivers/input/inpit.c::input_open_file(): handler = input_table[iminor(inode) >> 5]; if (!handler || !(new_fops = fops_get(handler->fops))) { err = -ENODEV; goto out; } New version (very much a blind test hack) EVDEV_MINORS = 64 drivers/input/inpit.c::input_open_file(): handler = input_table[iminor(inode) >> 6]; if (!handler || !(new_fops = fops_get(handler->fops))) { err = -ENODEV; goto out; } I'd also explore where input_table[] was dimensioned. |