aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/kbdmux
Commit message (Collapse)AuthorAgeFilesLines
* This isn't functionally identical. In some cases a hint to disableEitan Adler2012-10-221-0/+2
| | | | | | | | | | | unit 0 would in fact disable all units. This reverts r241856 Approved by: cperciva (implicit) Notes: svn path=/head/; revision=241885
* Now that device disabling is generic, remove extraneous code from theEitan Adler2012-10-221-2/+0
| | | | | | | | | | | device drivers that used to provide this feature. Reviewed by: des Approved by: cperciva MFC after: 1 week Notes: svn path=/head/; revision=241856
* Restore binary compatibility for GIO_KEYMAP and PIO_KEYMAP.Ed Schouten2011-07-171-0/+1
| | | | | | | | | | | | Back in 2009 I changed the ABI of the GIO_KEYMAP and PIO_KEYMAP ioctls to support wide characters. I created a patch to add ABI compatibility for the old calls, but I didn't get any feedback to that. It seems now people are upgrading from 8 to 9 they experience this issue, so add it anyway. Notes: svn path=/head/; revision=224126
* Explicitly tell the compiler that we don't care about the return valueRui Paulo2010-10-131-4/+4
| | | | | | | of kbdd_ioctl(). Notes: svn path=/head/; revision=213770
* Use proper types in kbdmux_kbd_getc():Ed Schouten2009-06-081-2/+2
| | | | | | | | | | | - 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> Notes: svn path=/head/; revision=193752
* Move buffer management into kbd and kbdmux drivers.Ed Schouten2009-06-051-22/+42
| | | | | | | | | | | These two drivers seem to be the last consumers of clists. clists are quite overengineered for simple circular buffers, so I'm adding similar buffer management routines to the kbd and kbdmux drivers. The input buffer is now part of the softc structures, instead of having dynamically allocated cblocks. Notes: svn path=/head/; revision=193512
* Undo SVN rev 183283Maksim Yevmenkin2009-04-081-4/+4
| | | | | | | | | | | | | | | Do not use Giant for kbdmux(4) locking. This is wrong and apparently causing more problems than it solves. This will re-open the issue where interrupt handlers may race with kbdmux(4) in polling mode. Typical symptoms include (but not limited to) duplicated and/or missing characters when low level console functions (such as gets) are used while interrupts are enabled (for example geli password prompt, mountroot prompt etc.) MFC after: 3 days Notes: svn path=/head/; revision=190857
* Since r188030 the error value for attach is returned, this means if kbdmuxAndrew Thompson2009-02-131-7/+6
| | | | | | | | | fails to attach (possibly due to disable hints) then we get called back for unload. Correctly handle the case where the keyboard isnt found rather than calling panic. Notes: svn path=/head/; revision=188603
* Properly retun error core from kbdmux_modevent()Maksim Yevmenkin2009-02-021-1/+1
| | | | | | | | Reported by: Christoph Mallon < christoph -dot- mallon -at- gmx -dot- de > MFC after: 1 week Notes: svn path=/head/; revision=188030
* Use Giant for kbdmux(4) locking. This is to workaround the problemMaksim Yevmenkin2008-09-221-4/+4
| | | | | | | | | | | | where interrupt handlers may race with kbdmux(4) in polling mode. PR: kern/127446 Reported by: Eygene Ryabinkin rea-fbsd at codelabs dot ru Tested by: Eygene Ryabinkin rea-fbsd at codelabs dot ru MFC after: 1 week Notes: svn path=/head/; revision=183283
* Don't include <sys/tty.h> in non-TTY drivers.Ed Schouten2008-07-241-1/+1
| | | | | | | | | | | | | The kbd, kbdmux, ugen and uhid drivers included <sys/tty.h>, because they needed clists, which have been moved to <sys/clist.h> some time ago. In the MPSAFE TTY branch, <sys/tty.h> does not include <sys/clist.h>, which means we have to teach these drivers to include this header file directly. Approved by: philip (mentor, implicit) Notes: svn path=/head/; revision=180777
* Remove explicit calls to keyboard methods with their respective variantsWojciech A. Koszek2007-12-291-35/+14
| | | | | | | | | | | | | | | | | | implemented with macros. This patch improves code readability. Reasoning behind kbdd_* is a "keyboard discipline". List of macros is supposed to be complete--all methods of keyboard_switch should have their respective macros from now on. Functionally, this code should be no-op. My intention is to leave current behaviour of code as is. Glanced at by: rwatson Reviewed by: emax, marcel Approved by: cognet Notes: svn path=/head/; revision=174984
* Fix kbdmux(4) issue with backslash/underscore key not working onMaksim Yevmenkin2007-07-111-0/+3
| | | | | | | | | | | | Japanese 106/109 keyboard. PR: kern/112214, kern/99090 Submitted by: TOMITA Yoshinori, TAKAHASHI Yoshihiro Approved by: re (hrs) MFC after: 3 days Notes: svn path=/head/; revision=171373
* Fix our ioctl(2) implementation when the argument is "int". NewRuslan Ermilov2006-09-271-0/+29
| | | | | | | | | | | | | | | | ioctls passing integer arguments should use the _IOWINT() macro. This fixes a lot of ioctl's not working on sparc64, most notable being keyboard/syscons ioctls. Full ABI compatibility is provided, with the bonus of fixing the handling of old ioctls on sparc64. Reviewed by: bde (with contributions) Tested by: emax, marius MFC after: 1 week Notes: svn path=/head/; revision=162711
* Revert back to always using *(int *)arg for now. While thisRuslan Ermilov2006-09-201-8/+8
| | | | | | | | | | | | | is incorrect, and causes endianness bugs on 64-bit big-endian machines (sparc64), it's the best choice for now, as many of these IOCTLs are used inside the kernel, and bogusly pass an argument as "int *" which results in unaligned access panics on sparc64 when attempting to dereference them via *(intptr_t *). (Several of us are working on a real fix, which is uneasy.) Notes: svn path=/head/; revision=162461
* Make typecast expressions comply with style(9).Ruslan Ermilov2006-09-191-5/+5
| | | | Notes: svn path=/head/; revision=162441
* This time, really fix endian bugs accessing ioctl arguments thatRuslan Ermilov2006-09-191-8/+8
| | | | | | | | | | are passed by value. These are KDSKBMODE, KDSETLED, KDSKBSTATE, and KDSETRAD. Tested on: amd64, sparc64 (demo code) Notes: svn path=/head/; revision=162440
* Back out revision 1.8. The only thing it did was to break LEDs (andRuslan Ermilov2006-09-191-13/+13
| | | | | | | | | | | | some other less noticeable things) on little-endian 64-bit platforms such as amd64. PR: kern/101931 Discussed with: emax, marius MFC after: 1 day Notes: svn path=/head/; revision=162428
* Add extra code into kbdmux(4)s read_char() method toMaksim Yevmenkin2006-07-271-0/+21
| | | | | | | | | | | | poll (i.e. call read_char() method) slave keyboards. This workaround should fix problem with kbdmux(4) and atkbd(4) not working in ddb(4) and mid-boot. MFC after: 1 week Notes: svn path=/head/; revision=160768
* Fix endian bugs accessing ioctl arguments that are passed by value.Maksim Yevmenkin2006-03-031-13/+13
| | | | | | | | Pointed out by: marius MFC after: 1 day Notes: svn path=/head/; revision=156226
* Provide ability to disable kbdmux(4) with the hint.kbdmux.0.disabled="1" hint.Maksim Yevmenkin2006-03-011-0/+4
| | | | | | | | | | Document hint in the kbdmux(4) man page. Requested by: scottl MFC after: 1 day Notes: svn path=/head/; revision=156167
* Plug memory leakMaksim Yevmenkin2006-02-271-0/+4
| | | | | | | MFC after: 1 day Notes: svn path=/head/; revision=156086
* Put a comment, explaining why kbdmux(4) had to be fixed.Maksim Yevmenkin2006-02-251-3/+12
| | | | | | | | | | While I'm here fix a couple of whitespaces. Requested by: netchild MFC after: 1 day Notes: svn path=/head/; revision=156013
* Fix hard lockup caused by kbdmux(4) when kbdmux(4), PS/2 keyboardMaksim Yevmenkin2006-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | (atkbd(4)) and PS/2 mouse (psm(4)) are used together. Turns out that atkbd(4) check_char() method may return "true" while read_char() method returns NOKEY. When this happens kbdmux(4) was simply stuck in the dead loop. Avoid dead loop in kbdmux(4) by breaking out of the loop if read_char() method returns NOKEY. It almost seems like a bug in atkkbd(4), atkbd_check_char() calls kbdc_data_ready(), and, the later will return "true" if there are pending data in either kbd or aux queue. However, because both aux and kbd are on the same controller, I'm not sure if this is a bug or feature. Tested by: markus MFC after: 1 day Notes: svn path=/head/; revision=156010
* Spotted a call to a cdev-related function not wrappedYaroslav Tykhiy2005-10-181-0/+2
| | | | | | | | | | in "#ifdef KBD_INSTALL_CDEV". Noticed by: glebius Uncovered by: recent change to modules' Makefiles Notes: svn path=/head/; revision=151440
* kbdmux(4) keyboard multiplexer integrationMaksim Yevmenkin2005-07-141-19/+24
| | | | | | | | | | | | | | | | | | | | | | | o Slightly change KBADDKBD and KBRELKBD ioctl() interface. Instead of passing keyboard index pass keyboard_info_t structure with populated 'kb_unit' and 'kb_name' fields. Keyboard index is not very user-friendly and is not very easy to obtain. Keyboard driver name and unit, on the other hand, is much more user friendly and known almost all the time; o Move definition of keyboard_info_t structure up; o Teach kbdcontrol(1) how to attach/detach keyboards to/from the keyboard multiplexor; o Update kbdcontrol(1) man page and document new functionality. To attach/detach keyboard to/from keyboard multiplexor one needs to use keyboard device name (i.e. ukbd0). MFC after: 1 week Notes: svn path=/head/; revision=148017
* kbdmux(4) keyboard multiplexer integrationMaksim Yevmenkin2005-07-141-0/+1314
o Add sys/dev/kbdmux/kbdmux.c to the source tree o Add sys/modules/kbdmux/Makefile to the source tree These are not yet connected to the build. Man page and other changes to follow. MFC after: 1 week Notes: svn path=/head/; revision=147999