summaryrefslogtreecommitdiffstats
path: root/sys/dev/atkbdc
Commit message (Collapse)AuthorAgeFilesLines
* Remove local hacks to set flags now that the device probe does this for us.njl2004-10-142-4/+0
| | | | | | | Tested on every device except sio_pci and the pc98 fd.c. Perhaps something similar should be done for the "disabled" hints also. MFC after: 2 weeks
* Introduce a tunable to disable support for Synaptics touchpads. A number ofphilip2004-09-291-1/+11
| | | | | | | | | | | people have reported problems (stickyness, aiming difficulty) which is proving difficult to fix, so this will default to disable until sometime after 5.3R. To enable Synaptics support, set the 'hw.psm.synaptics_support=1' tunable. MT5 candidate. Approved by: njl
* Improve sync recovery algorithm:gibbs2004-08-271-97/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Remove PSM_SYNCERR_THRESHOLD1. This value specified how many sync errors were required before the mouse is re-initialised. Re-initialisation is now done after (packetsize * 2) sync errors as things aren't likely to improve after that. o Reset lastinputerror when re-initialisation occurs. We don't want to continue to drop data after re-initialisation. o Count the number of failed packets independently of the syncerrors statistic. syncerrors is useful for recovering sync within a single packet. pkterrors allows us to detect when the mouse changes its packet mode due to some external event (e.g. KVM switch). o Reinitialize the mouse if we see more than psmpkterrthresh errors during the validation period. The validation period begins as soon as a sync error is detected and continues until psmerrsecs/msecs time has elapsed. The defaults for these two values force a reset if we see two packet errors in a 2 second period. This allows rapid detection of packet framing errors caused by the mouse changing packet modes. o Export psmpkterrthresh as a sysctl o Export psmloglevel as a sysctl. o Enable more debugging code to be enabled at runtime via psmloglevel. o Simplify verbose conditioned loging by using a VLOG macro. o Add several comments describing the sync recovery algorithm of this driver. Large Portions by: Brian Somers <brian@Awfulhak.org> Inspired and Frustrated by: Belkin KVMs Reviewed by: njl, philip
* Defer the capture of the "expected sync bits" until the first "normal"gibbs2004-08-171-20/+13
| | | | | | | | | | data packet is received from the mouse. In the case of many KVM's, this avoids a bug in their mouse emulation that sends back incorrect sync when you explicitly request a data packet from the mouse. Without this change, you must force the driver into stock PS/2 mode or be flooded with a never ending stream of "out of sync" messages on these KVMs. Approved by: re
* Don't initialize static variables to 0 (C should just take care of that).philip2004-08-161-2/+2
| | | | Spotted by: njl
* Update support for Synaptics Touchpads (Volume V)philip2004-08-161-5/+29
| | | | | | | o Add (long awaited) support for guest devices Submitted by: Arne Schwabe <arne@rfc2549.org> Approved by: njl (in a former revision)
* Assume a finger of regular width when no width value is reported byphilip2004-08-081-3/+10
| | | | | | | the touchpad (which happens when it has no extended capabilities). Spotted by: dhw Forgotten by: philip
* Update support for Synaptics Touchpads (Volume IV)philip2004-08-081-2/+2
| | | | | | | | | | | | o Change the motion calculation to result in a more reasonable speed of motion This should fix the 'aiming' problems people have reported. It also mitigates (but doesn't completely solve) the 'stalling' problems at very low speeds. Tested by: many subscribers to -current Approved by: njl
* Update support for Synaptics Touchpads (Volume III)philip2004-08-081-0/+26
| | | | | | | | | | o Catch 'taps' as button presses o One finger sends button1, two fingers send button3, three fingers send button2 (double-click) Tested by: many subscribers to -current Approved by: njl
* Update support for Synaptics Touchpads (Volume II)philip2004-08-081-5/+26
| | | | | | | | | | | | | | o Handle the 'up/down' buttons some touchpads have as a z-axis (scrollwheel) as recommended by the specs o Report the buttons as button4 and button5 instead of button2 and button4, button2 can be emulated by pressing button1 and button3 simultaneously. This allows one to use the two extra buttons for other purposes if one so desires. Tested by: many subscribers to -current Approved by: njl
* Update support for Synaptics Touchpads (Volume I)philip2004-08-081-53/+64
| | | | | | | | | | | | | | | o Clean up whitespace and comments in the enable_synaptics() probing function o Only use (and rely on) the extended capability bits when we are told they actually exist o Partly ignore the (possibly dated?) part of the specification about the mode byte so that we can support 'guest devices' too. Tested by: many subscribers to -current Approved by: njl
* Add support for the Synaptics Touchpad mouse driver. I reworked thenjl2004-07-301-1/+213
| | | | | | | | | submitted version with style cleanups and changes to comments. I also modified the ioctl interface. This version only has one ioctl (to get the Synaptics-specific config parameters) since this is the only information a user might want. Submitted by: Arne Schwabe <arne -at- rfc2549.org>
* Ignore more strange return values of the test_aux_port() function,mux2004-07-161-6/+10
| | | | | | | | | | because some notebooks (apparently Compaq, Toshiba and Acer ones) erroneously return 2 or 3 there. PR: kern/61482, kern/54188 Submitted by: Ulf Lilleengen <lulf@kerneled.org>, Victor Balada Diaz <victor@alf.dyndns.ws> MFC after: 3 days
* Do the dreaded s/dev_t/struct cdev */phk2004-06-161-7/+7
| | | | Bump __FreeBSD_version accordingly.
* Remove atdevbase and replace it's remaining uses with direct references tojhb2004-06-101-0/+1
| | | | KERNBASE instead.
* add missing #include <sys/module.h>phk2004-05-304-0/+4
|
* Don't check for device_get_softc() returning NULL, it can't happen.mux2004-04-171-3/+0
|
* Put a bunch of output that us really only useful in a debugmarkm2004-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.
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-175-32/+27
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* 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.
* Significantly reduce the "jitter" that is typical for PS/2 micealfred2003-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.
* - Implement selwakeuppri() which allows raising the priority of atanimura2003-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
* Assign keycodes for Power, Sleep and Wake keys.fjoe2003-10-071-0/+9
| | | | Submitted by: Eugene Grosbein <eugen@grosbein.pp.ru>
* Use __FBSDID().obrien2003-08-242-2/+6
| | | | 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-122-3/+11
| | | | | | 4D Plus. PR: 44333
* Reset the PSM aux device twice to help pierce through some KVM's tomikeh2003-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.
* - Use the new resource_disabled() helper function to see if devices arejhb2003-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.
* Add PnP PS/2 id for Dell Latitude X200.mikeh2003-07-011-0/+1
| | | | | PR: 48516 MFC after: 2 weeks
* Use __FBSDID().obrien2003-06-115-11/+15
|
* wrap macro in do {...} while(0)phk2003-05-311-2/+2
|
* Remove extra ';'phk2003-05-311-1/+1
| | | | Found by: FlexeLint
* 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-306-6/+6
| | | | | 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-292-3/+2
| | | | | | | Change all in-tree consumers to include <sys/limits.h> Discussed on: standards@ Partially submitted by: Craig Rodrigues <rodrigc@attbi.com>
* Gigacommit to improve device-driver source compatibility betweenphk2003-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)
* More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).des2003-03-021-3/+3
|
* Spelling.charnier2003-02-051-1/+1
|
* YAM: This id is found in a Sony Vaio GRX-670. When will this end?marcel2003-01-221-0/+1
| | | | Submitted by: Chuck McCrobie <mccrobie2000@yahoo.com>
* Add yet another Sony Vaio PS/2 mouse ID. This one is found on a VX88.hsu2003-01-221-2/+3
| | | | Submitted by: marcel
* Add yet another Sony Vaio PS/2 mouse ID. This one is found in a R505GL.marcel2003-01-211-0/+1
| | | | | The ACPI data for the mouse includes the compatibility ID, but we apparently don't make use of it.
* - GC a few more hand-rolled 'abs' macros.mdodd2003-01-151-16/+7
| | | | - GC a few hand-rolled min()/max() macros while I'm here.
* 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-252-5/+5
|
* 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
OpenPOWER on IntegriCloud