Commit Graph

106 Commits

Author SHA1 Message Date
Dag-Erling Smørgrav
521f364b80 More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9). 2003-03-02 16:54:40 +00:00
Philippe Charnier
c0f44a5927 Spelling. 2003-02-05 14:03:55 +00:00
Marcel Moolenaar
19ad245042 YAM: This id is found in a Sony Vaio GRX-670. When will this end?
Submitted by: Chuck McCrobie <mccrobie2000@yahoo.com>
2003-01-22 22:02:09 +00:00
Jeffrey Hsu
033aebebc4 Add yet another Sony Vaio PS/2 mouse ID. This one is found on a VX88.
Submitted by:	marcel
2003-01-22 03:31:08 +00:00
Marcel Moolenaar
99fd68d987 Add yet another Sony Vaio PS/2 mouse ID. This one is found in a R505GL.
The ACPI data for the mouse includes the compatibility ID, but we
apparently don't make use of it.
2003-01-21 10:00:32 +00:00
Matthew N. Dodd
6dc61b5ae5 - GC a few more hand-rolled 'abs' macros.
- GC a few hand-rolled min()/max() macros while I'm here.
2003-01-15 02:15:57 +00:00
Poul-Henning Kamp
fb9da1ef43 Include "opt_kbd.h" since certain structures size depend on the value
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
2002-10-15 21:35:01 +00:00
Philippe Charnier
93b0017f88 Replace various spelling with FALLTHROUGH which is lint()able 2002-08-25 13:23:09 +00:00
Peter Wemm
2943ed8c5d de-count atkbdc. I have more extensive patches to make properly dynamic,
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).
2002-08-19 23:58:37 +00:00
Poul-Henning Kamp
2ce7d7a033 GC various bits and pieces of USERCONFIG from all over the place. 2002-04-09 11:18:46 +00:00
Jeroen Ruigrok van der Werven
2bb113d084 Fix typo: conole -> console
PR:		33965
Submitted by:	Nicola Vitale <nivit@libero.it>
2002-04-08 19:19:10 +00:00
Murray Stokely
93c30e2e4d Fix spelling and grammar bogons in a comment.
PR:		kern/30540
Submitted by:	Tony Finch <dot@dotat.at>
MFC after:	3 days
2002-03-27 13:16:11 +00:00
Alfred Perlstein
14e10f9952 Remove __P. 2002-03-20 05:14:42 +00:00
Peter Wemm
5f4a0f788b Add the ia64 bus space tag for the IO ports (!).
Add a #else and #error so that this doesn't go unnoticed again.
2002-03-19 10:53:33 +00:00
Alfred Perlstein
85f190e4d1 Fixes to make select/poll mpsafe.
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
2002-03-14 01:32:30 +00:00
Takanori Watanabe
03b8237df8 Add SONY VAIO psm controller ISA-PnP ID. 2002-03-10 12:22:17 +00:00
Sheldon Hearn
604fb1c032 Add another PS2 PNP id.
PR:		32973
Submitted by:	KT Sin <ktsin@acm.org>
2001-12-19 13:32:21 +00:00
Kazutaka YOKOTA
8166ba27bd Hack for the "out-of-sync" error.
- 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
2001-10-13 10:28:02 +00:00
Takanori Watanabe
c84f2b288e Add PnP ID 'IBM3781' for TP240 mouse. 2001-10-03 07:26:28 +00:00
Kazutaka YOKOTA
d4b248f23e Yet another turn of workaround for psm/ACPI/PnP BIOS
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.
2001-09-25 16:59:28 +00:00
Kazutaka YOKOTA
275658afcc Reinitialize the keyboard after the ACPI resume event.
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.)
2001-09-23 08:42:06 +00:00
Kazutaka YOKOTA
cd6cd68d18 Refine ACPI/PnP BIOS probe/attach routines a bit.
- 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.
2001-09-15 04:38:20 +00:00
Julian Elischer
b40ce4165d KSE Milestone 2
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
2001-09-12 08:38:13 +00:00
Kazutaka YOKOTA
ef92e4471a Update the atkbdc, atkbd, and psm drivers to probe/attach
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.
2001-09-06 12:09:26 +00:00
Mike Smith
5f063c7b09 Add ACPI attachments. 2001-08-30 09:17:03 +00:00
Kazutaka YOKOTA
764952572b Return consistent key action codes at key press and release
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
2001-07-20 13:05:57 +00:00
Kazutaka YOKOTA
6c726162da Add the device resume method to keyboard drivers.
MFC after:	4 weeks
2001-06-30 10:02:32 +00:00
Peter Wemm
2398f0cd1d Hints overhaul:
- 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.
2001-06-12 09:40:04 +00:00
Poul-Henning Kamp
f83880518b Send the remains (such as I have located) of "block major numbers" to
the bit-bucket.
2001-03-26 12:41:29 +00:00
David Malone
d2db050252 Free the kbd pointer when it isn't NULL, as opposed to when it is.
This was a typo in the M_ZERO patches.

Submitted by:	Mike Silbersack <silby@silby.com>
2001-01-22 22:54:02 +00:00
Garrett Wollman
0a2c3d48c6 select() DKI is now in <sys/selinfo.h>. 2001-01-09 04:33:49 +00:00
David Malone
7cc0979fd6 Convert more malloc+bzero to malloc+M_ZERO.
Submitted by:	josh@zipperup.org
Submitted by:	Robert Drehmel <robd@gmx.net>
2000-12-08 21:51:06 +00:00
Poul-Henning Kamp
959b7375ed Staticize some malloc M_ instances. 2000-12-08 20:09:00 +00:00
Kazutaka YOKOTA
872dfb2dd3 - Add a hack for "psmintr: out of sync.." This is NOT a fix,
but a hack! Add `flags 0x8000' to the psm driver to enable it.
  The psm driver will try to get out of out-of-sync situation
  by disabling the mouse and immediately enable it again.

If you are seeing this out-of-sync problem because of an
incompetent(?!) KVM switch, this hack will NOT be good
for you.  However, if you are occasionally seeing the
problem because of lost mouse interrupt, this might help.
2000-12-01 05:26:24 +00:00
Kazutaka YOKOTA
ed584487bd - Slightly rearrnage IntelliMouse Explorer and Logitech
MouseMan+ identification routines for efficiency.
  No functional change.
2000-12-01 05:24:30 +00:00
Poul-Henning Kamp
db7e3af111 Remove unneeded #include <machine/clock.h> 2000-10-15 14:19:01 +00:00
Peter Wemm
ada54f9e54 Untangle some resource matching loops that were getting on my nerves
and seemed to be getting cut/pasted to places they shouldn't be.
2000-10-15 08:50:45 +00:00
Poul-Henning Kamp
f6b5c74c35 Initiate deorbit burn sequence for <machine/mouse.h>.
Replace all in-tree uses with <sys/mouse.h> which repo-copied a few
moments ago from src/sys/i386/include/mouse.h by peter.
This is also the appropriate fix for exo-tree sources.

Put warnings in <machine/mouse.h> to discourage use.
November 15th 2000 the warnings will be converted to errors.
January 15th 2001 the <machine/mouse.h> files will be removed.
2000-10-09 08:08:36 +00:00
Poul-Henning Kamp
00d25f512c Initiate deorbit burn sequence for <machine/console.h>.
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.
2000-10-08 21:34:00 +00:00
John Baldwin
86ab18a705 Fix several 64-bit-ism warnings due to sizeof(int) != sizeof(void *) on
the alpha.
2000-09-22 08:40:05 +00:00
Doug Rabson
21c3015a24 * Completely rewrite the alpha busspace to hide the implementation from
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.
2000-08-28 21:48:13 +00:00
Kazutaka YOKOTA
01819900ae Add spltty()/splx() in the watchdog timer routine. 2000-08-24 08:49:44 +00:00
Kazutaka YOKOTA
fc581b6bf6 Fix GENERIC_MOUSE_ENTRY.
Submitted by: Graham Wheeler <gram@cequrux.com> and gibbs
2000-07-28 03:48:46 +00:00
Kazutaka YOKOTA
7ce6464adc This is yet another attempt to fix "psmintr out of sync.." problems.
- Properly protect the watchdog timer routine.
- Relocate the sync check statement so that we don't see too many
  error messages.
2000-07-22 04:08:12 +00:00
Andrey A. Chernov
2073104f87 Manipulate with AltGR Led (really CapsLock Led) only in K_XLATE mode, because
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>
2000-05-28 12:43:24 +00:00
Bruce Evans
3aae7b16d2 Fixed the type of some ivar access functions. Ivars have type uintptr_t,
not u_long.  On i386's with 64-bit longs, returning u_longs indirectly
in (more than) the space reserved for uintptr_t's tended to corrupt the
previous frame pointer in the stack frame, so it was not easy to debug.
The type mismatches are hidden by the bogus cast in DEVMETHOD().
2000-04-30 10:01:56 +00:00
Poul-Henning Kamp
3389ae9350 Remove ~25 unneeded #include <sys/conf.h>
Remove ~60 unneeded #include <sys/malloc.h>
2000-04-19 14:58:28 +00:00
Kazutaka YOKOTA
d0a99324a3 - Add temporary workaround to fool some "clever" KVM switch products
which think they know the IntelliMouse 4-byte packet and believe,
  wrongly, that any other protocols use 3-byte packets.
- Update a couple of comment lines for A4 Tech mice.
2000-04-02 08:28:21 +00:00
Kazutaka YOKOTA
ea20901db7 Missing pieces of the last commit ;-( 2000-03-19 04:37:18 +00:00
Kazutaka YOKOTA
db3e34cb71 - Properly keep track of I/O port resources.
- Use bus_space_read/write() to access the ports.
2000-03-19 03:25:13 +00:00