Commit Graph

2657 Commits

Author SHA1 Message Date
Archie Cobbs 2b81bbcbef Eliminate compiler warning. 1998-11-21 01:57:48 +00:00
Archie Cobbs 3a8dbd82b3 Eliminate some ompiler warnings. 1998-11-21 01:54:50 +00:00
Kazutaka YOKOTA 0e06fe21c6 - Added some configuration flags as workaround for not-so-compatible
keyboard/mouse/display switch products (console switches).  Some
  products claim they emulate the PS/2 mouse when the host computer
  talks to the mouse while the mouse is actually routed to another
  host.

	flags 0x200	Do not try to identify the mouse model. All
			mice will be recognized as "generic PS/2".
	      0x400	Do not reset the mouse.  Some switches' response
			to the reset command is too slow and the psm
			will timeout.
	      0x1000	Relax error checking when probing the mouse
			port.

- Added another flag for pad devices.

	flags 0x800	Assume the pad behaves like ALPS GlidePoint
			when the user `taps' the surface of the pad;
			it will be reported as the fourth button.
1998-11-20 11:46:43 +00:00
KATO Takenori 8ea9416c8c Fix ROOL UP/DOWN keys of PC-98. 1998-11-18 08:33:58 +00:00
Eivind Eklund 340fe9ae67 Make it possible to adjust the IDE probe delay from kernel config files. 1998-11-15 20:08:50 +00:00
Eivind Eklund 34e7656caa Depend on __FreeBSD_version instead of __FreeBSD__ 1998-11-15 19:30:48 +00:00
Bruce Evans 4cfe0f4600 Fixed the bug that caused negative busycounts in devstat. The
devstart_start_transaction() call is misplaced - it is after the
wdustart() call that queues the transaction on the controller queue.
Normally this doesn't matter because we're running at splbio() so
nothing will look at the controller queue.  However, obsolescent
code for syncing labels sometimes slept after the transaction was
started, so the transaction sometimes completed before it was
[recorded as] started.  This code was misplaced even for syncing
labels.  Move it to the right place.  It should go away, but
something may depend on its side effects.
1998-11-15 13:54:31 +00:00
Luigi Rizzo a6a30776d3 Add a missing newline
Submitted by:	Roger Hardiman
1998-11-14 13:07:59 +00:00
Luigi Rizzo ac1e654ef7 Add entry for AOpen AW37 1998-11-10 10:44:56 +00:00
Justin T. Gibbs 3c1cabf7a2 Fix probes when a port address is specified. 1998-11-10 06:44:54 +00:00
Doug Rabson 7095ee912b * Fix a couple of places in the device pager where an address was
truncated to 32 bits.
* Change the calling convention of the device mmap entry point to
  pass a vm_offset_t instead of an int for the offset allowing
  devices with a larger memory map than (1<<32) to be supported
  on the alpha (/dev/mem is one such).

These changes are required to allow the X server to mmap the various
I/O regions used for device port and memory access on the alpha.
1998-11-08 12:39:07 +00:00
Nicolas Souchu d3cf287966 iicbus probe and attach deferred until root_bus_configure() call. 1998-11-04 22:09:17 +00:00
Luigi Rizzo 16c775657c Remove an error message from sb interrupt driver -- it
does not apply to all situations.
1998-11-04 09:13:20 +00:00
Kazutaka YOKOTA 58541533dd Don't update the screen while the cursor shape is being changed
by the user-land program.
PR: i386/8344
1998-11-03 02:37:46 +00:00
David E. O'Brien 20ae30c22c spell check 1998-11-02 09:39:54 +00:00
Peter Wemm e6b148712b Fixup prototypes so that this beastie compiles. 1998-10-31 14:23:09 +00:00
Nicolas Souchu af5487872e pcf.c: timeout management added
ppc.c: nsc code improved. Actually, a complete rewrite.
1998-10-31 11:37:09 +00:00
Luigi Rizzo 2a62931083 Fix a typo, and remove verbose error reporting when in
promisc mode (they are annoying in normal mode
as well so i am really tempted to remove them unconditionally...)
1998-10-30 11:53:58 +00:00
Luigi Rizzo 9525e8f53c Use "KB" instead of "Kb" for KiloBytes, consistently with other
drivers and common practices.
1998-10-30 10:57:09 +00:00
Poul-Henning Kamp 00fb0e87c7 Update to current reality. We can now track several LORSTA on separate
minor devices.

Improve PLL/OCXO DAC dithering.

General remodeling.

Performance is now 2.5e-11 in frequency and +/- 100 nsec in time, both
of which are actually the limits of the transmitted signal.
1998-10-24 19:55:09 +00:00
Poul-Henning Kamp d259be02bc Update timecounters to new interface. 1998-10-23 10:46:20 +00:00
Bruce Evans 43a2c34c47 Removed all `vector xxxintr' specifications. Interrupt handlers are now
configured in drivers.
1998-10-22 15:39:35 +00:00
Bruce Evans fdf69a1788 Fixed the ifdef for `uart' driver being present. The sound-driver-specific
ifdef used in uart6850.c is bogus.

Reported by:	Paul Allenby <pallenby@mikom.csir.co.za>
1998-10-22 11:41:22 +00:00
Luigi Rizzo 824f5b2e35 Fix behaviour of the driver with small files -- due to a stupid
bug sound was not played if the total amount of data written to
the device was less than one blocksize

Noticed by: NABETANI Masaki and FreeBSD-users-jp
1998-10-22 11:20:33 +00:00
Bruce Evans 2d5e4a9b94 The previous change was much too simple to actually compensate for
braindamage in sound driver confiruration.  Attempt to only reference
interrupt handlers if their driver is configured.
1998-10-22 10:34:11 +00:00
Bruce Evans fe310de802 Initialize isa_devtab entries for interrupt handlers in individual
device drivers, not in ioconf.c.  Use a different hack in isa_device.h
so that a new config(8) is not required yet.

pc98 parts approved by: kato
1998-10-22 05:58:45 +00:00
Søren Schmidt 8de3e08bf8 Make the next_writeable address specific for each drive, there might
be more than one burner online.
1998-10-15 08:11:55 +00:00
David Greenman 6cde7a165f Fixed two potentially serious classes of bugs:
1) The vnode pager wasn't properly tracking the file size due to
   "size" being page rounded in some cases and not in others.
   This sometimes resulted in corrupted files. First noticed by
   Terry Lambert.
   Fixed by changing the "size" pager_alloc parameter to be a 64bit
   byte value (as opposed to a 32bit page index) and changing the
   pagers and their callers to deal with this properly.
2) Fixed a bogus type cast in round_page() and trunc_page() that
   caused some 64bit offsets and sizes to be scrambled. Removing
   the cast required adding casts at a few dozen callers.
   There may be problems with other bogus casts in close-by
   macros. A quick check seemed to indicate that those were okay,
   however.
1998-10-13 08:24:45 +00:00
Kazutaka YOKOTA ba8e952c77 Added a workaround for yet-another, less-than-compatible keyboard controller.
This one returns 0xfa (ACK) for TEST_KBD_PORT and TEST_AUX_PORT commands.
The compatible controllers expected to return 0.
1998-10-13 07:56:38 +00:00
Warner Losh bb415a7e88 Fix breakage introduced by last patch. bde has added CC_QUIET flag to
hasseen_isadev so this will be less noisy when conflicts do exist.
Also eliminate redundant warnings about conflicts.

Requested by: bde
Reviewed by: gibbs
1998-10-12 18:53:33 +00:00
Bruce Evans a4e195e166 Don't print conflict messages in haveseen_isadev() if CC_QUIET is
specified.  This makes haveseen_isadev() useful for searching for a
free resource.  This increases the bitrot in the pci RESOURCE_CHECK
code.

Fixed the pre-attach conflict message.  The flag for distinguishing
pre-attach conflict checks from pre-probe ones was never set.
1998-10-12 13:12:45 +00:00
Bruce Evans 8806141c1d Added flag CC_QUIET for quiet conflict checking.
Fixed corrupted tabs.
1998-10-12 11:32:35 +00:00
Warner Losh 19bed41a5d Fix conficts in probe:
o For bt and aha only probe the one I/O range if a specific I/O is specified
  in the config file.
o Don't even try to probe I/O ranges that have been seen already.
o If we conflict with an IRQ or DRQ, then fail the probe.

Requested by: bde, gibbs
Approved by: jkh
1998-10-10 00:44:12 +00:00
Dag-Erling Smørgrav 83eb77e880 Make that annoying "device busy" message dependent on DEBUG (using the
DEB macro). There are probably quite a few other messages that warrant
a similar treatment, and many more that should be converted to plain
log messages (e.g. "WARNING: wrintr but write DMA inactive!"). Now
that I think of it, same goes for the CAM code (e.g. the famed "tagged
openings" message)
1998-10-08 20:55:54 +00:00
KATO Takenori 0dce060dd6 Discard previous commit. 1998-10-08 17:20:58 +00:00
KATO Takenori bb168650e8 Add SMC EtherEZ98 support to ed driver (PC-98).
Reviewed by:	kato
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
1998-10-08 17:04:59 +00:00
Søren Schmidt f8161cee7c Remove debug output on disk change. 1998-10-08 06:41:44 +00:00
Dag-Erling Smørgrav 5b3a79a466 Nit in comment: PnP ID 0x3500630e is a CS4236B, not a CS4236. 1998-10-04 16:22:25 +00:00
Mike Smith b0773b5098 At net-jp@jp.freebsd.org mailing list, if_cs user in Japan
reported bug.

  At using tcpdump for cs interface, tcpdump only dump packet which
src or dst MAC-address is cs interface. cs interface can't look up
packet between others.

Submitted by:	MIHIRA "Sanpei" Yoshiro <sanpei@sanpei.org>
1998-10-04 02:11:15 +00:00
Alexander Langer fd5e555c48 Removed duplicate case.
Submitted by:	dfr
Blessed by:	luigi
1998-10-03 14:43:49 +00:00
Luigi Rizzo fe854067c7 Update the pcm driver to the most recent version. This should
add support for Vibra16X, OPTi925, and bring in several assorted
fixes to the code and documentation.
Also present here are apm hooks so that laptops can properly
reconfigure the hardware after suspend (tested on the Libretto50).
Reviewed by: jordan
1998-10-02 17:26:37 +00:00
Kazutaka YOKOTA 6ce70b4260 A size field returned by the VESA BIOS is already expressed in bytes.
Submitted by: sos
1998-10-02 03:42:19 +00:00
Andrey A. Chernov 24c7337e25 Restore static of sc_flags.
Restore set_destructive_cursor prototype.
1998-10-01 21:04:52 +00:00
Kazutaka YOKOTA def802441f Yet another round of fixes for the VESA support code.
- Express various sizes in bytes, rather than Kbytes, in the video
  mode and adapter information structures.
- Fill 0 in the linear buffer size field if the linear frame buffer
  is not available.
- Remove SW_VESA_USER ioctl. It is still experimetal and was not meant
  to be released.
- Fix missing cast operator.
- Correctly handle pointers returned by the VESA BIOS. The pointers
  may point to the area either in the BIOS ROM or in the buffer supplied
  by the caller.
- Set the destructive cursor at the right moment.
1998-10-01 11:39:18 +00:00
Dag-Erling Smørgrav afc8ba89ef Document that we support the CS4236B. 1998-09-30 14:09:00 +00:00
Dag-Erling Smørgrav e401e55f33 Add PnP ID for Crystal Semiconductors CS4236B codecs (register-
compatible with CS4236, so no driver changes are required)

Reviewed by:	Luigi Rizzo <luigi@iet.unipi.it>
1998-09-30 14:06:25 +00:00
Andrey A. Chernov cecc3abb9d Restore v1.3 - page align workaround moved to vm86_datacall now 1998-09-29 20:38:54 +00:00
Andrey A. Chernov 81e30e2649 cosmetique - remove unneded static in previous commit 1998-09-29 04:11:35 +00:00
Andrey A. Chernov bb2691312e workaround painful vm86_datacall requirement that segment+offset
must be withing the same PAGE frame
1998-09-29 04:09:39 +00:00
Andrey A. Chernov d4b2d02fc1 Fix destructive cursor shape after text mode switch.
This is only for standard modes, I don't check vesa modes yet.
1998-09-29 02:00:57 +00:00
Andrey A. Chernov 83eda2d885 fix handling more than one cards
Submitted by: "Sergey V.Dorokhov" <svd@kbtelecom.nalnet.ru>
1998-09-28 23:27:57 +00:00
Kazutaka YOKOTA ef7b5df757 Cosmetic changes:
- there were too many global variables (there still are :-).
- the data section was bloated by explicit initializations of static
  variables to 0 (only fixed the recently changed ones).
- WRAPHIST() had silly parentheses around foo->bar.
- the comment about inline functions was stale.
- the comment about Userconfig presumes too much about the boot environment.
- `i' was reused confusingly in scioctl().
- the declaration of `butmap' used a deprecated K&R misfeature.
- the initializeation of `butmap' had an unnecessary line break.
- `unsigned char' was not consistently (mis)spelled as u_char.
- English was poor in a comment in videoio.c.
Submitted by: bde
1998-09-26 03:38:40 +00:00
Kazutaka YOKOTA a8dedb0cfb - Use `u_long cmd' ioctl arg.
- Fix some external function declaration.
Submitted by: bde
1998-09-26 03:34:10 +00:00
Kazutaka YOKOTA a3cd018562 Cosmetic change: adjust copyright notice. 1998-09-25 11:55:46 +00:00
Kazutaka YOKOTA e91db91d4e SC_BAD_FLICKER -> SC_ALT_SEQACCESS
Now supposedly less harmful way of accessing VGA sequencer registers
is default. An alternative, often troublesome, I/O access is optional.

Discussed with: sos, jkh
1998-09-24 13:20:47 +00:00
Bruce Evans f28d6834e1 Removed unused include of "ioconf.h" again. The CAM changes made ioconf.h
empty but regressed to including it here.
1998-09-24 10:43:42 +00:00
Bruce Evans 849ded1371 Removed a stale comment about "ioconf.h". 1998-09-24 10:41:13 +00:00
Kazutaka YOKOTA 95bafc8f5a Fix and update for VESA BIOS support in syscons.
- Handle pixel (raster text) mode properly.
   - Clear screen and paint border right.
   - Paint text attribute (colors).
   - Fix off-by-one errors.
   - Add some sanity checks.
- Fix some function prototypes.
- Add some comment lines.
- Define generic text mode numbers so that the user can just give
  "80x25", "80x60", "132x25"..., rather than "VGA_xxx", to `vidcontrol'
  to change the current video mode.  `vidoio.c' and `vesa.c' will map
  these numbers to real video mode numbers appropriate and available
  with the given video hardware.  I believe this will be useful to make
  syscons more portable across archtectures.
1998-09-23 09:59:00 +00:00
Bruce Evans 6ed49410a5 Attempt to work around a bug in the previous commit related to
non-reentrancy of SMP clock locking.  Depend on the giant lock
protecting clkintr().
1998-09-20 19:56:28 +00:00
Nicolas Souchu 0a40e22a5d - program counter was previously an index in the microsequence, now pc
is struct ppb_microseq* pointing directly into the microsequence
1998-09-20 14:47:01 +00:00
Bruce Evans 4c7304dd15 Remove unused file. 1998-09-20 05:54:38 +00:00
Bruce Evans a6796db6ce Ensure that the i8254 timecounter doesn't go backards. It sometimes
went backwards when interrupts were masked for more than one i8254
interrupt period.  It sometimes went backwards when the i8254 counter
was reprogrammed.  Neither of these should happen in normal operation.

Update the i8254 timecounter support variables atomically.  Calling
timecounter functions from fast interrupt handlers may actually work
in all cases now.
1998-09-20 03:47:54 +00:00
Jordan K. Hubbard 36607a387c MF22: Robert Swindells' patch for correct probing of more AMD cards.
Merged by:	Max Khon <fjoe@iclub.nsu.ru>
1998-09-17 13:09:16 +00:00
Justin T. Gibbs 9f02ad6073 Nuke uninitialized varible fd from retrier(). Change the devstat code
to reference fdc->fd instead.
1998-09-15 22:07:24 +00:00
Søren Schmidt a8445737e7 Add VESA support to syscons.
Kazu writes:

The VESA support code requires vm86 support. Make sure your kernel
configuration file has the following line.
        options "VM86"
If you want to statically link the VESA support code to the kernel,
add the following option to the kernel configuration file.
        options "VESA"

The vidcontrol command now accepts the following video mode names:
VESA_132x25, VESA_132x43, VESA_132x50, VESA_132x60, VESA_800x600

The VESA_800x600 mode is a raster display mode. The 80x25 text will
be displayed on the 800x600 screen. Useful for some laptop computers.

vidcontrol accepts the new `-i <info>' option, where <info> must be
either `adapter' or `mode'.  When the `-i adapter' option is given,
vidcontrol will print basic information (not much) on the video
adapter. When the `-i mode' option is specified, vidcontrol will
list video modes which are actually supported by the video adapter.

Submitted by:   Kazutaka YOKOTA yokota@FreeBSD.ORG
1998-09-15 18:16:39 +00:00
Justin T. Gibbs bd9d336e40 Obsoleted by CAM. 1998-09-15 10:40:55 +00:00
Justin T. Gibbs 26dc5ba614 The Buslogic driver is smart enough to set it's own interrupt vector now. 1998-09-15 10:04:08 +00:00
Justin T. Gibbs b2dfb1f906 Update system to new device statistics code.
Submitted by:	"Kenneth D. Merry" <ken@plutotech.com>
		mike@smith.net.au (Mike Smith)
1998-09-15 08:15:30 +00:00
Justin T. Gibbs 5d55526b65 Adaptec 154X SCSI-Host Adapter driver for CAM.
Submitted by:	Warner Losh <imp@village.org>
1998-09-15 07:39:55 +00:00
Justin T. Gibbs 532abf3b7a Mylex/Buslogic MultiMaster SCSI-Host Adapter Driver for CAM. 1998-09-15 07:32:57 +00:00
Justin T. Gibbs a5a2d1bfe9 Advance Systems SCSI Host Adapter driver for CAM. Currently only support
the 8bit SCSI AdvanSys products.
1998-09-15 07:03:43 +00:00
Søren Schmidt d024c95599 Remove the SLICE code.
This clearly needs alot more thought, and we dont need this to hunt
us down in 3.0-RELEASE.
1998-09-14 19:56:42 +00:00
Søren Schmidt c77c6e0cbb Make /dev/vga a softlink to /dev/ttyv0 under DEVFS using /etc/rc.devfs
Remove the hack from syscons that added a /dev/vga node in DEVFS
it broke root acces on ttyv0 because dev_mkdb screwed up.
1998-09-14 09:14:46 +00:00
Eivind Eklund dfef928b1c Support PnP compatibility IDs. This allow e.g. the ed driver to pick
up any PnP NE2000 compatible card, instead of forcing us to always
update ID lists.

Submitted by:	Ugo Paternostro <paterno@dsi.unifi.it>
1998-09-13 22:15:44 +00:00
Nicolas Souchu 41990851b8 invalid printf call fixed -> compile time warning removed 1998-09-13 20:57:06 +00:00
Nicolas Souchu 54ad6085b1 ppbus enhanced to support ZIP+ : microseq improved 1998-09-13 18:26:44 +00:00
Warner Losh 89afdb2434 Print warning about block size not being optimal once per open rather than
once per offending write.
1998-09-09 17:20:32 +00:00
Søren Schmidt eeded4d82e Add new atapi-cd driver that supports atapi CD-R/RW drives.
This is only a stop-gab solution to get atapi burner support into 3.0.
1998-09-08 20:57:47 +00:00
Luigi Rizzo ac38e6e338 fix a problem with our definition of SNDCTL_DSP_GETBLKSIZE, to let
the FreeBSD x11amp work (same as in -stable)
1998-09-08 07:21:00 +00:00
Tor Egge 572d053e17 Maintain a mapping from irq number to (ioapic number, int pin) tuple,
and use this when masking/unmasking interrupts.

Maintain a mapping from (iopaic number, int pin) tuple to irq number,
and use this when configuring devices and programming the ioapics.

Previous code assumed that irq number was equal to int pin number, and
that the ioapic number was 0.

Don't let an AP enter _cpu_switch before all local apics are initialized.
1998-09-06 22:41:42 +00:00
Luoqi Chen 02c71890cd Make irq forwarding truely functional. 1998-09-04 23:03:04 +00:00
Nicolas Souchu 4e190a62f8 Reviewed by: Doug Rabson
Submitted by:	nsouch
Philips PCF8584 chipset support. Chipset controller for the I2C bus.
1998-09-03 21:01:22 +00:00
Nicolas Souchu edcfcf270b printing with compatible mode fixed if ECP available + more verbose if bootverbose set 1998-09-02 20:34:34 +00:00
Mike Smith 8abff6b13b Enable duplex autodetection if UTP media are autodetected.
Add a sysctl 'machdep.cs_recv_delay' to specify how long to wait after
receiving a packet in order to check for a subsequent (back-to-back)
packet.  The cs8900 has a very small receive buffer, so this helps avoid
overflows at the cost of some extra CPU overhead.

Submitted by:	Oleg Sharoiko <os@rsu.ru>, MIHIRA "Sanpei" Yoshiro <sanpei@sanpei.org>
1998-08-27 22:41:18 +00:00
Bruce Evans 00671271c3 Fixed printf format errors. Only one left in LINT on i386's. 1998-08-24 02:28:16 +00:00
Poul-Henning Kamp be18fc123b remove bdevsw arg from dsopen();
Forgotten by:	julian
Reviewed by:	bde
1998-08-23 20:16:35 +00:00
Bruce Evans 1fcee46997 Fixed printf format errors. 1998-08-23 10:16:26 +00:00
Bruce Evans ae5a10cad0 Fixed printf format errors. `struct eisa_device' uses a strange type
for the unit number (like most SCSI drivers).
1998-08-23 10:12:12 +00:00
Bruce Evans 3441a318d8 Fixed printf format errors.
Fixed style bugs in the int to u_long ioctl command arg changes.  This
driver doesn't use the u_foo BSDism.

Don't smash ioctl command args back to int.
1998-08-23 09:57:09 +00:00
Bruce Evans cf8c7b0963 Added D_TTY to the cdevswitch flags for all tty drivers. This is required
for the Lite2 fix for always returning EIO in dead_read().

Cleaned up the cdevswitch initializers for all tty drivers.

Removed explicit calls to ttsetwater() from all (tty) drivers.  ttsetwater()
is now called centrally for opens, not just for parameter changes.
1998-08-23 08:26:42 +00:00
Bruce Evans 87c95fa5dc Removed cxpoll(). Just use ttpoll() like all other tty drivers. It's
equivalent except for the bad-minor-number case (which probably can't
happen).
1998-08-23 07:52:48 +00:00
Mike Smith b63b587cb3 A better fix for kern/7144:
The check for dropping unicast packets not sent to our ethernet
address is after the bpf tap, but not conditioned on it.  All packets
received should get handed to bpf, and unicast packets not to us (mac)
should get dropped whether or not there is a bpf listener.  I believe
that the common optimization that the interface is in hw promisc mode
iff there is a bpf listener is in general wrong, but more frequently
so on wavelans.

I think Max's fix makes bpf listeners not see unicast packets sent to
others, but I'm not sure.

One can argue that checking on MOD_ENAL is wrong, but the code only
drops packets that shouldn't be received.  The correctness condition
is that it be run whenever unicast packets without our mac address can
be received.

PR:		kern/7144
Submitted by:	Greg Troxel <gdt@ir.bbn.com>
1998-08-20 05:49:59 +00:00
Bruce Evans e4b6edc65b Fixed bogus spelling `nx*' of some `no*' devswitch functions. 1998-08-20 05:48:17 +00:00
Bruce Evans 4a74956bf7 Fixed devfs initialization which I broke in the previous commit.
Fixed an old name and disorder in the sio dictionary.
1998-08-20 05:21:50 +00:00
Bruce Evans 9a02ad618f Fixed devfs initialization which I broke in the previous commit. 1998-08-20 05:12:48 +00:00
Bruce Evans 3fd2d29816 Enabled dynamically sized tty input buffers (with enough buffering
for 1 second's worth of input) and larger tty output buffers.  The
interrupt-level buffers are still too small for speeds above 115200
bps (only a little too small for 230400 bps if RTS flow control is
enabled).

Don't call ttsetwater() explicitly in open().  It is now called for
the TTYDISC l_open() and should be static.

Don't attempt to register the cdevsw more than once.
1998-08-19 04:17:38 +00:00
Joseph Koshy db1ab08ec9 Correct handling of ASCII DEL (0x7F).
I don't have access to a real VT220 to verify this against.
However, I'm committing the patch in `good faith' because
(a) getting hold of a real VT220 is going to be increasingly difficult
    the longer the PR sits around,
(b) some one was troubled enough to in a PR and
(c) the fix is minor and has no other implications.

PR: 7559
Submitted by: Christian Weisgerber <naddy@mips.rhein-neckar.de>
1998-08-19 03:39:40 +00:00
Joseph Koshy 1d26c935fe Correct glyph displayed by PCVT in ISO Latin-1 mode.
PR: 7610
Submitted-by: Christian Weisgerber <naddy@mips.rhein-neckar.de>
1998-08-19 03:07:16 +00:00
Søren Schmidt 95332616af Fix one forgotten instance of \n to \r 1998-08-18 07:36:47 +00:00
Bruce Evans 0492d857d1 Removed unused includes. 1998-08-17 19:09:36 +00:00
Bruce Evans c31c5c44b0 Fixed a type mismatch.
Fixed a missing extern declaration (bug for bug compatibly including
style bugs.  Should probably be static).
1998-08-17 18:47:36 +00:00
Bruce Evans 162886e237 Fixed printf format errors. 1998-08-17 01:05:25 +00:00
Bruce Evans 86a14a7a0a Use [u]intptr_t instead of [u_]long for casts between pointers and
integers.  Don't forget to cast to (void *) as well.
1998-08-16 01:21:52 +00:00
Bruce Evans 9d97be3511 Cast an int to (intptr_t) before casting it to (void *).
Don't cast a pointer to a long just to print it.
1998-08-16 01:04:48 +00:00
Bruce Evans 5014fe3b58 Fixed yet more ioctl breakage due to the type of the `cmd' arg chaninging
from int to u_long but not changing here.
1998-08-16 00:57:07 +00:00
Bruce Evans 8705accbe7 Use offsetof() to avoid some casts from pointers to integers (of a
possibly different size).
1998-08-15 21:36:16 +00:00
Søren Schmidt 45696a866c Only write a filemark on close when data has actually been written. 1998-08-14 15:54:57 +00:00
Søren Schmidt b5be0bd29d Changed \n to \r in the mouse cutbuffer, this makes pine & Emacs
behave better when using the cut&paste functionality.

Submitted by: Barry Bierbauch <pivrnec@vszbr.cz>
1998-08-14 06:32:03 +00:00
Mike Smith 87fffb7ca3 Fix BNC/AUI autodetection.
Submitted by:	MIHIRA "Sanpei" Yoshiro <sanpei@sanpei.org>
Submitted by:	Oleg Sharoiko <os@rsu.ru>
1998-08-13 20:31:17 +00:00
Bruce Evans 87543489d0 Cleaned up previous commit, mainly by moving repetitive calculations
of invariants to cyattach().

Fixed minor bugs:
- cyparam() returned without restoring the ipl in the error cases.  This
  was harmless because cyparam() is always called at spltty().
- one check for "rev. J or higher" actually checked for precisely rev. J.
1998-08-13 19:03:22 +00:00
Bruce Evans fc64b69498 Updated for not-so-new version of Cyclom-Y boards (with 60MHz clock and
swapped RTS/DTR).  Merge the vendor's modification of the 2.2.6-release
version into -current for reference.  Will be cleaned up in next commit.

Obtained from:	ftp://ftp.cyclades.com/pub/cyclades/cyclom-y/freebsd/2.2.6/cyy226.tar.gz
1998-08-13 13:54:10 +00:00
Bruce Evans 001ca7cc09 Removed support for FreeBSD-1.x. 1998-08-12 18:32:42 +00:00
Bruce Evans 3dcbf6cec0 Fixed printf format errors.
Removed support for FreeBSD-1.x.
1998-08-12 18:16:38 +00:00
Bruce Evans 0e4801883f Removed unused includes. 1998-08-12 18:02:48 +00:00
Bruce Evans 9b94cfc031 Don't depend on "implicit int". 1998-08-11 17:22:42 +00:00
Bruce Evans 92971f1fd7 Register tty software interrupt handlers at run time using register_swi()
instead of at compile time using ifdefs.

Use _swi_null instead of dummycamisr.  CAM and dpt should call
register_swi() instead of hacking on ihandlers[] directly.
1998-08-11 17:01:32 +00:00
Bruce Evans 18c5a6c435 Implemented dynamic registration of software interrupt handlers. Not
used yet.

Use dummy SWI handlers to avoid some checks for null pointers.
1998-08-11 15:08:13 +00:00
Bruce Evans 8f5eb45899 Fixed null setting of multiple wakeup prevention variable.
Fixed printf format errors.
1998-08-10 20:47:22 +00:00
Bruce Evans b97fc94873 Use [u]intptr_t instead of [unsigned] long to convert and/or represent
pointers.

This finishes fixing conversions between pointers and integers of
possibly different sizes in GENERIC.
1998-08-10 17:21:49 +00:00
Bruce Evans c41141b002 Fixed the formatting of some tables (mainly the one produced by ps
in ddb) which I broke by changing %8[l]x to %8p.  Hacked the central
printf routine to not add an "0x" prefix for %p formats if the field
width is nonzero.  The tables are still horribly misformatted on
64-bit machines.

Use %p instead of %8p to print pointers when the field width isn't
important.
1998-08-10 14:27:34 +00:00
Kazutaka YOKOTA 4da170bcf6 A workaround for screen flicker; eliminate some I/O access to the VGA
chip.

It has been observed that the problem is most apparent:

a) in notebook computers,
b) and/or in the systems with C&T video chips.

Define the new configuration option SC_BAD_FLICKER in the kernel
configuration file to remove outb()/outw() calls in question.
1998-08-10 08:39:19 +00:00
Poul-Henning Kamp 22126f4208 The machine dependent disk slice manager does not recognize
DOS partition type 15 (Extended DOS, LBA) as a container for
DOS logical volumes, so the appropriate slices (e.g. sd1s5)
are not initialized.

PR:		7549
PR:		4120
Reviewed by:	phk
Submitted by:	Jim Mattson <jmattson@sonic.net>
1998-08-10 07:22:14 +00:00
Jordan K. Hubbard afc2d1c74e A few misc changes to get the spigot and meteor board working in 3.0.
Submitted by:	Jim Lowe <james@miller.cs.uwm.edu>
1998-08-08 19:26:08 +00:00
Mike Smith 46f3ff7986 Major ppbus updates from the author.
- ppbus now supports PLIP via the if_plip driver
 - ieee1284 infrastructure added, including parallel-port PnP
 - port microsequencer added, for scripting the sort of port I/O
   that is common with parallel devices without endless calls up and down
   through the driver structure.
 - improved bus ownership behaviour among the ppbus-using drivers.
 - improved I/O chipset feature detection

The vpo driver is now implemented using the microsequencer, leading to
some performance improvements as well as providing an extensive example
of its use.

Reviewed by:	msmith
Submitted by:	Nicolas Souchu <Nicolas.Souchu@prism.uvsq.fr>
1998-08-03 19:14:33 +00:00
Kazutaka YOKOTA 88a5f0cca7 1. Reorganized screen saver related code so that both the LKM screen
saver and splash screen can all work properly with syscons.  Note that
the splash screen option (SC_SPLASH_SCREEN) does not work yet, as it
requires additional code from msmith.

- Reorganized the splash screen code to match the latest development
  in this area.
- Delay screen switch in `switch_scr()' until the screen saver is
  stopped, if one is running,
- Start the screen saver immediately, if any, when the `saver' key is
  pressed. (There will be another commit for `kbdcontrol' to support
  this keyword in the keymap file.)
- Do not always stop the screen saver when mouse-related ioctls
  are called.  Stop it only if the mouse is moved or buttons are
  clicked; don't stop it if any other mouse ioctls are called.

2. Added provision to write userland screen savers.  (Contact me if you
are interested in writing one.)

- Added CONS_IDLE, CONS_SAVERMODE, and CONS_SAVERSTART ioctls to
  support userland screen savers.

3. Some code clean-ups.
1998-08-03 11:30:45 +00:00
Kazutaka YOKOTA 855458e47b - When the system is shut down, switch to the vty0 if possible.
- Don't try to ring bell when system is going down. Beacuse the clock
  code is about to be stopped, the timeout routine won't be called
  anymore.
1998-08-03 09:18:58 +00:00
Kazutaka YOKOTA 2f803c851e Fix the bug which always reallocated the cut buffer whenever
the screen mode is changed even if another vty has larger size.
Reallocate the buffer only when the new screen size is larger than
the current cut buffer size.
1998-08-03 09:17:06 +00:00
Kazutaka YOKOTA 16d7bd5278 Don't accept the blank time value, if it is too big.
PR: bin/6188
1998-08-03 09:15:36 +00:00
Kazutaka YOKOTA 30f3a4598b - Add new bell types: "quiet.normal" and "quiet.visual".
When bell is of "quiet" types, the console won't ring (or flush)
  if the ringing process is in a background vty.
  PR: i386/2853

- Modify the escape sequence 'ESC[=%d;%dB' so that bell pitch and
  duration are set in hertz and msecs by kbdcontrol(1).
  There will be a corresponding kbdcontrol patch.
  PR: bin/6037
  Submitted by: Kouichi Hirabayashi (kh@eve.mogami-wire.co.jp)
1998-08-03 09:09:35 +00:00
Bruce Evans 34e9dea435 Added a flags arg to dsopen() and updated drivers. The DSO_ONESLICE
and DSO_NOLABELS flags prevent searching for slices and labels
respectively.  Current drivers don't set these flags.  When
DSO_NOLABELS is set, the in-core label for the whole disk is cloned
to create an in-core label for each slice.  This gives the correct
result (a good in-core label for the compatibility slice) if
DSO_ONESLICE is set or only one slice is found, but usually gives
broken labels otherwise, so DSO_ONESLICE should be set if DSO_NOLABELS
is set.
1998-07-30 15:16:06 +00:00
Bruce Evans 7010319f16 Fixed sign extension bugs awoken by changing speed_t to an unsigned
type.  19200, 1200 and other relatively uninteresting speeds were
broken.

Submitted by:	Rob Mallory <rmallory@qualcomm.com>
1998-07-29 18:48:20 +00:00
Bruce Evans 5c1a1eae83 Fixed error handling:
- Call isa_dmadone() whenever necessary to stop DMA and/or free bounce
  buffers.  Undead DMA corrupted the malloc freelist fairly consistently
  in the following configuration: SLICE kernel, 2 floppy drives, no disk
  in fd0, disk in fd1.
- Don't call fdc_reset() from fd_timeout().  Doing so gave an "extra"
  interrupt which was usually misinterpreted as being for completion
  of the next FDC command; the interrupt for completion of the next
  FDC command was then usually misinterpreted...  There were further
  complications for interrupts latched by the soft-spl mechanism so
  that they were delivered after all the h/w interrupts went away.
  This caused at least wrong head settle delays and may be why the
  FreeBSD floppy driver seems to munch floppies more than most floppy
  drivers.  The reset was unnecessary anyway in cases that didn't have
  the bug described next, since is was repeated a little later for
  the IOTIMEDOUT state.  The state machine has complications to handle
  resets correctly, so just use it.
- Don't call retrier() from fd_timeout().  The IOTIMEDOUT state needs
  to be processed next, and it isn't valid to set to that state if
  retrier() has aborted the current transfer.  Doing so caused null
  pointer panics after the previous bug was fixed.

Improved error handling:
- If an i/o is aborted, arrange to reset in the state machine before
  doing the next i/o.  New fdc flag for this.  This fixes spurious
  warnings and lengthy busy-waiting for the next i/o.
- Split STARTRECAL into RESETCOMPLETE and STARTRECAL and only check
  for the results from reset if we actually reset.  This fixes spurious
  warnings for other paths to STARTRECAL.  [Oops, it may break reset
  handling for motor-off resets.]

Cleanups in fd_timeout():
- Renamed to fd_iotimeout() to make it clearer that it is only used
  for i/o.
- Don't handle the bp == 0 case.  This case can't happen for i/o.
- Don't check for controller-busy.  We know it must be.
- Don't print anything.  retrier() already prints too much for normal
  errors.
- Fudge the state differently so that the state machine advances
  fdc->retry and the status is invalid (perhaps this should fudge a
  valid state like the one for WP).
- Style fixes.
1998-07-29 13:00:42 +00:00
Jonathan Lemon a69546de82 Extend cpl workaround so that it applies when we are returning to
user-mode as well as vm86 mode.
1998-07-27 16:51:33 +00:00
Bruce Evans f69c53b019 Don't pass the label to diskerr(), since the label is being constructed
and may be invalid.  In particular, d_secpercyl may be 0, and diskerr()
divides by it.
1998-07-25 16:35:06 +00:00
Mike Smith b16d163da1 Add the 'cs' driver for Crystal Semiconductor CS89x0 devices. This
supports PnP and if_media.  I've been running a slightly older version
here for several weeks now.
Submitted by:	Maxim Bolotin <max@rsu.ru>
1998-07-20 20:00:43 +00:00
Mike Smith 2512c3e67b Add support for PCNet PCI chips that only work when we talk to them as ISA
devices. Specifically fix the case for the Hitachi version as used in
their VisionBook models.

Submitted by:	Ted Faber <faber@isi.edu>
1998-07-20 17:33:01 +00:00
Bruce Evans 92d1f65ed2 Moved allocation of the slices struct to the right place. Initialize
everything in it (the devsw pointers were not initialized early or at
all for the !DEVFS case, but this was harmless on i386's).
1998-07-20 13:39:45 +00:00
Bruce Evans f2bd332e7c Stop physical DMA for the non-auto case in isa_dmadone(). This fixes a
small part of a bug suite beginning in the SLICE probes but mostly in the
floppy driver.  This is a quick fix: the auto case shouldn't be special;
DMA should also be stopped in isa_dma_release(); isa_dmastop() probably
shouldn't exist; common DMA registers should not be accessed without
locking.
1998-07-19 04:22:55 +00:00
Bruce Evans e5d7d24361 Fixed error handling after a seek error that can't happen. When the
controller reports a successful seek, it is very unlikely to report
seeking to a cylinder other than the one requested, but we check for
this, and botched the error handling for the requested_cylinder != 0
case.  This error happened when the bug fixed in rev.1.52 of <sys/buf.h>
caused the head of buffer queue to change to one starting on a different
cylnder - the requested cylinder was found, but it wasn't what we
thought we requested.  The fix is simply to arrange to reset the state
machine.

Corruption of the buffer queue seems to only have been a problem in the
floppy driver.  Other drivers dequeue the head of the queue before doing
physical i/o on it, so the corruption at worse broke the elevator sort
order.  Dequeueing breaks it anyway.
1998-07-18 03:15:33 +00:00
Bruce Evans 18da528d41 Changed %n to %r in devfs name format strings. %n has almost gone away. 1998-07-15 12:18:34 +00:00
Bruce Evans 1be1e72fd8 Don't cast pointers to longs in asm statements.
These asm statments are not quite as pessimal as when I complained
about them in rev.1.9 of audio.c.  They seem to be only 40% slower
than the C version on P5's and the same speed on K6's.
1998-07-15 11:47:58 +00:00
Bruce Evans 51d5e97efa The ioctl request arg is unsigned log, so don't attempt to pass it
around as signed int.

Fixed printf format error for ioctl request arg hidden in ifdefed code.
1998-07-15 10:11:21 +00:00
Bruce Evans 29d6b96d69 The ioctl request arg is unsigned long, so don't attempt to pass it
around as signed int.
1998-07-15 09:59:31 +00:00
Bruce Evans ea878c61f1 Don't pretend to support ix86's with 16-bit ints by using longs
just to ensure 32-bit variables.
1998-07-15 09:38:10 +00:00
Bruce Evans 3cc954df66 Don't pretend to support ix86's with 16-bit ints by using longs
just to ensure 32-bit variables.  Doing so broke i386's with 64-bit
longs.
1998-07-14 11:42:05 +00:00
Bruce Evans 8f5aca410f Don't pretend to support ix86's with 16-bit ints and 32-bit registers
by using longs just to ensure 32-bit variables.  Long variables don't
fit in 32-bit registers on ix86's with 64-bit longs.
1998-07-14 06:17:28 +00:00
Bruce Evans 9bffbcd4f5 Fixed printf format errors (only 1 left in GENERIC now). 1998-07-13 09:53:11 +00:00
Julian Elischer ad27f8d9a5 SLICE probing becomes asynchronous. It can now be triggered by
interupt level events. This needs a lot of cleanup, but has been working
here for a month or two.. originally needed for CAM integration
but that hasn't happenned yet. The probing  state machines for each
handler should be replaced by a more generic state-service. It's
still quite messy in there..
1998-07-13 08:23:05 +00:00
Poul-Henning Kamp 3bc7e56592 Improve a couple of comment.
PR:		7242
Reviewed by:	phk
Submitted by:	Peter Jeremy <peter.jeremyp@alcatel.com.au>
1998-07-11 08:01:18 +00:00
Bruce Evans ac1e407b32 Fixed printf format errors. 1998-07-11 07:46:16 +00:00
Bruce Evans a838d83d8f Don't pretend to support ix86's with 7-bit ints by using longs just to
ensure 8-bit variables.  Doing so mainly bogotified some printf formats.
1998-07-11 06:35:39 +00:00
Eivind Eklund c8cedb4e27 "vender" -> "vendor"
Requested by:	Aage Røbekk <aagero@aage.priv.no>
1998-07-06 16:10:06 +00:00
Warner Losh f71f5262b1 Add the ability to suspend as well as hibernate to the system. This
is the kernel part of my commits, the userlevel stuff will be done in
a separate commit.  Add the ability to suspend as well as hibernate to
syscons.  Create a new virtual key like hibernate for suspend.  Update
apm_bios.h to define more apm bios goodies.
1998-07-06 06:29:07 +00:00
Julian Elischer f7ea2f55d1 There is no such thing any more as "struct bdevsw".
There is only cdevsw (which should be renamed in a later edit to deventry
or something). cdevsw contains the union of what were in both bdevsw an
cdevsw entries.  The bdevsw[] table stiff exists and is a second pointer
to the cdevsw entry of the device. it's major is in d_bmaj rather than
d_maj. some cleanup still to happen (e.g. dsopen now gets two pointers
to the same cdevsw struct instead of one to a bdevsw and one to a cdevsw).

rawread()/rawwrite() went away as part of this though it's not strictly
the same  patch, just that it involves all the same lines in the drivers.

cdroms no longer have write() entries (they did have rawwrite (?)).
tapes no longer have support for bdev operations.

Reviewed by: Eivind Eklund and Mike Smith
	Changes suggested by eivind.
1998-07-04 22:30:26 +00:00
Jordan K. Hubbard 24fa2d131e Check for missing keyboard.
PR:		7108
Submitted by:	Hellmuth Michaelis <hm@hcs.de>
1998-07-03 14:34:28 +00:00
John-Mark Gurney a9e837f479 document options to hardwire GUS irq/dmas... 1998-06-30 08:24:02 +00:00
Poul-Henning Kamp 761b9eeed9 Add D_DISK flag. 1998-06-26 18:13:57 +00:00
Poul-Henning Kamp b62591052c Remove bdevsw_add(), change the only two users to use bdevsw_add_generic().
Extend cdevsw to be superset of bdevsw.
Remove non-functional bdev lkm support.
Teach wcd what the open() args mean.
1998-06-25 11:28:07 +00:00
Kazutaka YOKOTA bf41934ccb Don't refer to mouse_info.u.datea.[xyz] while processing MOUSE_BUTTON_EVENT
ioctl.  These fields don't have valid values for this ioctl.
PR: kern/6928
Submitted by: Bill Fenner <fenner@parc.xerox.com>
1998-06-24 10:21:30 +00:00
Poul-Henning Kamp e29bc9add4 Avoid some panics in sio_unload which gets called with various dirt
if the attach of a modem card failed.
1998-06-24 09:23:32 +00:00
Bruce Evans be160d60ab Removed unused includes. 1998-06-21 18:02:50 +00:00
Bruce Evans 86ef30b746 Removed unused includes.
Ifdefed conditionally used includes.
1998-06-21 17:08:08 +00:00
Bruce Evans 2d7fa8d877 Removed unused includes.
Ifdefed conditionally used includes.
Finished rev.1.39.  (I only submitted the request.)
1998-06-21 16:51:06 +00:00
Bruce Evans 4d2540b074 Removed unused includes.
Don't depend on "implicit int".
1998-06-21 15:54:11 +00:00
Bruce Evans 2773aa0ef6 Removed unused includes.
Don't depend on "implicit int".
Don't bloat the data section with explicit initialization to 0.
1998-06-21 15:49:39 +00:00
Bruce Evans e5b19842ef Removed unused includes. 1998-06-21 14:53:44 +00:00
Bruce Evans 316bbd5c6f Converted add_interrupt_randomness() to take a `void *' arg. Rewrote
mmioctl() to fix hundreds of style bugs and a few error handling bugs
(don't check for superuser privilege for inappropriate ioctls, don't
check the input arg for the output-only MEM_RETURNIRQ ioctl, and don't
return EPERM for null changes).
1998-06-21 11:33:32 +00:00
Bruce Evans 5a2ae61fec Converted isa_strayintr() to take a `void *' arg. 1998-06-18 16:08:46 +00:00
Bruce Evans 9a2daf9190 Changed the type of an isa/general interrupt handler to take a
`void *' arg.  Fixed or hid most of the resulting type mismatches.
Handlers can now be updated locally (except for reworking their
global declarations in isa_device.h).
1998-06-18 15:32:09 +00:00
Bruce Evans a5211c115d Renambed sbintr to sb_intr to avoid a conflict with the (now
unconditionally declared although it can't be configured together
with snd) extern function sbintr.
1998-06-17 16:59:30 +00:00
Bruce Evans e9b998f0be Don't depend on <sys/conf.h> declaring isa device structs or isa
interrupt handlers.  pcm is not in LINT, so it is hard to test.
1998-06-17 16:54:22 +00:00
KATO Takenori a880d1a224 Declare bsintr when PC98 is defined. 1998-06-17 16:32:23 +00:00
Bruce Evans 084d9853ca Don't declare isa device structs or isa interrupt handlers in <sys/conf>,
and don't depend on them being declared there.  This will cause lots of
warnings for a few minutes until config is updated.  Interrupt handlers
should never have been configured by config, and the machine generated
declarations get in the way of changing the arg type from int to void *.
1998-06-17 14:58:04 +00:00
Bruce Evans f878d7eebd Include <i386/isa/pnp.h> after including its prerequisite
<i386/isa/isa_device.h> - don't depend on pollution in <sys/conf.h>
including the prerequisite earlier.
1998-06-17 14:01:00 +00:00
Bruce Evans b6f37c1954 Added used include of <i386/isa/isa_device.h> - don't depend on
pollution in <sys/conf.h>
1998-06-17 13:54:59 +00:00
Bruce Evans eca52014bd Don't log "unexpected" events on never-opened devices. Events left
over from the probe are now expected for incompatible UARTs that
deliver IRQs as a strobe (low) instead of a level (high).

Discard events on going-away devices too.  Endless loops may have
been possible when an active pccard was removed.
1998-06-16 11:05:59 +00:00
Bruce Evans 26d7294956 Avoid 64-bit divisions and modulos. Fixed related overflows for weird
args.

This driver should not be used, since it calls uiomove() with interrupts
disabled.
1998-06-14 10:52:52 +00:00
Steve Price 396ffb2e6b Add a macro tweak.
PR:		6932
Submitted by:	Nick Sayer <nsayer@quack.kfu.com>
1998-06-13 19:36:22 +00:00
Steve Price 56cef66e8c Add a symlink from /dev/vga to /dev/ttyv0 when using DEVFS
for programs like doscmd.

PR:		6920
Submitted by:	Luoqi Chen <luoqi@chen.ml.org>
1998-06-13 18:53:22 +00:00
Poul-Henning Kamp 4342fa9172 Correct name and number for sxdc modules
PR:		6891
Reviewed by:	phk
Submitted by:	Nick Sayer <nsayer@quack.kfu.com>
1998-06-10 12:49:54 +00:00
Poul-Henning Kamp a58f0f8e66 Add a tc_ prefix to struct timecounter members.
Urged by:	bde
1998-06-09 13:10:54 +00:00
Bruce Evans a09bee1aa8 Fixed pedantic semantics errors (bitfields not of type int, signed int
or unsigned int (this doesn't change the struct layout, size or
alignment in any of the files changed in this commit, at least for
gcc on i386's.  Using bitfields of type u_char may affect size and
alignment but not packing)).
1998-06-08 09:47:47 +00:00
Søren Schmidt 1747fd3131 Correct even more ioctl breakage :(
Doesn't people check their code before committing anymore, it could
at least compile  ????
1998-06-08 09:00:28 +00:00
Bruce Evans 387905a6b3 Fixed pedantic semantics errors (bitfields not of type int, signed int
or unsigned int (don't do this in one case where it would change the
object file)).
1998-06-08 08:50:43 +00:00
Bruce Evans ea0be99955 Updated yet another ioctl, and put wst in LINT to inhibit further bitrot. 1998-06-08 06:18:53 +00:00
Poul-Henning Kamp 48115288df Add a member function more to the timecounters, this one is for use
with latch based PPS implementations.  The client that uses it will
be committed after more testing.
1998-06-07 20:36:55 +00:00
Doug Rabson 498b291e26 Fix some more ioctls which I missed becausese they were hidden by options
which were not in LINT.
1998-06-07 19:40:41 +00:00
Doug Rabson ecbb00a262 This commit fixes various 64bit portability problems required for
FreeBSD/alpha.  The most significant item is to change the command
argument to ioctl functions from int to u_long.  This change brings us
inline with various other BSD versions.  Driver writers may like to
use (__FreeBSD_version == 300003) to detect this change.

The prototype FreeBSD/alpha machdep will follow in a couple of days
time.
1998-06-07 17:13:14 +00:00
Poul-Henning Kamp dbb3475507 Add a "this" style argument and a "void *private" so timecounters can
figure out which instance to wount with.
1998-06-07 08:40:53 +00:00
Steve Price 810e1311d2 keymap -> key_map so that the kernel will compile with
-DESKEYMAP.

PR:		6864
Submitted by:	Javier Rueda <jmrueda@diatel.upm.es>
1998-06-06 17:45:11 +00:00
Bruce Evans 12e1ed28e2 Force success of the probe (after doing it as before except in one
miscconfigured case) if the port is the console.  This fixes several
bugs:
- if all sioprobe()s failed, then the console driver followed null
  pointers in cdevsw[].
- if the sioprobe() for the console failed but another sioprobe()
  succeeded, then init hung early when the console couldn't be
  opened.
- it was silly for the console to not be there after printing boot
  messages on it.
Bugs introduced by this are hopefully no worse than old ones caused
by forcing the success of the `cn' level probe.
1998-06-03 12:30:10 +00:00
Bruce Evans b76bb1d472 Fixed a printf() arg botch in the previous commit.
Only complain about an irq mismatch in the probe if the configured
irq doesn't become active, and then print the bitmap of irqs that
became active (including clock irqs) instead of just the first
(not including clock irqs).

Bugs reported by: msmith
1998-06-03 09:43:38 +00:00
John Dyson e8f367853b Correct sleep priority. 1998-06-02 05:39:13 +00:00
Bruce Evans cd55b8f46c Converted the ICU-level interrupt tests (3, 5 and 8) in sioprobe() into
a test of the irq number, and made failure of this test non-fatal.
Removed related unused complications for the APIC_IO case.  Removed the
no-test3 flag.

Deverbosified the failure messages for the other tests.  Removed the
per-port verbose flag - just use the general verbose flag.
1998-05-31 10:53:55 +00:00
Poul-Henning Kamp bfb925ba31 most recent code for Loran driver. 1998-05-29 08:04:44 +00:00
Poul-Henning Kamp e796e00de3 Some cleanups related to timecounters and weird ifdefs in <sys/time.h>.
Clean up (or if antipodic: down) some of the msgbuf stuff.

Use an inline function rather than a macro for timecounter delta.

Maintain process "on-cpu" time as 64 bits of microseconds to avoid
needless second rollover overhead.

Avoid calling microuptime the second time in mi_switch() if we do
not pass through _idle in cpu_switch()

This should reduce our context-switch overhead a bit, in particular
on pre-P5 and SMP systems.

WARNING:  Programs which muck about with struct proc in userland
will have to be fixed.

Reviewed, but found imperfect by:       bde
1998-05-28 09:30:28 +00:00
Paul Richards aa6b464e36 Fix some bitrot in the multicast support, the move from TAILQ macros wasn't implemented fully. 1998-05-27 11:05:17 +00:00
Paul Richards 697990295f This time add an Id string that'll actually get expanded :-) 1998-05-27 09:59:13 +00:00
Paul Richards f0a5342dc5 Add an ID string (can't believe it never had one!) 1998-05-27 09:58:00 +00:00
Jonathan M. Bresler 29c98bc624 code was using wrong temporary variable "i", in place of "j".
i contains the contents of the EP_W0_CONFIG_CTRL register.
	i was being used as the array index into an array on the stack.

	j is initialized to 0 as it should be.

PR:		kern/6757
Reviewed by:	jmb
Submitted by:	Stephane E. Potvin <sepotvin@videotron.ca>
1998-05-26 02:28:18 +00:00
Poul-Henning Kamp d53fd54d9f LoadSoftModem() routine at sio.c does not trap general serial I/Os.
It fauls to probe eather DSI Modem or others.

PR:		4657
Reviewed by:	phk
Submitted by:	Kenji Saito <marukun@mx2.nisiq.net>
1998-05-20 06:46:58 +00:00
Poul-Henning Kamp 4b9afc97a7 Change a data type internal to the timecounters, and remove the "delta"
function.

Reviewed, but not entirely approved by: bde
1998-05-19 18:48:30 +00:00
Tor Egge 2f1e70693d Add forwarding of roundrobin to other cpus. This gives a more regular
update of cpu usage as shown by top when one process is cpu bound
(no system calls) while the system is otherwise idle (except for top).

Don't attempt to switch to the BSP in boot().  If the system was idle when
an interrupt caused a panic, this won't work.  Instead, switch to the BSP
in cpu_reset.

Remove some spurious forward_statclock/forward_hardclock warnings.
1998-05-17 22:12:14 +00:00
Tor Egge 167a4d818c Use a higher priority interrupt vector for 8254 timer interrupts. 1998-05-17 21:15:18 +00:00
Poul-Henning Kamp c21410e119 s/nanoruntime/nanouptime/g
s/microruntime/microuptime/g

Reviewed by:	bde
1998-05-17 11:53:46 +00:00
Poul-Henning Kamp bdb8446393 The PnP code in 2.2.6 detects the Motorola ModemSurfer 56K,
but doesn't do much of anything with it.  I added it to siopnp_ids[]
and it was found and recognized as a serial port.

PR:		6605
Reviewed by:	phk
Submitted by:	Dave Marquardt <marquard@zilker.net>
1998-05-13 07:26:55 +00:00
Søren Schmidt e855c8bedc Oops, only apply the CHS size from lbasize thing when disk reports
"too big for CHS" ie 16383 cyls..
1998-05-11 15:30:43 +00:00
Steve Price a396970306 Add support for the Yamaha YMF-719.
PR:		6348
Submitted by:	Yoshiak Uchikawa <yoshiaki@kt.rim.or.jp>
1998-05-10 23:53:27 +00:00
Julian Elischer d210b3552c cleanup:
take out duplicated dump code
1998-05-07 01:15:23 +00:00
Julian Elischer 9b7408fe46 There is no dump routine for fd so give it an explicit NULL entry
in the SLICE table.
1998-05-06 23:35:36 +00:00
Julian Elischer 7f2f1b784e Add dump support to the DEVFS/slice code.
now we can actually catch our crashes :-)

Submitted by: Luoqi Chen <luoqi@chen.ml.org> (the man who's everywhere)
1998-05-06 22:14:48 +00:00
Søren Schmidt eb011aea8d Fix the 4-8G LBA geometry it was wrong.
Support >8G drives in CHS mode. This is done by guesstimating the
cylinder count from the LBA size reported. It works on my shiny
new Maxtor 11.5G drive, YMMV.

Reports from users of other big drives (read Quantum bigfoot's)
are welcome...
1998-05-05 14:27:26 +00:00
Poul-Henning Kamp b4362367e0 Detect USR PnP x2 modem.
PR:		6496
Reviewed by:	phk
Submitted by:	Kurt D. Zeilenga <Kurt@Boolean.NET>
1998-05-04 10:35:13 +00:00
Bruce Evans d86cac8647 Don't depend on "implicit int". 1998-05-01 18:30:02 +00:00
Bruce Evans 77849078bf Oops, the previous commit should have changed `i386' to `__i386__',
not `__i386'.
1998-05-01 16:40:21 +00:00
Julian Elischer 21a56c939e Submitted by: Doug Ambrisko <ambrisko@whistle.com>
make standard links for the first detected sound card.
1998-04-28 00:10:53 +00:00
Julian Elischer 1667f2b3e5 slice_device.c: permissions changes for SLICE devices
vn.c:		change time of SYSINIT scheduling.
wd.c		don't revert to fully closed state. ( may require more)
all in SLICE mode only.
1998-04-24 07:54:00 +00:00
Julian Elischer 1077fa97b3 When calling the open function, specify either FREAD and/or FWRITE
as leaving them both 0 has the same effect as not openning the device at all.
1998-04-23 22:09:55 +00:00
Eivind Eklund 57402d4df8 Add devfs support.
Submitted by:	somebody whose name escapes me :-(
1998-04-23 00:06:43 +00:00
Tor Egge beede91e58 Mask the interrupt before setting the corresponding bit in ipending if
the interrupt is already active.
Don't use lock prefix for operations on ipending.
Always use lock prefix for operations on iactive.
1998-04-22 22:49:29 +00:00
Julian Elischer afcdc872dc Bad144 support for the slice system (!)
Submitted by: luoqi@watermarkgroup.com (Luoqi Chen)

I'm amazed by this. Slice has only been checked in for 2 days..
1998-04-22 19:27:54 +00:00
Julian Elischer 26d3bf5f1b close() is no longer a SLICE method.
Close is simply an open with no-read and no-write once internal to SLICE
(it still exports a close to the rest of the kernel)
1998-04-22 10:25:27 +00:00
KATO Takenori 5e4832f65d PC-98 does not supports DMA automode lager than 65535 bytes. 1998-04-21 09:48:45 +00:00
KATO Takenori bb9b85aaeb Supports PC-98 again. 1998-04-21 09:46:14 +00:00
Søren Schmidt d264ed7a01 Enable DEVFS usage of the device (include opt_devfs.h> 1998-04-20 18:51:33 +00:00
Julian Elischer 3e425b968d Add changes and code to implement a functional DEVFS.
This code will be turned on with the TWO options
DEVFS and SLICE. (see LINT)
Two labels PRE_DEVFS_SLICE and POST_DEVFS_SLICE will deliniate these changes.

/dev will be automatically mounted by init (thanks phk)
on bootup. See /sys/dev/slice/slice.4 for more info.
All code should act the same without these options enabled.

Mike Smith, Poul Henning Kamp, Soeren, and a few dozen others

This code does not support the following:
bad144 handling.
Persistance. (My head is still hurting from the last time we discussed this)
ATAPI flopies are not handled by the SLICE code yet.

When this code is running, all major numbers are arbitrary and COULD
be dynamically assigned. (this is not done, for POLA only)
Minor numbers for disk slices ARE arbitray and dynamically assigned.
1998-04-19 23:32:49 +00:00
Bruce Evans 212b37ff18 Support compiling with `gcc -pedantic' (don't use hard newlines in
(asm) string constants).
1998-04-19 15:41:06 +00:00
Bruce Evans 1696756396 Support compiling with `gcc -pedantic' (don't use hard newlines in
(asm) string constants or hard long long constants).
1998-04-19 15:39:26 +00:00
Bruce Evans 721f74b7d3 Support compiling with `gcc-pedantic' (don't declare static arrays
with no size).
1998-04-19 15:36:12 +00:00
Peter Wemm 823833f19d Back out previous commit, obrien doesn't seem to be watching. The problem
is that the previous commit spammed a hacked 2.2-stable onto -current,
deleting the DMA support etc.  (I guess that's one way of minimizing diffs
between -current and -stable.. :-] )
1998-04-19 03:26:05 +00:00
David E. O'Brien cab9e31601 MFC (reduce diff w/-CUR, with hopes of getting DMA support into -STABLE)
1.128   (FUNCTIONAL: better sleep handling)
1.131   (STYLE: labels w/o stmt)
1.132   (STYLE: remove unused #includes)
1.141   (FUNCTIONAL: devfs bug, 2nd controler not showing)
1.144   (STYLE: dont shadow other vars)
1.150   (FUNCTIONAL: fix search bug)
1998-04-18 13:25:49 +00:00
KATO Takenori c243867df2 Support compiling with `gcc -ansi'. 1998-04-18 05:01:24 +00:00
Dag-Erling Smørgrav dc73342347 Seventy-odd "its" / "it's" typos in comments fixed as per kern/6108. 1998-04-17 22:37:19 +00:00
Dag-Erling Smørgrav cc88e287a6 Stop the screensaver before switching consoles. 1998-04-17 10:03:11 +00:00
Dag-Erling Smørgrav 604d46b6e5 Swapped "should we just return" and "should we stop the screensaver"
in scrn_timer() to avoid deadlock with graphical screensavers.
1998-04-16 09:41:55 +00:00
Bruce Evans 1d37f051c1 Finish supporting compiling with `gcc -ansi'. Fix missing `volatile's
in __asm() statements while I'm here.
1998-04-15 18:58:09 +00:00
Bruce Evans c1087c1324 Support compiling with `gcc -ansi'. 1998-04-15 17:47:40 +00:00
Bruce Evans 7e07ce2225 Support compiling with `gcc -ansi'. Fix missing `volatile's in __asm()
statements while I'm here.
1998-04-15 17:26:17 +00:00
Poul-Henning Kamp 9c2fa4dbce In pre-devfs days, /dev/psm0 had always been a non-blocking
device. But with devfs, currently, /dev/psm0 is the blocking device
and /dev/npsm0 is the non-blocking one.

DEVFS must stay consistent with the older behaviour.

PR:		6260
Reviewed by:	phk
Submitted by:	Kapil Chowksey <kchowksey@hss.hns.com>
1998-04-15 17:06:52 +00:00
Mike Smith a470e6686d Don't use INTR when only one device supports it.
Submitted by:	Satoh Junichi <junichi@astec.co.jp>
1998-04-13 17:45:56 +00:00
Poul-Henning Kamp 81aba7a19d Aic APM driver support for e.g. Toshiba T2400 notebook with internal
Adaptec SCSI (aic6360/aha152x) controller.

PR:		5382
Reviewed by:	phk
Submitted by:	Oliver Breuninger <ob@seicom.NET>
1998-04-12 12:11:31 +00:00
John Dyson 17d925335f Minor typo in the wd driver. The manifestation of this bug
is a tremendous perf decrease due to the disabling of advanced
features such as DMA, Ultra DMA, and 32bit mode.  This patch
might have been reported by someone else (I seem to remember
it.)
1998-04-11 20:09:39 +00:00
Søren Schmidt eea22fdf01 Do not clobber "heads" by &= in wdcommand use only &.
Spotted by: bde
1998-04-10 08:00:24 +00:00
Søren Schmidt 44779c5a1c Try to use the "right" CHS translations of a LBA device.
Drives bigger than 8.4G is still in question until I get a drive
to test on...
1998-04-09 17:46:45 +00:00
Søren Schmidt 2a42fd0952 Add LBA mode support for large drives.
Use config flags 0x1000 to enable LBA mode. It should be enabled in
the BIOS too to avoid geometry confusion.

One catch though, I'm not sure all BIOS's uses the 64head/63secs
translation, all mine does but....
1998-04-08 20:04:39 +00:00
Søren Schmidt 40a2ce6ee5 Fix a minor bug (|| instead of |) 1998-04-08 20:00:03 +00:00
Peter Wemm fa1ef19485 remove #ifdef declaration of npxproc, use globals.s and the extern always. 1998-04-06 15:50:29 +00:00
Poul-Henning Kamp 2eeb0e2ea0 Make read_random() take a (void *) argument instead of (char *) 1998-04-06 09:30:42 +00:00
Poul-Henning Kamp 9018b53439 Commit a much more functional version of this driver. 1998-04-05 19:26:08 +00:00
Tor Egge c547ef5cd4 Remove some unneeded statements that enabled interrupts. 1998-04-05 01:04:48 +00:00
Kazutaka YOKOTA a117d26a3d More fixes to deal with fonts:
- Set the correct value scp->font_size in init_scp().
- Set scp->font_size to FONT_NONE for VGA_MODEX.

Interim fix for a font problem:
- A kludge to display the correct font on some video cards.
  We should be able to load multiple fonts to the VGA plane #2 and switch
  between fonts by setting the font select register in the VGA sequencer.
  It appears that the current code isn't functioning as expected on
  some VGA cards (I have reports on Millenium and Mach64 cards).  This is
  either a bug in syscons or a hardware compatibility problem ;-<
  This kludge will always load only one font set at a time and always use
  the font page #0 on the plane #2.  It is an interim kludge until
  we find the exact cause and solution.

Small adjustment for mouse cursor handling:
- Turn off the mouse cursor early when changing video modes.

Video mode switch fixes:
- Stop the screen saver when changing video modes.
- Enclose the critical section with a pair of spltty()/splx().
- A kludge to prevent scrn_update() from accessing video memory in less-
  critical sections in video mode change; artificially turn on the
  UNKNOWN_MODE flag.

PR: bin/5899, bin/5907
Tested by: ache and a couple of users
OKed by: sos
1998-04-04 16:26:53 +00:00
Poul-Henning Kamp 00af9731c9 Time changes mark 2:
* Figure out UTC relative to boottime.  Four new functions provide
      time relative to boottime.

    * move "runtime" into struct proc.  This helps fix the calcru()
      problem in SMP.

    * kill mono_time.

    * add timespec{add|sub|cmp} macros to time.h.  (XXX: These may change!)

    * nanosleep, select & poll takes long sleeps one day at a time

Reviewed by:    bde
Tested by:      ache and others
1998-04-04 13:26:20 +00:00
Eivind Eklund 512f816a5d Shut up GCC. 1998-04-02 02:10:47 +00:00
Poul-Henning Kamp 227ee8a188 Eradicate the variable "time" from the kernel, using various measures.
"time" wasn't a atomic variable, so splfoo() protection were needed
around any access to it, unless you just wanted the seconds part.

Most uses of time.tv_sec now uses the new variable time_second instead.

gettime() changed to getmicrotime(0.

Remove a couple of unneeded splfoo() protections, the new getmicrotime()
is atomic, (until Bruce sets a breakpoint in it).

A couple of places needed random data, so use read_random() instead
of mucking about with time which isn't random.

Add a new nfs_curusec() function.

Mark a couple of bogosities involving the now disappeard time variable.

Update ffs_update() to avoid the weird "== &time" checks, by fixing the
one remaining call that passwd &time as args.

Change profiling in ncr.c to use ticks instead of time.  Resolution is
the same.

Add new function "tvtohz()" to avoid the bogus "splfoo(), add time, call
hzto() which subtracts time" sequences.

Reviewed by:	bde
1998-03-30 09:56:58 +00:00
Poul-Henning Kamp f0e35d62a2 Don't access "time" directly. 1998-03-29 12:18:12 +00:00
Poul-Henning Kamp 6efcc7f11d Replace direct access to time with getmicrotime(). 1998-03-29 12:15:57 +00:00
Poul-Henning Kamp 934f5f3306 Export MD5Transform in md5.c and remove a private version in random_machdep.c
md5 is standard as a consequence of this.
1998-03-29 11:55:06 +00:00
Eivind Eklund 0fd9336b7e Don't use fast interrupts when initialized through PnP. if_ed does
not support fast interrupts.

Noticed by:	bde
1998-03-29 03:22:19 +00:00
Bruce Evans 3c1300a6b3 Removed unused #includes. 1998-03-28 13:25:01 +00:00
Bruce Evans 08637435f2 Moved some #includes from <sys/param.h> nearer to where they are actually
used.
1998-03-28 10:33:27 +00:00
Warner Losh 9b5728dbde Remove unused cheat static. 1998-03-25 22:40:06 +00:00
Jonathan Lemon 640c4313af Add the ability to make real-mode BIOS calls from the kernel. Currently,
everything is contained inside #ifdef VM86, so this option must be
present in the config file to use this functionality.

Thanks to Tor Egge, these changes should work on SMP machines.  However,
it may not be throughly SMP-safe.

Currently, the only BIOS calls made are memory-sizing routines at bootup,
these replace reading the RTC values.
1998-03-23 19:52:59 +00:00
Peter Wemm 16c807f853 Remove these.
They have been replaced by different uuencoded binary files, so it would
have been nearly a 100% delta anyway.
1998-03-23 16:42:42 +00:00
Peter Wemm e93eb8a353 Several changes:
- Implement proper EISA probing.
 - Better support for the new transputer based host cards.
 - use standard termios settings, one can use the intial/lock devices.
 - use a simple bcopy since some cards/systems apparently don't support
   32 bit accesses.
 - hard reset and halt host card CPU prior to download in case of a soft
   restart.
 - recognize new remote module types (ASIC vs. CD1400 based)
 - a number of cosmetic changes (my fault, not Nick's)

Submitted by:  Nick Sayer <nsayer@quack.kfu.com>
1998-03-23 16:27:43 +00:00
Peter Wemm eaab5e9a66 New versions of Specialix host card download code.
Submitted by:  Nick Sayer <nick@quack.kfu.com>
1998-03-23 16:12:53 +00:00
Peter Wemm d5fe170b52 Merge from 2.2, plus some other changes. In the config file entry,
'vector siintr' isn't used since the handler is assigned internally.
1998-03-21 05:17:29 +00:00
Mike Smith 1b5691c329 Remove unuseful (and annoying) ENXIO printf. 1998-03-20 23:14:52 +00:00
David Greenman 4d88b7963a Protect against count of chars received being 0, which causes a panic
otherwise. Can apparantly happen with some firmware revs.

Submitted by:	Kouichi Hirabayashi <kh@mogami-wire.co.jp>
1998-03-18 20:52:28 +00:00
Søren Schmidt eb615e1788 Fixed missing filemark on close if data written to tape.
Don't try to flush buffers if the drive says it has none.
More error checking and reporting.

Hack: if drive hangs, it can be reset by issuing a mt -f device offline.

I've been able to make several 4G backups. However there is still problems
with some configurations. It is not clear if it is hardware or driver
problems yet.
1998-03-17 10:45:18 +00:00
KATO Takenori 61324207f1 Make EPSON_BOUNCEDMA a new-style option. 1998-03-17 09:11:03 +00:00
Poul-Henning Kamp 7ab95d0bab Be less draconian about the TSC if APM is configured, use it for
timecounting if APM-BIOS isn't found.
Be just as draconian about SMP as always, but explain it better.
1998-03-16 10:06:58 +00:00
Eivind Eklund 7db79065bd Remove an ifdef (to get linker errors instead of compile errors in the
absence of 'controller snd0').
1998-03-15 23:08:24 +00:00
Tor Egge c555a715f5 On SMP systems, initially follow the MP spec with regard to which pin
on the IOAPIC being connected to the 8254 timer interrupt.
Verify that timer interrupts are delivered. If they aren't, attempt
a fallback to mixed mode (i.e. routing the timer interrupt via the 8259 PIC).
1998-03-14 03:11:50 +00:00
Steve Price 6cc8ce08fe Correct an ethernet framesize mismatch that caused poor
device performance among other things.

PR:		4989, 5910
Submitted by:	Yoshikazu Goto <gotoh@ae.anritsu.co.jp>
1998-03-09 03:07:54 +00:00
Tor Egge 5dd528cd4e Remove special handling for resuming clock interrupt when using APIC_IO.
The `generic' vector stubs do the right thing.
1998-03-05 21:45:53 +00:00
Tor Egge 02c1dc3bbc When entering the apic version of slow interrupt handler, level
interrupts are masked, and EOI is sent iff the corresponding ISR bit
is set in the local apic. If the CPU cannot obtain the interrupt
service lock (currently the global kernel lock) the interrupt is
forwarded to the CPU holding that lock.

Clock interrupts now have higher priority than other slow interrupts.
1998-03-03 22:56:30 +00:00
Tor Egge 3163861c7b Forward the signal if the process runs on a different CPU. This reduces
the signal handling latency for cpu-bound processes that performs very
few system calls.

The IPI for forcing an additional software trap is no longer dependent upon
BETTER_CLOCK being defined.
1998-03-03 20:55:26 +00:00
Søren Schmidt 231f599691 First pre alpha Work In Progress commit of a IDE/ATAPI tape driver.
It does endeed work, but there is still some problems to solve.
I get a "nonrecovered data error" from time to time, but besides
this it has backed up several Gigs allready.

Please report any success/failure directly to me.

Thanks to Warner Losh for providing a drive to use in writing
this driver!
1998-03-01 18:57:29 +00:00
Poul-Henning Kamp 3301c800f5 Prevent the TSC from being used on APM machines, we have no idea if
it runs at a constant frequency.  This was less of an issue before,
because the TSC only interpolated in the HZ intervals, but now where
the timecounter is used all the way, this becomes much more visible.

Nit: Fix a printf which triggered the bde-filter.
1998-02-28 21:16:13 +00:00
Tatsumi Hosokawa 71cbe8e15a Support for "MAC address in CIS" type cards.
For example, IBM Creditcard Ethernet's MAC address is ALWAYS
"0:2:4:6:8:a" :-) without this code.
1998-02-27 14:29:51 +00:00
Mike Smith 47959c89b9 PCCARD-code related style nits, as requested.
Submitted by:	bde
1998-02-27 06:39:32 +00:00
Mike Smith 9a70f9f75f Fix some style nits and remove an unused header.
Submitted by:	bde
1998-02-27 05:38:32 +00:00
KATO Takenori 3ce6f1bf50 Fixed syntax error by recent changes to the queue macros. 1998-02-26 03:20:41 +00:00
Poul-Henning Kamp cb7cfa353d Add the smallest and least useful device-driver by a fair margin... 1998-02-24 22:08:05 +00:00
Steve Price 26fa14da33 Use port 0x110 to avoid PNP conflicts.
PR:		5614, 5781
1998-02-23 15:02:59 +00:00
Bruce Evans 168be6199e Quick fix for the i8254 timecounter often gaining 10 msec. 1998-02-23 00:11:25 +00:00
Jordan K. Hubbard 6bf2dcfc50 Add missing CLOCK_UNLOCK() before write_eflags().
Submitted by:	dave adkins <adkin003@tc.umn.edu>
1998-02-21 20:45:27 +00:00
Nate Williams 4bd4f74b5f there is a minor bug in sb_dsp.c -- the driver
reports ESS cards as able to do 16-bit, but it has no support for it.

Submitted by:	Luigi Rizzo <luigi@labinfo.iet.unipi.it>
1998-02-21 17:53:04 +00:00
Nate Williams 68c4406a91 A minor bugfix for my audio driver and pcaudio. The problem is with
signals delivered to a process writing to the audio device the
system: if you try

        cat /dev/zero > /dev/dsp (or cat /dev/zero > /dev/pcaudio)

and press Ctrl-C : for a second or two the system appears to freeze
(e.g. the cursor will disappear if you move the mouse, xclock
blocks, etc.). I think that interrupts etc. still run so the problem
is not too terrible, but still annoying

[ The problems appears to also be in isa/pcaudio.c, though that is ignored ]

Submitted by:	Luigi Rizzo <luigi@labinfo.iet.unipi.it>
1998-02-21 17:51:39 +00:00
KATO Takenori 2d67fcee71 Make pc98 options new-style. 1998-02-21 16:17:55 +00:00
Eivind Eklund c2469addb2 Make TUNE_1542 a new-style option, and enable this option in LINT. It
has been disabled since 1994 by mistake (or at least I hope so :-)
1998-02-21 10:11:43 +00:00
Poul-Henning Kamp 7ec73f6417 Replace TOD clock code with more systematic approach.
Highlights:
    * Simple model for underlying hardware.
    * Hardware basis for timekeeping can be changed on the fly.
    * Only one hardware clock responsible for TOD keeping.
    * Provides a real nanotime() function.
    * Time granularity: .232E-18 seconds.
    * Frequency granularity:  .238E-12 s/s
    * Frequency adjustment is continuous in time.
    * Less overhead for frequency adjustment.
    * Improves xntpd performance.

Reviewed by:    bde, bde, bde
1998-02-20 16:36:17 +00:00
Bruce Evans e31abede1f Don't depend on "implicit int" or bloat the data section in the
declaration of xxx_devsw_installed.
1998-02-20 13:46:58 +00:00
Bruce Evans 39e4376ba7 Removed unused #includes. 1998-02-20 13:11:54 +00:00
Steve Price ad64a9aade Don't propogate *_DEBUG options. Use DEBUG and recompile
only those parts of the kernel that you are interested in.

Prodded by:	Bruce Evans <bde@zeta.org.au>
1998-02-20 04:19:39 +00:00
Steve Price 8f50e70513 Cleanup the lpt for probe code.
PR:		5773
Submitted by:	Dag-Erling Coidan Smorgrav <dag-erli@ifi.uio.no>
1998-02-20 02:44:48 +00:00
Mike Smith 1f98b2eb0f Remove the 'qcam' driver. Development has ceased, and the driver is
nonfunctional.
Submitted by:	pst (conversation some time ago)
1998-02-18 13:43:59 +00:00
Nate Williams fc4c155508 - Removed unused files. 1998-02-17 19:18:10 +00:00
Nate Williams 0e6400c7f0 - Updated to Luigi's 2-15-98 code. The code in 2.2 is the same except for
select/poll and DEVFS changes, which are limited to an include/define
  in sound.h and the actual select/poll implementation in sound.c

[ This commit is blind, but the code is similar enough that there will
  hopefully be no problems. ]
1998-02-17 19:17:08 +00:00
Nate Williams 17c85b4825 - Remove files at shouldn't be in the tree. 1998-02-17 18:59:15 +00:00
Jordan K. Hubbard 861e99c812 Support for >32 ports.
PR:		5765
Submitted by:	Steve Gericke <steveg@comtrol.com>
1998-02-17 15:36:46 +00:00
Marc G. Fournier 45f4be3300 Upgrade Luigi's audio driver to Jan/23 version... will bring in Feb/15th
version as soon as I've tested it...

Installed/tested on my home machine...any problems, please report directly
to me.
1998-02-17 14:17:13 +00:00
Eivind Eklund d94f38ace2 Add HW_WDOG to LINT, and turn it into a new-style option. 1998-02-16 23:57:49 +00:00
Peter Wemm a397086e61 Update to support SI/XIO PCI host cards (Z280 based) and the enhanced
SXISA and SXPCI host cards (Transputer based).

PR: 4836, 5021, 5654
Submitted by:  Nick Sayer <nick@specialix.com>
1998-02-15 14:42:33 +00:00
Bruce Evans ee10b2a475 Removed a superstitious fnop() that broke the usefulness of the FPU's
"last instruction" pointer.
1998-02-15 06:25:26 +00:00
Nate Williams a021db1639 - If a PCCARD serial device is removed from the system, let the serial
driver 'break out' of the infinite loop waiting for a response from
  it.  This is a bad thing, but no worse than having the kernel hang.
1998-02-14 16:17:17 +00:00
Paul Traina 186a666128 Change wfd major block device to 1 as part of the effort to make wfd's
bootable without a big increase in boot2's size.
1998-02-13 22:41:00 +00:00
Poul-Henning Kamp aa7caaaeb8 Fix a couple of lines that dropped out in my merge yesterday.
Complained about by:	ache
1998-02-13 17:54:53 +00:00
Poul-Henning Kamp a4daaa09f2 Implement the spirit but not the letter of Terrys hot-char patch.
The differences Terrys patch and this patch are:
 * Remove a lot of un-needed comments.
 * Don't put l_hotchar at the front of stuct linesw, there is no need to.
 * Use the #defines for the hotchar in the SLIP and PPP line disciplines
1998-02-13 12:46:28 +00:00
Poul-Henning Kamp a744622f69 Hmm, it is generally an advantage to commit the most recent version of
ones changes:  A faster character painter procedure and fix on cursor
bug.
1998-02-13 11:31:34 +00:00
Bruce Evans 5883bcc9d2 Don't (conditionally) override the kernel's min() and max() functions
with macros.  This breaks if the functions are replaced by macros with
unsuitable semantics.   Define a MAX() macro unconditionally instead.
max() is unsuitable since we need a constant expression.  Don't define
MIN() - we never used min().
1998-02-13 07:09:38 +00:00
Bruce Evans 359888780e Ifdefed SMP-only declarations. 1998-02-13 06:59:22 +00:00
Bruce Evans cee45f8421 Don't generate warnings for test coverage checking when compiling LINT.
Generate code instead.
1998-02-13 06:49:16 +00:00
Bruce Evans 1d804e7925 Update timer0_prescaler_count before calling hardclock() while timer0
is "acquired".  This fixes a TSC biasing error of about 10 msec when
pcaudio is active.

Update `time' before calling hardclock() when timer0 is being released.
This is not known to be important.

Added some delays in writertc().  Efficiency is not critical here, unlike
in rtcin(), and we already use conservative delays there.

Don't touch the hardware when machdep.i8254_freq is being changed but
the maximum count wouldn't change.  This fixes jitter of up to 10 msec
for most small adjustments to machdep.i8254_freq.  When the maximum
count needs to change, the hardware should be adjusted more carefully.
1998-02-13 06:33:16 +00:00
Bruce Evans b01c51d18f Fixed staticization (the behaviour is undefined when something with
external linkage is redeclared as static).
1998-02-12 23:16:12 +00:00
Bruce Evans 76d43151d2 Unstaticized. 1998-02-12 22:33:33 +00:00
Poul-Henning Kamp 8a69c85a7e Add support for VESA mode 0x102 (800x600x4) in syscons. You can activate
this using option "-b" to the boot blocks.  It is smartest to compile
a font into your kernel (See LINT), but not mandatory, but apart from
the cursor you will see nothing on the screen until you load a font.

This mode allows XF86_VGA16 to run in 800x600 mode on otherwise unsupported
graphics hardware.

A number of buglets in the cursor handling in syscons may become
visible this way.
1998-02-12 22:05:08 +00:00
Bruce Evans cd59d49d07 Only use the i586-optimized copying and zeroing functions if they are
actually faster (more than 20% faster for zeroing 1 MB at boot time).
This fixes pessimized copying and zeroing on K6's and perhaps on other
CPUs that are misclassified as i586's.
1998-02-12 21:41:10 +00:00
Poul-Henning Kamp b9483c6b9b Fix a white-space nit which I happened to notice. 1998-02-12 20:52:24 +00:00
Kazutaka YOKOTA 409bd75190 Oops, sorry, a #define line for my debugging session slipped into
the last commit ;-<
1998-02-12 16:35:11 +00:00
Kazutaka YOKOTA 1ee1681798 - Move the mouse cursor to the center of the screen after video
mode switch in ioctl.
Possibly related to PR: kern/4271

- A kludge: initialize scp->xpixel and ypixel even in the text mode.
If the console enters the `unknown' graphics mode via the ioctl KDSETMODE
(KD_GRAPHICS), these fields are not set (because syscons cannot know
the correct values), but set_mouse_pos() need to refer to these field
to adjust the mouse position.

- Turn off MOUSE_VISIBLE when switching video mode by ioctl.

- another new option: SC_MOUSE_CHAR
Define the first character code of four consecutive codes to be used for
the mouse cursor.  Default codes are 0xd0 through 0xd3.  Beware that
if you decide to use any codes outside the range of 0xc0-0xdf,
the mouse cursor may not look good, because of the way VGA displays
characters in 9-dot-wide character cells.
Requested by several people.

(This patch was tested by a person who recently reported, in the -current
ML, a page fault problem in the kernel (draw_mouse_iamge()) after
X server shutdown. The patch cured his problem.)
1998-02-11 15:02:40 +00:00
Kazutaka YOKOTA 59f5eaf466 - A new semaphore: font_loading_in_progress.
Don't touch/update the screen while manipulating font data.
Possibly related to PR: kern/4271

- Set up VGA in alphanumeric mode rather than graphics mode when
loading font into video memory. This will drastically reduce flicker.
PR: bin/2977

- Set up scp->font_size properly during video mode switch caused by
ioctl.
1998-02-11 15:00:24 +00:00
Kazutaka YOKOTA f8a35e9cef - Break scrn_timer() into two pieces. Now screen update is done in a
separate routine: scupdate() called from scrn_timer().

- Make sure that the screen is updated for the low-level console
routines sccngetc() and sccncheckc().  A new routine, sccnupdate(),
is introduced and will call scupdate() above.
Requested by: bde and msmith

OKed by: sos
1998-02-11 14:58:15 +00:00
Kazutaka YOKOTA 4930cbfa04 - Ignore KBD_RAW_MODE and KBD_CODE_MODE in scgetc() when it's called
from the low-level console routines sccngetc() and sccncheckc().
Submitted by: bde (a long time ago)

- Don't try to ring bell and immediately return from do_bell() while
device probe is in progress at boot time; the timeout queue is not
functional yet.
PR: kern/2424

- Stop running the screen saver after panic() is called: check
if `panicstr' is non-NULL during scrn_timer().
PR: kern/5314

- A new option: SC_DISABLE_REBOOT
The reboot key (usually Ctl-Alt-Del) will be ignored if this option
is defined. You may still have the reboot key defined in the keymap and
it won't cause error when the keymap is loaded, but it will be quietly
treated as nop.

OKed by: sos
1998-02-11 14:56:02 +00:00
Eivind Eklund cebe467c61 Back out statification and restore a declaration that got lost. 1998-02-10 21:51:00 +00:00
KATO Takenori c8d28276a8 Support C-NET(98)S ethernet card (PC-98 only).
Submitted by:	Chiharu Shibata <chi@rd.njk.co.jp>
1998-02-10 03:22:20 +00:00
KATO Takenori 9148904aaa Staticize. 1998-02-10 02:51:32 +00:00
Peter Wemm 4390eccf7a Un-staticize. 1998-02-09 16:20:42 +00:00
Eivind Eklund 303b270b0a Staticize. 1998-02-09 06:11:36 +00:00
Eivind Eklund 0b08f5f737 Back out DIAGNOSTIC changes. 1998-02-06 12:14:30 +00:00
Eivind Eklund 09ae1abd69 Add PnP support to if_ed.c. 1998-02-05 04:08:41 +00:00
Eivind Eklund 47cfdb166d Turn DIAGNOSTIC into a new-style option. 1998-02-04 22:34:03 +00:00
Eivind Eklund 346ebe5115 Change LINT_PCCARD_HACK to COMPILING_LINT, and put it in its own header file
"opt_lint.h".  This should prevent the next person needing the same trick
from inventing their own option, too.
1998-02-04 04:41:37 +00:00
Bruce Evans da171a03a8 Use <machine/*.h> instead of <i386/include/*.h>. 1998-02-01 22:23:18 +00:00
Bruce Evans 9d00d065d6 Fixed a sloppy common-style declaration again. 1998-02-01 22:14:24 +00:00
Bruce Evans f0791ddea7 Fixed disordering of *cam* and splsoftvm. 1998-02-01 22:04:58 +00:00
Bruce Evans 909696cc72 Removed unused #includes. 1998-02-01 21:57:49 +00:00
Bruce Evans 8bcc577e92 Forward declare more structs that are used in prototypes here - don't
depend on <sys/types.h> forward declaring common ones.
1998-02-01 20:08:39 +00:00
Bruce Evans b163ce2f65 Fixed the search for free wd drives. The search was terminated
prematurely when there was a hole (for a cdrom or an unused
interface) in the sequence of wd drives.  This caused non-free
wd units to be probed as atapi drives.  There was no problem
provided the atapi probe failed correctly.
1998-02-01 19:10:04 +00:00
Eivind Eklund 3f2076daf5 Make the debug options new-style.
This also zaps a DPT option from lint; it wasn't referenced from
anywhere.
1998-01-31 07:23:16 +00:00
Eivind Eklund 828084926f Skip probing devices which have already probed true. 1998-01-31 03:29:00 +00:00
Eivind Eklund 26d8676da5 Include "opt_devfs.h". 1998-01-31 02:50:37 +00:00
John Hay 40f001c97d Don't clobber pp_flags when PP_KEEPALIVE must be set. 1998-01-30 19:49:54 +00:00
Paul Traina 5a00d1c6ed Remove obsolete strategy code that was replaced by the disk slice mapping code.
FreeBSD filesystems could be dammaged by repeatedly mounting and unmounting
several partitions.
1998-01-29 19:02:51 +00:00
Mike Smith 4a8aee409f Correct usage of unit to t->lun. This fixes the DEVFS case and the
"buggy Zip" message.
Suggested by:	Pedro A M Vazquez <vazquez@IQM.Unicamp.BR>
1998-01-29 06:42:12 +00:00
Poul-Henning Kamp 53dd848c82 APM calls inittodr(0) which is stupid, but at least stop setting the
clock back to when Dennis had a good idea.
1998-01-28 10:41:33 +00:00
Kazutaka YOKOTA ef65ade83a Define CTL-ALT-ESC as the `debug' key, CTL-ALT-SPACE as the `suspend'key
in all built-in keymaps.
1998-01-28 08:45:18 +00:00
Mike Smith c67d7e8aa2 Fix operation with the Iomega Zip 100 ATAPI.
All known versions of this drive (firmware 21.* and 23.*) will lock up
if presented with a read/write request of > 64 blocks.  In the presence
of such a unit, I/O requests of > 64 blocks are fragmented to avoid
this.
1998-01-27 16:49:35 +00:00
Mike Smith facf6a3fbe Check the status port after waiting for DRQ; some drives seem to be very
slow coming off the bus (eg. Iomega's ATAPI Zip).  Failure to do
this results in a false probe of an ATAPI device with garbage
data.
1998-01-27 16:45:23 +00:00
Kazutaka YOKOTA a364145b79 Small adjustment in sync check code. 1998-01-24 12:12:32 +00:00