summaryrefslogtreecommitdiffstats
path: root/sys/isa
Commit message (Collapse)AuthorAgeFilesLines
* Reduce diffs to work in progress before checking in serious changes.philip2005-01-031-19/+20
| | | | | | | | | | | | | | | | o Move the sysctls under debug.psm.* and hw.psm.* making them a bit clearer and more consistent with other drivers. o Remove the debug.psm_soft_timeout sysctl. It was introduced many moons ago in r1.64 but never referenced anywhere. o Introduce hw.psm.tap_threshold and hw.psm.tap_timeout to control the behaviour of taps on touchpads. People might like to fiddle with these if tapping seems to slow or too fast for them. o Add debug.psm.loglevel as a tunable so that verbosity can be set easily at boot-time (to watch probes and such) without having to compile a kernel with options PSM_DEBUG=N.
* Formatting nitsimp2004-12-271-6/+6
|
* Get rid of #ifdef for legacy system. Move that into the MD code.imp2004-12-242-6/+7
| | | | Export minimal symbols to allow this to happen.
* A few style(9) changes before more extensive changes:imp2004-12-242-74/+65
| | | | | | | o u_intXX_t -> uintXX_t o use 8 character tabs o proper wrapping o return (value);
* Make the other pnp messages more explicit as well...imp2004-12-241-1/+1
|
* Note when we're done probing PNP. There's been several reports over theimp2004-12-241-0/+2
| | | | | years of hangs that turned out to be in the PNP code. Add an explicit end marker so such hangs are more apparent.
* Various style(9) items before of some more extensive work:imp2004-12-242-67/+64
| | | | | | | | o return (value); o u_intXX_t -> uintXX_t o break lines o consistantly use 8 space tab stops o minor grammar nits in a few printfs
* GC #if 0'd code. It can go away now...imp2004-12-242-99/+0
|
* PNP BIOS devices are fundamentally different than ISA PNP devices.imp2004-12-071-8/+9
| | | | | | | These devices should be probed first because they are at fixed locations and cannot be turned off. ISA PNP devices, on the other hand, can be turned off and often can be flexible in the resources they use. Probe them last, as always.
* Stop printing the VGA registers during verbose boot, in order to notphk2004-11-031-1/+1
| | | | | needlessly overflow the msgbuffer. Can be reenabled if somebody ever takes an interest in syscons again.
* Remove local hacks to set flags now that the device probe does this for us.njl2004-10-142-6/+1
| | | | | | | 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
* Converge towards i386. I originally resisted creating <machine/pc/bios.h>peter2004-09-241-8/+7
| | | | | | | | | | | | because it was mostly irrelevant - except for the silly BIOS_PADDRTOVADDR etc macros. Along the way of working around this, I missed a few things. * Make syscons properly inherit the bios capslock/shiftlock/etc state like i386 does. Note that we cannot inherit the bios key repeat rate because that requires a bios call (which is impossible for us). * Give syscons the ability to beep on amd64. Oops. While here, make bios.c compile and add it to files.amd64.
* Add new a function isa_dma_init() which returns an errno when it failsphk2004-09-151-1/+7
| | | | | | | | | and which takes a M_WAITOK/M_NOWAIT flag argument. Add compatibility isa_dmainit() macro which whines loudly if isa_dma_init() fails. Problem uncovered by: tegge
* 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
* Partially revert previous commit. Calling getit() unconditionally fixedmarcel2004-07-111-11/+22
| | | | | | | | | | | | | | a problem that could also be fixed differently without reverting previous attempts to fix DELAY while the debugger is active (rev 1.204). The bug was that the i8254 implements a countdown timer, while for (k)db_active a countup timer was implemented. This resulted in premature termination and consequently the breakage of DELAY. The fix (relative to rev 1.211) is to implement a countdown timer for the kdb_active case. As such the ability to step clock initialization is preserved and DELAY does what is expected of it. Blushed: bde :-) Submitted by: bde
* Call getit() unconditionally and only grab clock_lock when themarcel2004-07-101-20/+13
| | | | | | debugger is not active. The fixes breakages of DELAY() when running in the debugger, because not calling getit() when the debugger is active yields a DELAY that doesn't.
* These option roms are defined in the ISA standard, and in the ISAimp2004-07-051-2/+2
| | | | hole, so call them ISA Options rom(s).
* Do the dreaded s/dev_t/struct cdev */phk2004-06-162-13/+13
| | | | 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-303-0/+3
|
* Add some missing <sys/module.h> includes which are masked by thephk2004-05-301-0/+1
| | | | one on death-row in <sys/kernel.h>
* Move fdc from isa/fd.c to dev/fdc/fdc.c. The old files wereimp2004-05-172-2793/+0
| | | | | | | | repocopied. Soon there will be additional bus attachments and specialization for isa, acpi and pccard (and maybe pc98's cbus). This was approved by nate, joerg and myself. bde dissented on the new location, but appeared to be OK after some discussion.
* Trim unused includes.jhb2004-05-111-1/+0
|
* - The i8254 uses IRQ 0, not IRQ 8. Correct i8254_intsrc to reference thejhb2004-04-271-4/+6
| | | | | | | | correct interrupt source. - Cache a pointer to the i8254_intsrc's pending method to avoid several pointer indirections in i8254_get_timecount(). Reported by: bde
* Fixed breakage of the formatting operation in rev.1.266. The wrongbde2004-04-251-2/+9
| | | | | | clause of an if-else statement was removed. Reviewed by: no response from maintainer in 12 days
* Don't check for device_get_softc() returning NULL, it can't happen.mux2004-04-171-3/+0
|
* Remove advertising clause from University of California Regent'simp2004-04-075-20/+0
| | | | | | | license, per letter dated July 22, 1999 and email from Peter Wemm, Alan Cox and Robert Watson. Approved by: core, peter, alc, rwatson
* 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-176-45/+39
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Remove unused FDNUMTOUNIT() macrophk2004-02-291-2/+0
|
* Make mode setting with fdcontrol(8) stick.phk2004-02-251-182/+61
| | | | Recognize when configured for "auto".
* Device megapatch 4/6:phk2004-02-213-1/+6
| | | | | | | | 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-212-4/+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.
* Workaround some ACPI BIOSen which break the IO port into multiplenjl2004-02-151-1/+35
| | | | | | | | | | | | | resources. (Note that the correct range is 0x3f7,0x3f0-0x3f5.) Such devices will be detected as follows: fdc0: <Enhanced floppy controller (i82077, NE72065 or clone)> port 0x3f7,0x3f4-0x3f5,0x3f2-0x3f3,0x3f0-0x3f1 irq 6 drq 2 on acpi0 To do this, we find the minimum and maximum start addresses for the resources and use them as the base for the IO and control ports. Help from: jhb
* 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.
* Don't disable the TSC with statclock_disable.phk2003-11-131-9/+9
|
* - 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
* New APIC support code:jhb2003-11-031-182/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The apic interrupt entry points have been rewritten so that each entry point can serve 32 different vectors. When the entry is executed, it uses one of the 32-bit ISR registers to determine which vector in its assigned range was triggered. Thus, the apic code can support 159 different interrupt vectors with only 5 entry points. - We now always to disable the local APIC to work around an errata in certain PPros and then re-enable it again if we decide to use the APICs to route interrupts. - We no longer map IO APICs or local APICs using special page table entries. Instead, we just use pmap_mapdev(). We also no longer export the virtual address of the local APIC as a global symbol to the rest of the system, but only in local_apic.c. To aid this, the APIC ID of each CPU is exported as a per-CPU variable. - Interrupt sources are provided for each intpin on each IO APIC. Currently, each source is given a unique interrupt vector meaning that PCI interrupts are not shared on most machines with an I/O APIC. That mapping for interrupt sources to interrupt vectors is up to the APIC enumerator driver however. - We no longer probe to see if we need to use mixed mode to route IRQ 0, instead we always use mixed mode to route IRQ 0 for now. This can be disabled via the 'NO_MIXED_MODE' kernel option. - The npx(4) driver now always probes to see if a built-in FPU is present since this test can now be performed with the new APIC code. However, an SMP kernel will panic if there is more than one CPU and a built-in FPU is not found. - PCI interrupts are now properly routed when using APICs to route interrupts, so remove the hack to psuedo-route interrupts when the intpin register was read. - The apic.h header was moved to apicreg.h and a new apicvar.h header that declares the APIs used by the new APIC code was added.
* Fix a panic that occurs when resuming. For some reason, sc->cur_scp isnjl2003-10-291-0/+4
| | | | | | NULL. Submitted by: Andrew Thompson <andy@fud.org.nz>
OpenPOWER on IntegriCloud