MFC r339823:evdev: Use console lock as evdev lock for all supported keyboard drivers.Now evdev part of keyboard drivers does not take any locks if correspondinginput/eventN device node is not op
MFC r339823:evdev: Use console lock as evdev lock for all supported keyboard drivers.Now evdev part of keyboard drivers does not take any locks if correspondinginput/eventN device node is not opened by userland consumers.Do not assert console lock inside evdev to handle the cases when keyboarddriver is called from some special single-threaded context like shutdownthread.MFC r339824:evdev: disable evdev if it is invoked from KDB or panic contextThis allow to prevent deadlock on entering KDB if one of evdev locks isalready taken by userspace process.Also this change discards all but LED console events produced by KDB asunrelated to userspace.
show more ...
evdev: Remove evdev.ko linkage dependency on kbd driverMove evdev_ev_kbd_event() helper from evdev to kbd.c as otherwise evdevunconditionally requires all keyboard and console stuff to be compiled
evdev: Remove evdev.ko linkage dependency on kbd driverMove evdev_ev_kbd_event() helper from evdev to kbd.c as otherwise evdevunconditionally requires all keyboard and console stuff to be compiledinto the kernel. This dependency happens as evdev_ev_kbd_event() helperreferences kbdsw global variable defined in kbd.c through use ofkbdd_ioctl() macro.While here make all keyboard drivers respect evdev_rcpt_mask while settingtypematic rate and LEDs with evdev interface.Requested by: Milan Obuch <[email protected]>Reviewed by: hselasky, gonzoDifferential Revision: https://reviews.freebsd.org/D16614
Move most of the contents of opt_compat.h to opt_global.h.opt_compat.h is mentioned in nearly 180 files. In-progress networkdriver compabibility improvements may add over 100 more so this isclose
Move most of the contents of opt_compat.h to opt_global.h.opt_compat.h is mentioned in nearly 180 files. In-progress networkdriver compabibility improvements may add over 100 more so this iscloser to "just about everywhere" than "only some files" per theguidance in sys/conf/options.Keep COMPAT_LINUX32 in opt_compat.h as it is confined to a subset ofsys/compat/linux/*.c. A fake _COMPAT_LINUX option ensure opt_compat.his created on all architectures.Move COMPAT_LINUXKPI to opt_dontuse.h as it is only used to control theset of compiled files.Reviewed by: kib, cem, jhb, jtlSponsored by: DARPA, AFRLDifferential Revision: https://reviews.freebsd.org/D14941
sys/dev: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using misidentified many licenses so this was mostly a manual - error
sys/dev: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using misidentified many licenses so this was mostly a manual - errorprone - task.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier for automated tools to detect and summarize well knownopensource licenses. We are gradually adopting the specification, notingthat the tags are considered only advisory and do not, in any way,superceed or replace the license texts.
[evdev] Add evdev support to kbdmux(4) driverTo enable event sourcing from kbdmux(4) kern.evdev.rcpt_mask valueshould have bit 1 set (this is default)Submitted by: Vladimir Kondratiev <wulf@cicg
[evdev] Add evdev support to kbdmux(4) driverTo enable event sourcing from kbdmux(4) kern.evdev.rcpt_mask valueshould have bit 1 set (this is default)Submitted by: Vladimir Kondratiev <[email protected]>MFC after: 1 weekDifferential Revision: https://reviews.freebsd.org/D8437
Fix keyboard polling "on/off" to support recursion. vt depends onthis, and sc will soon depend on it again.The on/off request is passed without modification to lower layers,so the bug was smalle
Fix keyboard polling "on/off" to support recursion. vt depends onthis, and sc will soon depend on it again.The on/off request is passed without modification to lower layers,so the bug was smaller in this layer than in in lower layers (thesequence on;on;off left polling off when it should be on, but thesequence on;on;off;on;off... doesn't allow the interrupt handlerto eat the input after an "off" that should't turn off polled mode,provided lower layers don't have the bug, since this layer is virtual.The bug was small in lower layers too. Normally everything is Giantlocked for keyboards, and this locks out the interrupt handler inon;on;off;on;off... sequences. However, PR 211884 says that fixingthis bug in ukbd in r303765 apparently causes the eating-by-interruptbehaviour that the fix is to prevent.Discussed with: emax
Add option to specify built-in keymap for kbdmuxPR: 153459Submitted by: [email protected]
Revert r281889:The change would appease the static analyzers but it is pretty much ano-op. I need to trust static analyzers much less, especially for thekernel.Requested by: jkim
Plug memory leaks in kbdmux(4) (take 2)This is a fix to the previous attempt in r281889, which some (most?)keyboards.Discussed with: emaste, jkimFound by: clang static analyzerCID: 1007072C
Plug memory leaks in kbdmux(4) (take 2)This is a fix to the previous attempt in r281889, which some (most?)keyboards.Discussed with: emaste, jkimFound by: clang static analyzerCID: 1007072CID: 1007073CID: 1007074
Revert r281889, it broke keyboard input
Plug memory leaks in kbdmux(4)Al kudos here for the Clang static analyzer which, unlike Coverity,failed to flag a false positive.Found by: clang static analyzerCID: 1007072CID: 1007073CID:
Plug memory leaks in kbdmux(4)Al kudos here for the Clang static analyzer which, unlike Coverity,failed to flag a false positive.Found by: clang static analyzerCID: 1007072CID: 1007073CID: 1007074MFC after: 1 week
This isn't functionally identical. In some cases a hint to disableunit 0 would in fact disable all units.This reverts r241856Approved by: cperciva (implicit)
Now that device disabling is generic, remove extraneous code from thedevice drivers that used to provide this feature.Reviewed by: desApproved by: cpercivaMFC after: 1 week
Restore binary compatibility for GIO_KEYMAP and PIO_KEYMAP.Back in 2009 I changed the ABI of the GIO_KEYMAP and PIO_KEYMAP ioctlsto support wide characters. I created a patch to add ABI compatibil
Restore binary compatibility for GIO_KEYMAP and PIO_KEYMAP.Back in 2009 I changed the ABI of the GIO_KEYMAP and PIO_KEYMAP ioctlsto support wide characters. I created a patch to add ABI compatibilityfor the old calls, but I didn't get any feedback to that.It seems now people are upgrading from 8 to 9 they experience thisissue, so add it anyway.
Explicitly tell the compiler that we don't care about the return valueof kbdd_ioctl().
Use proper types in kbdmux_kbd_getc():- The return value should be a signed integer, because -1 means failure.- The c variable should be unsigned, to force it to be zero-extended when returned.
Use proper types in kbdmux_kbd_getc():- The return value should be a signed integer, because -1 means failure.- The c variable should be unsigned, to force it to be zero-extended when returned.Reported by: Andreas Tobler <andreast-list fgznet ch>
Move buffer management into kbd and kbdmux drivers.These two drivers seem to be the last consumers of clists. clists arequite overengineered for simple circular buffers, so I'm adding similarbuff
Move buffer management into kbd and kbdmux drivers.These two drivers seem to be the last consumers of clists. clists arequite overengineered for simple circular buffers, so I'm adding similarbuffer management routines to the kbd and kbdmux drivers. The inputbuffer is now part of the softc structures, instead of havingdynamically allocated cblocks.
Undo SVN rev 183283Do not use Giant for kbdmux(4) locking. This is wrong and apparentlycausing more problems than it solves. This will re-open the issuewhere interrupt handlers may race with kbdm
Undo SVN rev 183283Do not use Giant for kbdmux(4) locking. This is wrong and apparentlycausing more problems than it solves. This will re-open the issuewhere interrupt handlers may race with kbdmux(4) in polling mode.Typical symptoms include (but not limited to) duplicated and/ormissing characters when low level console functions (such as gets)are used while interrupts are enabled (for example geli passwordprompt, mountroot prompt etc.)MFC after: 3 days
Since r188030 the error value for attach is returned, this means if kbdmuxfails to attach (possibly due to disable hints) then we get called back forunload. Correctly handle the case where the keyb
Since r188030 the error value for attach is returned, this means if kbdmuxfails to attach (possibly due to disable hints) then we get called back forunload. Correctly handle the case where the keyboard isnt found rather thancalling panic.
Properly retun error core from kbdmux_modevent()Reported by: Christoph Mallon < christoph -dot- mallon -at- gmx -dot- de >MFC after: 1 week
Use Giant for kbdmux(4) locking. This is to workaround the problemwhere interrupt handlers may race with kbdmux(4) in polling mode.PR: kern/127446Reported by: Eygene Ryabinkin rea-fbsd at codela
Use Giant for kbdmux(4) locking. This is to workaround the problemwhere interrupt handlers may race with kbdmux(4) in polling mode.PR: kern/127446Reported by: Eygene Ryabinkin rea-fbsd at codelabs dot ruTested by: Eygene Ryabinkin rea-fbsd at codelabs dot ruMFC after: 1 week
Don't include <sys/tty.h> in non-TTY drivers.The kbd, kbdmux, ugen and uhid drivers included <sys/tty.h>, becausethey needed clists, which have been moved to <sys/clist.h> some timeago. In the MP
Don't include <sys/tty.h> in non-TTY drivers.The kbd, kbdmux, ugen and uhid drivers included <sys/tty.h>, becausethey needed clists, which have been moved to <sys/clist.h> some timeago. In the MPSAFE TTY branch, <sys/tty.h> does not include<sys/clist.h>, which means we have to teach these drivers to includethis header file directly.Approved by: philip (mentor, implicit)
Remove explicit calls to keyboard methods with their respective variantsimplemented with macros. This patch improves code readability. Reasoningbehind kbdd_* is a "keyboard discipline".List of ma
Remove explicit calls to keyboard methods with their respective variantsimplemented with macros. This patch improves code readability. Reasoningbehind kbdd_* is a "keyboard discipline".List of macros is supposed to be complete--all methods of keyboard_switchshould have their respective macros from now on.Functionally, this code should be no-op. My intention is to leave currentbehaviour of code as is.Glanced at by: rwatsonReviewed by: emax, marcelApproved by: cognet
Fix kbdmux(4) issue with backslash/underscore key not working onJapanese 106/109 keyboard.PR: kern/112214, kern/99090Submitted by: TOMITA Yoshinori, TAKAHASHI YoshihiroApproved by: re (hrs)MFC
Fix kbdmux(4) issue with backslash/underscore key not working onJapanese 106/109 keyboard.PR: kern/112214, kern/99090Submitted by: TOMITA Yoshinori, TAKAHASHI YoshihiroApproved by: re (hrs)MFC after: 3 days
Fix our ioctl(2) implementation when the argument is "int". Newioctls passing integer arguments should use the _IOWINT() macro.This fixes a lot of ioctl's not working on sparc64, most notablebein
Fix our ioctl(2) implementation when the argument is "int". Newioctls passing integer arguments should use the _IOWINT() macro.This fixes a lot of ioctl's not working on sparc64, most notablebeing keyboard/syscons ioctls.Full ABI compatibility is provided, with the bonus of fixing thehandling of old ioctls on sparc64.Reviewed by: bde (with contributions)Tested by: emax, mariusMFC after: 1 week
12