summaryrefslogtreecommitdiffstats
path: root/sys/dev/kbd
Commit message (Collapse)AuthorAgeFilesLines
* Fix for FAIL_IF_NO_KBD case as expected.simokawa2003-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'.
* Add support for the A4 Tech RFSW-35 mouse wheel. Probe is similar tomikeh2003-07-121-0/+1
| | | | | | 4D Plus. PR: 44333
* - Use the new resource_disabled() helper function to see if devices arejhb2003-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.
* AMD64 physical space is much larger than i386, de-i386 the bus_space andpeter2003-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/*)
* Update the hardcoded bus tags for early console support for amd64.peter2003-05-011-1/+1
|
* Fix some easy, global, lint warnings. In most cases, this meansmarkm2003-04-301-1/+1
| | | | | making some local variables static. In a couple of cases, this means removing an unused variable.
* Deprecate machine/limits.h in favor of new sys/limits.h.kan2003-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>
* Add a a sysctl, hw.kbd.keymap_restrict_change, which acts a bitdwmalone2003-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
* Gigacommit to improve device-driver source compatibility betweenphk2003-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)
* More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).des2003-03-021-3/+3
|
* Back out M_* changes, per decision of the TRB.imp2003-02-191-1/+1
| | | | Approved by: trb
* Spelling.charnier2003-02-051-1/+1
|
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-1/+1
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Include "opt_kbd.h" since certain structures size depend on the valuephk2002-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
* Replace various spelling with FALLTHROUGH which is lint()ablecharnier2002-08-251-2/+2
|
* de-count atkbdc. I have more extensive patches to make properly dynamic,peter2002-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).
* GC various bits and pieces of USERCONFIG from all over the place.phk2002-04-091-1/+1
|
* Fix typo: conole -> consoleasmodai2002-04-081-1/+1
| | | | | PR: 33965 Submitted by: Nicola Vitale <nivit@libero.it>
* Fix spelling and grammar bogons in a comment.murray2002-03-271-7/+7
| | | | | | PR: kern/30540 Submitted by: Tony Finch <dot@dotat.at> MFC after: 3 days
* Add the ia64 bus space tag for the IO ports (!).peter2002-03-191-0/+4
| | | | Add a #else and #error so that this doesn't go unnoticed again.
* Fixes to make select/poll mpsafe.alfred2002-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
* Refine ACPI/PnP BIOS probe/attach routines a bit.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.
* KSE Milestone 2julian2001-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
* Update the atkbdc, atkbd, and psm drivers to probe/attachyokota2001-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.
* Fix typo; the meaning of the 3rd parameter to genkbd_keyaction() isyokota2001-07-201-1/+1
| | | | | | | 'up' rather than 'down'. PR: 22466 MFC after: 10 days
* Return consistent key action codes at key press and releaseyokota2001-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
* With this commit, I hereby pronounce gensetdefs past its use-by date.peter2001-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
* Send the remains (such as I have located) of "block major numbers" tophk2001-03-261-1/+0
| | | | the bit-bucket.
* Update default keyboard (PREV, PASTE)ache2001-03-121-2/+2
|
* Free the kbd pointer when it isn't NULL, as opposed to when it is.dwmalone2001-01-221-1/+1
| | | | | | This was a typo in the M_ZERO patches. Submitted by: Mike Silbersack <silby@silby.com>
* Convert more malloc+bzero to malloc+M_ZERO.dwmalone2000-12-083-15/+10
| | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net>
* Remove unneeded #include <sys/proc.h> lines.phk2000-10-291-1/+0
|
* Remove unneeded #include <machine/clock.h>phk2000-10-152-2/+0
|
* Initiate deorbit burn sequence for <machine/console.h>.phk2000-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.
* Add the ability to define a "shutdown" and "shutdown and poweroff" keydwmalone2000-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
* * Completely rewrite the alpha busspace to hide the implementation fromdfr2000-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.
* Manipulate with AltGR Led (really CapsLock Led) only in K_XLATE mode, becauseache2000-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>
* Back out the previous change to the queue(3) interface.jake2000-05-262-3/+3
| | | | | | It was not discussed and should probably not happen. Requested by: msmith and others
* Change the way that the queue(3) structures are declared; don't assume thatjake2000-05-232-3/+3
| | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
* - Properly keep track of I/O port resources.yokota2000-03-194-94/+128
| | | | - Use bus_space_read/write() to access the ports.
* - Add Support for the following PS/2 mice: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).
* Changed key assign for PC-98.nyan2000-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)
* One more patch for the atkbd driver. It will make sure that theyokota2000-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
* - Be slightly more cautious and try to make more sure the keyboardyokota2000-02-111-4/+9
| | | | | | | input queue is emptied when initializing the keyboard controller. - Remove an unnecessary `if' statement. Approved by: jkh
* Use config's conditional compilation rather than using #ifdefs that makepeter2000-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.
* - Add some comment from bde on the keyboard interrupt.yokota2000-01-201-11/+19
| | | | - Fix obsolete comments.
* Rework shifta/ctla/alta key handling. It appears that there wasyokota2000-01-113-17/+19
| | | | | misunderstanding between the PR originator and me. I hope I got it right this time.
* Obtain the initial key repeat rate setting via BIOS in i386 ifyokota2000-01-101-0/+54
| | | | possible.
* Add some keyboard IDs.yokota2000-01-101-2/+9
|
* - Fixed warnings.nyan2000-01-041-132/+132
| | | | - Removed unnecessary include files.
OpenPOWER on IntegriCloud