aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/kbd
Commit message (Collapse)AuthorAgeFilesLines
...
* - Implement selwakeuppri() which allows raising the priority of aSeigo Tanimura2003-11-091-2/+2
| | | | | | | | | | | | | | | | thread being waken up. The thread waken up can run at a priority as high as after tsleep(). - Replace selwakeup()s with selwakeuppri()s and pass appropriate priorities. - Add cv_broadcastpri() which raises the priority of the broadcast threads. Used by selwakeuppri() if collision occurs. Not objected in: -arch, -current Notes: svn path=/head/; revision=122352
* Assign keycodes for Power, Sleep and Wake keys.Max Khon2003-10-071-0/+9
| | | | | | | Submitted by: Eugene Grosbein <eugen@grosbein.pp.ru> Notes: svn path=/head/; revision=120875
* Fix dev_t handling to avoid needless makedev() call.Poul-Henning Kamp2003-09-272-12/+6
| | | | Notes: svn path=/head/; revision=120502
* Use __FBSDID().David E. O'Brien2003-08-243-3/+9
| | | | | | | Also some minor style cleanups. Notes: svn path=/head/; revision=119418
* Fix for FAIL_IF_NO_KBD case as expected.Hidetoshi Shimokawa2003-07-131-1/+3
| | | | | | | | | | | Even if we have no AT keyboard, an AT keyboard is registered because it's probed with KB_CONF_PROBE_ONLY flag set during console initialization. Unregister the keyboard if it doesn't present while second probe. This should fix USB keyboard only case without 'kbdcontrol -k /dev/kbd1'. Notes: svn path=/head/; revision=117513
* Add support for the A4 Tech RFSW-35 mouse wheel. Probe is similar toMike Heffner2003-07-121-0/+1
| | | | | | | | | 4D Plus. PR: 44333 Notes: svn path=/head/; revision=117478
* - Use the new resource_disabled() helper function to see if devices areJohn Baldwin2003-07-021-2/+1
| | | | | | | | | | | | | | | disabled. - Change the apm driver to match the acpi driver's behavior by checking to see if the device is disabled in the identify routine instead of in the probe routine. This way if the device is disabled it is never created. Note that a few places (ips(4), Alpha SMP) used "disable" instead of "disabled" for their hint names, and these hints must be changed to "disabled". If this is a big problem, resource_disabled() can always be changed to honor both names. Notes: svn path=/head/; revision=117167
* AMD64 physical space is much larger than i386, de-i386 the bus_space andPeter Wemm2003-05-121-1/+3
| | | | | | | | | | | bus_dma MD code for AMD64. (And a trivial ifdef update in dev/kbd because of this). More updates are needed here to take advantage of the 64 bit instructions. Approved by: re (blanket amd64/*) Notes: svn path=/head/; revision=114930
* Update the hardcoded bus tags for early console support for amd64.Peter Wemm2003-05-011-1/+1
| | | | Notes: svn path=/head/; revision=114382
* Fix some easy, global, lint warnings. In most cases, this meansMark Murray2003-04-301-1/+1
| | | | | | | | making some local variables static. In a couple of cases, this means removing an unused variable. Notes: svn path=/head/; revision=114293
* Deprecate machine/limits.h in favor of new sys/limits.h.Alexander Kabaev2003-04-291-2/+1
| | | | | | | | | | Change all in-tree consumers to include <sys/limits.h> Discussed on: standards@ Partially submitted by: Craig Rodrigues <rodrigc@attbi.com> Notes: svn path=/head/; revision=114216
* Add a a sysctl, hw.kbd.keymap_restrict_change, which acts a bitDavid Malone2003-03-091-0/+144
| | | | | | | | | | | | | | | | | | | | | | | | like secure level but which restricts changes to the keymap. Its values impose the following restrictions: 0: No restriction - this is the default. 1: Only root can change restricted keys (like boot, panic, ...) 2: Only root can change restricted keys and regular keys. Other users still can change accents and function keys. 3: Only root can change restricted keys, regular keys and accents. 4: Only root can change any of the keymap (restricted keys, regular keys, accents and function keys). Unfortunately, the keyboard's accent map is cleared when a new keymap is loaded, which makes the distinction between level 3 and level 4 less useful. The MAC guys might like to make this a policy? No objections from: -audit about 6 moths ago Notes: svn path=/head/; revision=112050
* Gigacommit to improve device-driver source compatibility betweenPoul-Henning Kamp2003-03-031-13/+8
| | | | | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl) Notes: svn path=/head/; revision=111815
* More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).Dag-Erling Smørgrav2003-03-021-3/+3
| | | | Notes: svn path=/head/; revision=111748
* Back out M_* changes, per decision of the TRB.Warner Losh2003-02-191-1/+1
| | | | | | | Approved by: trb Notes: svn path=/head/; revision=111119
* Spelling.Philippe Charnier2003-02-051-1/+1
| | | | Notes: svn path=/head/; revision=110398
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein2003-01-211-1/+1
| | | | | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
* Include "opt_kbd.h" since certain structures size depend on the valuePoul-Henning Kamp2002-10-151-0/+2
| | | | | | | | | | | | | | | | | of KBDIO_DEBUG which may be defined in the kernel config (as it is in NOTES). This kind of bug is a _really_ horribly thing as we end up with one bit of code thinking a particular structure is 136 bytes and another that it is only 112 bytes. Ideally all places would remember to #include the right "opt_foo.h" file, but I think in practice file containing the variable sized struct should #include it explicitly as a precaution. Detected by: FlexeLint Notes: svn path=/head/; revision=105181
* Replace various spelling with FALLTHROUGH which is lint()ablePhilippe Charnier2002-08-251-2/+2
| | | | Notes: svn path=/head/; revision=102412
* de-count atkbdc. I have more extensive patches to make properly dynamic,Peter Wemm2002-08-191-2/+1
| | | | | | | | | but since pc hardware only allows one AT-style keyboard controller, this doesn't seem particularly urgent. (I do not know what the old sunriver remote keyboard/mouse/vga cards do, that might be an exception). Notes: svn path=/head/; revision=102149
* GC various bits and pieces of USERCONFIG from all over the place.Poul-Henning Kamp2002-04-091-1/+1
| | | | Notes: svn path=/head/; revision=94275
* Fix typo: conole -> consoleJeroen Ruigrok van der Werven2002-04-081-1/+1
| | | | | | | | PR: 33965 Submitted by: Nicola Vitale <nivit@libero.it> Notes: svn path=/head/; revision=94228
* Fix spelling and grammar bogons in a comment.Murray Stokely2002-03-271-7/+7
| | | | | | | | | PR: kern/30540 Submitted by: Tony Finch <dot@dotat.at> MFC after: 3 days Notes: svn path=/head/; revision=93279
* Add the ia64 bus space tag for the IO ports (!).Peter Wemm2002-03-191-0/+4
| | | | | | | Add a #else and #error so that this doesn't go unnoticed again. Notes: svn path=/head/; revision=92661
* Fixes to make select/poll mpsafe.Alfred Perlstein2002-03-141-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: selwakeup required calling pfind which would cause lock order reversals with the allproc_lock and the per-process filedesc lock. Solution: Instead of recording the pid of the select()'ing process into the selinfo structure, actually record a pointer to the thread. To avoid dereferencing a bad address all the selinfo structures that are in use by a thread are kept in a list hung off the thread (protected by sellock). When a selwakeup occurs the selinfo is removed from that threads list, it is also removed on the way out of select or poll where the thread will traverse its list removing all the selinfos from its own list. Problem: Previously the PROC_LOCK was used to provide the mutual exclusion needed to ensure proper locking, this couldn't work because there was a single condvar used for select and poll and condvars can only be used with a single mutex. Solution: Introduce a global mutex 'sellock' which is used to provide mutual exclusion when recording events to wait on as well as performing notification when an event occurs. Interesting note: schedlock is required to manipulate the per-thread TDF_SELECT flag, however if given its own field it would not need schedlock, also because TDF_SELECT is only manipulated under sellock one doesn't actually use schedlock for syncronization, only to protect against corruption. Proc locks are no longer used in select/poll. Portions contributed by: davidc Notes: svn path=/head/; revision=92252
* Refine ACPI/PnP BIOS probe/attach routines a bit.Kazutaka YOKOTA2001-09-151-2/+0
| | | | | | | | | | | | | | - Add workaround for the problematic PnP BIOS which does not assign irq resource for the PS/2 mouse device node; if there is no irq assigned for the PS/2 mouse node, refer to device.hints for an irq number. If we still don't find an irq number in the hints database, use a hard-coded value. - Delete unused ivars. - Bit of clean up in probe/attach. - Add PnP ID for the PS/2 mouse port on some IBM ThinkPad models. Notes: svn path=/head/; revision=83492
* KSE Milestone 2Julian Elischer2001-09-121-5/+5
| | | | | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha Notes: svn path=/head/; revision=83366
* Update the atkbdc, atkbd, and psm drivers to probe/attachKazutaka YOKOTA2001-09-061-0/+3
| | | | | | | | | | | more cleanly and consistently in all APCI, PnP BIOS, and "hint" cases. NOTE: this doesn't necessarily solve the problem that the PS/2 mouse is not detected after the recent ACPI update. Notes: svn path=/head/; revision=83147
* Fix typo; the meaning of the 3rd parameter to genkbd_keyaction() isKazutaka YOKOTA2001-07-201-1/+1
| | | | | | | | | | 'up' rather than 'down'. PR: 22466 MFC after: 10 days Notes: svn path=/head/; revision=80045
* Return consistent key action codes at key press and releaseKazutaka YOKOTA2001-07-203-93/+103
| | | | | | | | | | | | | events. Otherwise you would see unexpected results if shift or locking keys are defined to give different actions depending on other shift/locking keys' state. Please keep the ukbd module and the kernel in sync, otherwise the USB keyboard won't work after this change. MFC after: 10 days Notes: svn path=/head/; revision=80040
* With this commit, I hereby pronounce gensetdefs past its use-by date.Peter Wemm2001-06-132-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the a.out emulation of 'struct linker_set' with something a little more flexible. <sys/linker_set.h> now provides macros for accessing elements and completely hides the implementation. The linker_set.h macros have been on the back burner in various forms since 1998 and has ideas and code from Mike Smith (SET_FOREACH()), John Polstra (ELF clue) and myself (cleaned up API and the conversion of the rest of the kernel to use it). The macros declare a strongly typed set. They return elements with the type that you declare the set with, rather than a generic void *. For ELF, we use the magic ld symbols (__start_<setname> and __stop_<setname>). Thanks to Richard Henderson <rth@redhat.com> for the trick about how to force ld to provide them for kld's. For a.out, we use the old linker_set struct. NOTE: the item lists are no longer null terminated. This is why the code impact is high in certain areas. The runtime linker has a new method to find the linker set boundaries depending on which backend format is in use. linker sets are still module/kld unfriendly and should never be used for anything that may be modular one day. Reviewed by: eivind Notes: svn path=/head/; revision=78161
* Send the remains (such as I have located) of "block major numbers" toPoul-Henning Kamp2001-03-261-1/+0
| | | | | | | the bit-bucket. Notes: svn path=/head/; revision=74810
* Update default keyboard (PREV, PASTE)Andrey A. Chernov2001-03-121-2/+2
| | | | Notes: svn path=/head/; revision=74123
* Free the kbd pointer when it isn't NULL, as opposed to when it is.David Malone2001-01-221-1/+1
| | | | | | | | | This was a typo in the M_ZERO patches. Submitted by: Mike Silbersack <silby@silby.com> Notes: svn path=/head/; revision=71394
* Convert more malloc+bzero to malloc+M_ZERO.David Malone2000-12-083-15/+10
| | | | | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Notes: svn path=/head/; revision=69781
* Remove unneeded #include <sys/proc.h> lines.Poul-Henning Kamp2000-10-291-1/+0
| | | | Notes: svn path=/head/; revision=67882
* Remove unneeded #include <machine/clock.h>Poul-Henning Kamp2000-10-152-2/+0
| | | | Notes: svn path=/head/; revision=67164
* Initiate deorbit burn sequence for <machine/console.h>.Poul-Henning Kamp2000-10-083-3/+3
| | | | | | | | | | | | Replace all in-tree uses with necessary subset of <sys/{fb,kb,cons}io.h>. This is also the appropriate fix for exo-tree sources. Put warnings in <machine/console.h> to discourage use. November 15th 2000 the warnings will be converted to errors. January 15th 2001 the <machine/console.h> files will be removed. Notes: svn path=/head/; revision=66834
* Add the ability to define a "shutdown" and "shutdown and poweroff" keyDavid Malone2000-09-111-0/+1
| | | | | | | | | | | to syscons. I have a man page to follow describing the format of the kbdmap file. PR: 19273 Reviewed by: sheldonh Notes: svn path=/head/; revision=65759
* * Completely rewrite the alpha busspace to hide the implementation fromDoug Rabson2000-08-281-1/+1
| | | | | | | | | | | | | | | the drivers. * Remove legacy inx/outx support from chipset and replace with macros which call busspace. * Rework pci config accesses to route through the pcib device instead of calling a MD function directly. With these changes it is possible to cleanly support machines which have more than one independantly numbered PCI busses. As a bonus, the new busspace implementation should be measurably faster than the old one. Notes: svn path=/head/; revision=65176
* Manipulate with AltGR Led (really CapsLock Led) only in K_XLATE mode, becauseAndrey A. Chernov2000-05-281-1/+2
| | | | | | | | | | | | all other modes not set ALKED flag and it means that CapsLock always turned off for them. Real bug example is X11 which never turn on CapsLock with Russian keyboard. PR: 18651 Submitted by: "Mike E. Matsnev" <mike@po.cs.msu.su> Notes: svn path=/head/; revision=61004
* Back out the previous change to the queue(3) interface.Jake Burkholder2000-05-262-3/+3
| | | | | | | | | It was not discussed and should probably not happen. Requested by: msmith and others Notes: svn path=/head/; revision=60938
* Change the way that the queue(3) structures are declared; don't assume thatJake Burkholder2000-05-232-3/+3
| | | | | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd Notes: svn path=/head/; revision=60833
* - Properly keep track of I/O port resources.Kazutaka YOKOTA2000-03-194-94/+128
| | | | | | | - Use bus_space_read/write() to access the ports. Notes: svn path=/head/; revision=58271
* - Add Support for the following PS/2 mice:Kazutaka YOKOTA2000-03-181-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Microsoft IntelliMouse Explorer: 2 buttons on top, 2 side buttons and a wheel which also acts as the middle button. The mouse is recognized as "IntelliMouse Explorer". - Genius NetScroll Optical: 2 buttons on top, 2 side buttons and a wheel which also acts as the middle button. The mouse is recognized as "NetMouse/NetScroll Optical". - MouseSystems SmartScroll Mouse (OEM from Genius?): 3 buttons on top, 1 side button and a wheel. The mouse is recognized as Genius "NetScroll". - IBM ScrollPoint: 2 buttons on top and a stick between the buttons. The stick can perform "horizontal scroll" in W*ndows environment. The horizontal movement of the stick is detected. It is currently mapped to the Z axis movement in the same way as the first wheel. The mouse is recognized as "MouseMan+", as it is considered to be a variation of MouseMan. - A4 Tech 4D and 4D+ mice. These mice have two wheels! The movement of the second wheel is reported as the Z axis movement in the same way as the first wheel. These mice are recognized as "4D Mouse" and "4D+ Mouse". - Tweak IntelliMouse support code a bit so that less-than-compatible wheel mice can work properly with the psm driver. - Add driver configuration flags which correspond to the kernel options PSM_HOOKRESUME and PSM_RESETAFTERSUSPEND, so that we don't need to recompile the kernel when we need these functions. - Properly keep track of the irq resource. - Add a watchdog timer in case interrupts are lost (experimental). - Add `detach' function (experimental). Notes: svn path=/head/; revision=58230
* Changed key assign for PC-98.Yoshihiro Takahashi2000-03-161-5/+5
| | | | | | | | | | | | | | | | shift+TAB : BackTab HELP : End STOP : ScrollLock shift+STOP : ScreenSaver GRPH +STOP : Suspend(susp) COPY : NextScreen(nscr) ctrl +COPY : Debug NFER : Meta Submitted by: chi@bd.mbn.or.jp (Chiharu Shibata) Notes: svn path=/head/; revision=58144
* One more patch for the atkbd driver. It will make sure that theKazutaka YOKOTA2000-03-111-0/+12
| | | | | | | | | | | | | | | | | keyboard port and interrupt is enabled and the driver is attached even when the keyboard itself is not present when the system is booting. (This has been the behavior through out 2.X and 3.X, but is somehow broken in 4.0.) # I certainly don't recommend people to `hot-plug' the AT keyboard, # because the interface isn't designed for hot-plugging and such act # will often break the keyboard controller. But, so many people want to # do that anyway... Approved by: jkh Notes: svn path=/head/; revision=57902
* - Be slightly more cautious and try to make more sure the keyboardKazutaka YOKOTA2000-02-111-4/+9
| | | | | | | | | | input queue is emptied when initializing the keyboard controller. - Remove an unnecessary `if' statement. Approved by: jkh Notes: svn path=/head/; revision=57131
* Use config's conditional compilation rather than using #ifdefs that makePeter Wemm2000-01-293-11/+1
| | | | | | | | modular compilation harder. I'm doing this because people seem to like cut/pasting examples of bad practices in existing code. Notes: svn path=/head/; revision=56836
* - Add some comment from bde on the keyboard interrupt.Kazutaka YOKOTA2000-01-201-11/+19
| | | | | | | - Fix obsolete comments. Notes: svn path=/head/; revision=56334