aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/atkbdc
Commit message (Collapse)AuthorAgeFilesLines
* Don't check for device_get_softc() returning NULL, it can't happen.Maxime Henrion2004-04-171-3/+0
| | | | Notes: svn path=/head/; revision=128353
* Put a bunch of output that us really only useful in a debugMark Murray2004-04-041-1/+13
| | | | | | | | | | | | | scenario into #ifdef DEBUG. This makes my cluster with Belkin KVM switch completely usable, even if the KVM switch and mouse get a bit confused sometimes. Without this, when the mouse gets confused, all sorts of crud gets spammed all over the screen. With this, the mouse may appear dead for a second or three, but it recovers silently. Notes: svn path=/head/; revision=127841
* Convert callers to the new bus_alloc_resource_any(9) API.Nate Lawson2004-03-175-32/+27
| | | | | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde Notes: svn path=/head/; revision=127135
* Device megapatch 4/6:Poul-Henning Kamp2004-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. Notes: svn path=/head/; revision=126080
* Device megapatch 1/6:Poul-Henning Kamp2004-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. Notes: svn path=/head/; revision=126076
* Significantly reduce the "jitter" that is typical for PS/2 miceAlfred Perlstein2003-12-111-110/+256
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when using a KVM. There is no actual solution possible, but this gets us pretty close. Typically when switching back to a FreeBSD box and moving the mouse wild data is produced, because the protocol's validation/checksum system is extremely weak it is impossible to determine that we're out of sync before dropping several bogus packets to user land. The actual solution that appears to offer the best clamping of jitter is to buffer the mouse packets if we've not seen mouse activity for more than .5 seconds. Then waiting to flush that data for 1/20th of a second. If within that 20th of a second we get any packets that do fail the weak test we drop the entire queue and back off accepting data from the mouse for 2 seconds and then repeat the whole deal. You can still get _some_ jitter, notably if you switch to the FreeBSD box, then move the mouse just enough to generate one or two packets. Those packets may be bogus, but may still pass the validity check. One way to finally kill the problem once and for all is to check the initial packets for "wild" values. Typically one sees packets in the +/-60 range during normal operation, however when bogus data is generated it's typically near the outer range of +/-120 or more, those packets would be a good candidate for dropping or clamping. I've been running with this for several weeks now and it has significantly helped me stay sane even with a piece of junk Belkin KVM causing wild jitter each and every time I switch. Lastly I'd like to note that my experience with Windows shows me that somehow the Microsoft PS/2 driver typically avoids this problem, but that may only be possible when running the mouse in a dumb-ed down PS/2 mode that Belkin recommends on their site. Notes: svn path=/head/; revision=123442
* - Implement selwakeuppri() which allows raising the priority of aSeigo Tanimura2003-11-091-1/+1
| | | | | | | | | | | | | | | | 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
* Use __FBSDID().David E. O'Brien2003-08-242-2/+6
| | | | | | | 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-122-3/+11
| | | | | | | | | 4D Plus. PR: 44333 Notes: svn path=/head/; revision=117478
* Reset the PSM aux device twice to help pierce through some KVM's toMike Heffner2003-07-071-0/+9
| | | | | | | | | get the correct data from the attached mouse. Multiple resets should be harmless, but just in case, the second one is non-fatal and is just ignored. Notes: svn path=/head/; revision=117302
* - Use the new resource_disabled() helper function to see if devices areJohn Baldwin2003-07-023-4/+3
| | | | | | | | | | | | | | | 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
* Add PnP PS/2 id for Dell Latitude X200.Mike Heffner2003-07-011-0/+1
| | | | | | | | PR: 48516 MFC after: 2 weeks Notes: svn path=/head/; revision=117117
* Use __FBSDID().David E. O'Brien2003-06-115-11/+15
| | | | Notes: svn path=/head/; revision=116181
* wrap macro in do {...} while(0)Poul-Henning Kamp2003-05-311-2/+2
| | | | Notes: svn path=/head/; revision=115569
* Remove extra ';'Poul-Henning Kamp2003-05-311-1/+1
| | | | | | | Found by: FlexeLint Notes: svn path=/head/; revision=115480
* 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-306-6/+6
| | | | | | | | 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-292-3/+2
| | | | | | | | | | 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
* Gigacommit to improve device-driver source compatibility betweenPoul-Henning Kamp2003-03-031-13/+7
| | | | | | | | | | | | | | | | 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
* Spelling.Philippe Charnier2003-02-051-1/+1
| | | | Notes: svn path=/head/; revision=110398
* YAM: This id is found in a Sony Vaio GRX-670. When will this end?Marcel Moolenaar2003-01-221-0/+1
| | | | | | | Submitted by: Chuck McCrobie <mccrobie2000@yahoo.com> Notes: svn path=/head/; revision=109710
* Add yet another Sony Vaio PS/2 mouse ID. This one is found on a VX88.Jeffrey Hsu2003-01-221-2/+3
| | | | | | | Submitted by: marcel Notes: svn path=/head/; revision=109679
* Add yet another Sony Vaio PS/2 mouse ID. This one is found in a R505GL.Marcel Moolenaar2003-01-211-0/+1
| | | | | | | | The ACPI data for the mouse includes the compatibility ID, but we apparently don't make use of it. Notes: svn path=/head/; revision=109626
* - GC a few more hand-rolled 'abs' macros.Matthew N. Dodd2003-01-151-16/+7
| | | | | | | - GC a few hand-rolled min()/max() macros while I'm here. Notes: svn path=/head/; revision=109269
* 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-252-5/+5
| | | | 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
* Remove __P.Alfred Perlstein2002-03-201-29/+29
| | | | Notes: svn path=/head/; revision=92756
* 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
* Add SONY VAIO psm controller ISA-PnP ID.Takanori Watanabe2002-03-101-0/+1
| | | | Notes: svn path=/head/; revision=92000
* Add another PS2 PNP id.Sheldon Hearn2001-12-191-0/+1
| | | | | | | | PR: 32973 Submitted by: KT Sin <ktsin@acm.org> Notes: svn path=/head/; revision=88188
* Hack for the "out-of-sync" error.Kazutaka YOKOTA2001-10-131-109/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Count the number of this error. - When the error is detected for the first time, the psm driver will throw few data bytes (up to entire packet size) and see if it can get back to sync. - If the error still persists, the psm driver disable/enable the mouse and see if it works. - If the error still persists and the count goes up to 20, the psm driver reset and reinitialize the mouse. The counter is reset to zero. - It also discards an incomplete data packet when the interval between two consequtive bytes are longer than pre-defined timeout (2 seconds). The last byte which arrived late will be regarded as the first byte of a new packet. This is louie's idea. You may see the following error logs during the above operations: "psmintr: delay too long; resetting byte count" "psmintr: out of sync (%04x != %04x)" "psmintr: discard a byte (%d)" "psmintr: re-enable the mouse" "psmintr: reset the mouse" MFC after: 1 month Notes: svn path=/head/; revision=84880
* Add PnP ID 'IBM3781' for TP240 mouse.Takanori Watanabe2001-10-031-0/+1
| | | | Notes: svn path=/head/; revision=84407
* Yet another turn of workaround for psm/ACPI/PnP BIOSKazutaka YOKOTA2001-09-253-40/+85
| | | | | | | | | | problems currently experienced in -CURRENT. This should fix the problem that the PS/2 mouse is detected twice if the acpi module is not loaded on some systems. Notes: svn path=/head/; revision=83931
* Reinitialize the keyboard after the ACPI resume event.Kazutaka YOKOTA2001-09-232-2/+20
| | | | | | | | | | | | I am not sure if this is absolutely necessary on all systems. Yet, there certainly are motherboards and notebook systems which require this, although there are other systems which just don't. I hope we shall know when to do this on which systems, as the development of our ACPI subsystem progresses... (I know we didn't need this for the APM resume.) Notes: svn path=/head/; revision=83855
* Refine ACPI/PnP BIOS probe/attach routines a bit.Kazutaka YOKOTA2001-09-154-17/+38
| | | | | | | | | | | | | | - 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-066-210/+446
| | | | | | | | | | | 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
* Add ACPI attachments.Mike Smith2001-08-302-0/+2
| | | | Notes: svn path=/head/; revision=82555
* Return consistent key action codes at key press and releaseKazutaka YOKOTA2001-07-203-1/+3
| | | | | | | | | | | | | 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
* Add the device resume method to keyboard drivers.Kazutaka YOKOTA2001-06-302-0/+28
| | | | | | | MFC after: 4 weeks Notes: svn path=/head/; revision=79022
* Hints overhaul:Peter Wemm2001-06-122-20/+16
| | | | | | | | | | | | - Replace some very poorly thought out API hacks that should have been fixed a long while ago. - Provide some much more flexible search functions (resource_find_*()) - Use strings for storage instead of an outgrowth of the rather inconvenient temporary ioconf table from config(). We already had a fallback to using strings before malloc/vm was running anyway. Notes: svn path=/head/; revision=78135