summaryrefslogtreecommitdiffstats
path: root/sys/dev/kbd
Commit message (Collapse)AuthorAgeFilesLines
* #include fcntl.h not vnode.h. Check O_NONBLOCK not IO_NDELAY.phk2004-12-221-2/+2
|
* Add a new flag to the atkbd(4) driver to disable testing the keyboardjhb2004-12-152-1/+3
| | | | | | | | | | | port during the device probe as this can cause hangs on some machines, specifically Compaq R3000Z series amd64 laptops. The flag is bit 3, or 0x8. PR: amd64/67745 Reported by: Neil Winterbauer newntrbr at ucla dot edu, many others Tested by: ade, astrodog at gmail dot com, many others MFC after: 1 week
* Do the dreaded s/dev_t/struct cdev */phk2004-06-162-7/+7
| | | | Bump __FreeBSD_version accordingly.
* Remove atdevbase and replace it's remaining uses with direct references tojhb2004-06-101-0/+1
| | | | KERNBASE instead.
* style(9): return foo -> return (foo)des2004-04-021-95/+95
| | | | also fix a continuation indent I missed in the previous commit.
* Clean up whitespace, fix continuation indents, wrap some long lines.des2004-04-021-27/+27
|
* Device megapatch 4/6:phk2004-02-211-0/+2
| | | | | | | | Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
* Device megapatch 1/6:phk2004-02-211-2/+0
| | | | | | | Free approx 86 major numbers with a mostly automatically generated patch. A number of strategic drivers have been left behind by caution, and a few because they still (ab)use their major number.
* While USB keyboards attach as ukbd[0-9]+, the device node created bydes2004-01-271-1/+2
| | | | | | | | | | | kbd_attach() is called kbd[0-9]+, with a different unit number. This makes it impossible to write a devd rule which will automatically switch to a USB keyboard when one is attached, because there is no way to guess the correct device node to pass to kbdcontrol. Therefore, change kbd_attach() to create a device node using the keyboard device's real name (atkbd0, ukbd0...), and create the kbd[0-9]+ node as an alias for backward compatibility.
* - Implement selwakeuppri() which allows raising the priority of atanimura2003-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
* Assign keycodes for Power, Sleep and Wake keys.fjoe2003-10-071-0/+9
| | | | Submitted by: Eugene Grosbein <eugen@grosbein.pp.ru>
* Fix dev_t handling to avoid needless makedev() call.phk2003-09-272-12/+6
|
* Use __FBSDID().obrien2003-08-243-3/+9
| | | | Also some minor style cleanups.
* 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>
OpenPOWER on IntegriCloud