Commit graph

11433 commits

Author SHA1 Message Date
Søren Schmidt e620a1cbed Make struct buf->b_offset reflect the real byte offset which got
in via the uio struct. This enables device drivers to use != DEV_BSIZE
blocking on devices with wierd sector/block sizes (ie CDROM's).
1998-08-19 10:50:32 +00:00
KATO Takenori e10741bfea Sync with sys/i386/isa/syscons.c revision 1.275. 1998-08-19 09:35:18 +00:00
KATO Takenori 41bf2268ba Sync with sys/i386/i386/machdep.c revision 1.304. 1998-08-19 09:32:15 +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
Bruce Evans 5cf40a698b A limit of 200000 for the output buffer high watermark was excessive,
since (hardware) ttys have too low a bandwidth to benefit significantly
from large buffers.  Use twice the old limit for the new-default case
and 8 times the old limit for the driver-specifies-watermark case.
Nothing uses these cases yet.

Removed related debugging code.
1998-08-19 04:01:00 +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
KATO Takenori 5827b1ee8d Delete dpt driver. 1998-08-19 02:41:51 +00:00
Andrey A. Chernov 22f05c4320 Implement DLT_RAW from libpcap 1998-08-18 10:13:11 +00:00
Mike Smith 287e61c39f Presently there is only one `currentldt' variable for all cpus
in a SMP system. Unexpected things could happen if each cpu
        has a different ldt setting and one cpu tries to use value
        of currentldt set by another cpu.

        The fix is to move currentldt to the per-cpu area. It includes
        patches I filed in PR i386/6219 which are also user ldt related.

PR:		i386/7591, i386/6219
Submitted by:	Luoqi Chen <luoqi@watermarkgroup.com>
1998-08-18 07:47:12 +00:00
Søren Schmidt 95332616af Fix one forgotten instance of \n to \r 1998-08-18 07:36:47 +00:00
Bruce Evans 1874ef935c Quick fix for breakage of read clustering on non-IDE drives. Read
clustering is obsolescent technology so hardly anyone noticed.  On
a DORS 32160 SCSI drive with 4 tags, read clustering makes very
little difference even for huge sequential reads.  However, on a
ZIP SCSI drive with 0 tags, the minimum overhead per block is about
40 msec, so very large clusters must be used to get anywhere near
the maximum transfer rate.  Using clusters consisting of 1 8K block
reduces the transfer rate to about 250K/sec.  Under msdosfs, missing
read clustering is normal and a cluster size of 1 512 byte block
reduces the transfer rate to about 25K/sec.

Broken in:	rev.1.18
1998-08-18 03:54:39 +00:00
Bruce Evans 18df27bda2 Fixed printf format errors. 1998-08-18 00:32:50 +00:00
Bruce Evans 450e9e37dc Converted rcsid to $Id$ again. There shouldn't be any rcsids in the kernel. 1998-08-17 19:26:37 +00:00
Bruce Evans 0492d857d1 Removed unused includes. 1998-08-17 19:09:36 +00:00
Bruce Evans bbd6948a3c Fixed printf format errors (none detected in GENERIC again). 1998-08-17 19:06:47 +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 f044cd02a2 Removed unused includes. Fixed disordering of includes. 1998-08-17 18:12:52 +00:00
Bruce Evans 084a3966cc Backed out previous commit. The seconds part of microtime() is
not the necessarily the same as the seconds part of getmicrotime()
yet, and anyway, we should have used `time_second' if we only wanted
a sloppy value for the seconds part.  There is no point in making
ibcs2's time(2) more efficient than FreeBSD's time(3).
1998-08-17 17:53:12 +00:00
Bruce Evans 2d2f8ae7ad Fixed nonsense overflow checking (checking that a long variable is less
than INT_MAX after it has possibly overflowed).

Removed an unused variable and its associated 2 style bugs.

Removed unused includes.
1998-08-17 17:28:10 +00:00
Bruce Evans 16e164e393 Oops, the previous commit was of a local version. 1998-08-17 16:58:02 +00:00
Bruce Evans c7e2a13256 FIxed typo (syntax error) in previous commit. 1998-08-17 16:46:33 +00:00
Doug Rabson cd1ab665c8 Don't use unaligned accesses when printing extended sense codes. 1998-08-17 09:24:31 +00:00
Doug Rabson e31fa854a0 Add macros for accessing device memory. 1998-08-17 08:57:05 +00:00
Doug Rabson a5f96f457f Add Miata system type and pull in the LOCATE_PCS macro from NetBSD. 1998-08-17 08:26:12 +00:00
Doug Rabson ca13e4a93b Add breakpoint() for BREAK_TO_DEBUGGER. 1998-08-17 08:21:31 +00:00
KATO Takenori 30b8d76d79 Sync with sys/i386/isa/lpt.c revision 1.70. 1998-08-17 08:21:09 +00:00
Doug Rabson bcf270989f Update to work with the new elf headers. 1998-08-17 08:06:31 +00:00
Doug Rabson e00c264242 Update to use elf_generic.h. 1998-08-17 08:05:55 +00:00
Doug Rabson e99a8ba0c4 Disable some unnecessary debugging code. 1998-08-17 08:04:42 +00:00
John Birrell b4869285da Remove support for NetBSD syscalls. 1998-08-17 03:46:10 +00:00
Bruce Evans 162886e237 Fixed printf format errors. 1998-08-17 01:05:25 +00:00
Bruce Evans 138d060a6e Fixed printf format errors. sppp_dotted_quad() was yet another private,
broken, version of inet_ntoa().  It should go away.
1998-08-17 00:29:34 +00:00
Bruce Evans 5afd0041c5 FIxed printf format errors. Most of them were exposed by our ntohl()
returning long.  There would be many more if int_32_t were not int.
1998-08-17 00:08:07 +00:00
Bruce Evans 72298f8fa6 Fixed printf format and spelling errors. Didn't fix related
description of DPT_SHUTDOWN_SLEEP in LINT.  Didn't add timestamps
so that the (combined?) sleep interval can be printed as intended
in the original printf.
1998-08-16 23:37:54 +00:00
Bill Paul e30938ce3a Import the (Fast) Etherlink XL driver. I'm reasonally confident in its
stability now. ALso modify /sys/conf/files, /sys/i386/conf/GENERIC
and /sys/i386/conf/LINT to add entries for the XL driver. Deactivate
support for the XL adapters in the vortex driver. LAstly, add a man
page.

(Also added an MLINKS entry for the ThunderLAN man page which I forgot
previously.)
1998-08-16 17:14:59 +00:00
Dag-Erling Smørgrav d08b9c139f Enable kernel dumps on SLICE systems. 1998-08-16 11:27:19 +00:00
John Polstra 317c91f4d4 Make ELF kernels build again. 1998-08-16 04:19:03 +00:00
John Polstra ca0154bc75 Revamp the ELF include files to better support architecture-independent
applications.  Here's how it works.

The kernel should include <machine/elf.h> to get the definitions
for the native architecture.  It can reference the various ELF
structures with generic names like Elf_Sym, Elf_Shdr, etc.  A define
__ELF_WORD_SIZE is also available with the value 32 or 64 as
appropriate for the native architecture.

Generic applications should include <elf.h>, which is just a wrapper
for <machine/elf.h>.

Applications such as object file dumpers that need to deal with
foreign ELF files can include <sys/elf32.h> and/or <sys/elf64.h>.
Both can be included from the same source file if desired.  The
structure names must be referenced using wordsize-specific names
like Elf32_Sym, Elf64_Shdr, etc.

I haven't change the alpha stuff, but I haven't broken it either.
1998-08-16 03:03:38 +00:00
Bruce Evans 6ebae469d0 Fixed a style bug (a long line) in the previous commit. 1998-08-16 01:47:19 +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 69ed480f48 pmap.c:
Cast pointers to (vm_offset_t) instead of to (u_long) (as before) or to
(uintptr_t)(void *) (as would be more correct).  Don't cast vm_offset_t's
to (u_long) just to do arithmetic on them.

mp_machdep.c:
Cast pointers to (uintptr_t) instead of to (u_long).  Don't forget
to cast pointers to (void *) first or to recover from integral
possible integral promotions, although this is too much work for
machine-dependent code.

vm code generally avoids warnings for pointer vs long size mismatches
by using vm_offset_t to represent pointers; pmap.c often uses plain
`unsigned int' instead of vm_offset_t and didn't use u_long elsewhere,
but this style was messed up by code apparently imported from mp_machdep.c.
1998-08-16 00:41:40 +00:00
Bruce Evans b55fb9dee6 Use an array of uintptr_t's instead of an array of u_longs to hold
address constants.  This fixes some warnings for conversions from
64-bit integers to 32-bit pointers on i386's with 64-bit longs.
vm86 still uses too many u_longs.
1998-08-16 00:05:05 +00:00
Bruce Evans 7cfd5f54cf Cast to `char *' instead of to u_long to help add byte offsets to
pointers.  Neither is portable, but "correct" casts to integral
types are much uglier - they lead to expressions like

        ptr = (struct struct_with_too_long_a_name *)(void *)(uintptr_t)
	    ((uintptr_t)(void *)ptr + offset);

Here the cast to the struct pointer is to match the surrounding
style of this file (and not depend on C's feature of properly
converting `void *' on assignment or cast), the `void *' casts are
because uintptr_t is only specified to work on `void *' pointers
(I missed this in about 100 lines of previous changes from [u]long
to [u]intptr_t), the outer cast to a uintptr_t is in case the
addition promoted the type, and the inner cast to a uintptr_t
corresponds to the one cast to an integer in the original code.

Don't depend on gcc's feature of casting lvalues.
1998-08-15 23:06:38 +00:00
Bruce Evans 160bd4c62f Oops, the printf format error fixes confused curp->area with a pointer. 1998-08-15 22:42:20 +00:00
Bruce Evans 24382fa41f Oops, the previous fix confused Linux's sigset_t with a pointer type.
It can be integral or a struct in POSIX, so it is difficult to print,
but it is actually declared as unsigned long.  Assume that it is
unsigned integral.
1998-08-15 22:29:43 +00:00
Bruce Evans f9d8181868 Fixed yet more ioctl breakage due to the type of the `cmd' arg changing
from int to u_long but not changing here.
1998-08-15 21:58:09 +00:00
Bruce Evans bd3513170b Made some disgusting ifdefs even more disgusting to enable the support
for `u_long cmd' ioctl args if __FreeBSD_version >= 300003.  Some ioctls
were broken on machines with 32-bit ints and 64-bit longs.
1998-08-15 21:51:53 +00:00