Commit Graph

3885 Commits

Author SHA1 Message Date
Joerg Wunsch b629f8ebbe Some bug fixes for the worm driver:
o  don't use polled mode after the device probe phase
o  don't biodone() a NULL buffer pointer
o  increase the timeout for scsi_read_capacity(); WORMs are slooow
o  make WORMMs known to scsiconf at all

This brings the driver in a state where it at least doesn't
immediately panic, nor hangs the controller any more.  Unfortunately,
at least the YAMAHA CDR100 i've been testing with answered my write
attempts with an "Incorrect command sequence" response.  Perhaps other
CD burners might work however.

Reviewed by:	dufault
1995-10-09 15:15:01 +00:00
Joerg Wunsch 86a727d96d BIOS manufacturers don't seem to have a unique idea about 2.88 MB
floppy drive types in the CMOS; add 0x50 as an alias for 2.88 MB.
1995-10-09 15:00:39 +00:00
David Greenman c79867680a Include <sys/systm.h> 1995-10-09 05:54:32 +00:00
Bruce Evans 029b0fc88f Fix tracing of syscalls. The previous fix required the undocumented
option DDB_NO_LCALLS to stop ddb getting control and broke all ddb
tracing.  Now there is no option and no way for ddb to trace at
address _Xsyscall or to _Xsyscall, but tracing everywhere else
works.  The previous fix did unnecessary things for Linux syscalls.

Don't bother checking that syscall frames are for user mode.

Make debugger traps inside the kernel (except at addresses _Xsyscall
and _Xsyscall+1) fatal if ddb is not configured.  They "can't happen".

Add prototypes.

Remove stupid comments, e.g., /*ARGSUSED*/ for args that are used.
1995-10-09 04:36:01 +00:00
Bruce Evans 4ab32c3430 Fix types of sysctl functions. Add prototypes. Cosmetic. 1995-10-09 04:06:28 +00:00
John Dyson f4a73b85ed Work-around a problem in the clustering code on non-VMIO buffers. The
write-side needs rewriting, but this makes a ktrace panic go away for
now.
1995-10-09 03:19:49 +00:00
Justin T. Gibbs eec7e07a40 Identify the 2940 *Ultra* SCSI adapter. We treat it as a normal 2940
for now since I don't have any documentation on this card yet and it
is software compatible with the earlier cards.

The 2940 *Ultra* is Adaptec's push to take SCSI to 20MHz bus rates.  Its
based on the aic7880 chip which is the successor to the aic7870.
1995-10-08 17:46:11 +00:00
Steven Wallace ab91e8eff2 Add #include <sys/sysproto.h> to get struct close_args and close
function prototype.
1995-10-08 00:09:00 +00:00
Steven Wallace ad7507e248 Remove prototype definitions from <sys/systm.h>.
Prototypes are located in <sys/sysproto.h>.

Add appropriate #include <sys/sysproto.h> to files that needed
protos from systm.h.

Add structure definitions to appropriate files that relied on sys/systm.h,
right before system call definition, as in the rest of the kernel source.

In kern_prot.c, instead of using the dummy structure "args", create
individual dummy structures named <syscall>_args.  This makes
life easier for prototype generation.
1995-10-08 00:06:22 +00:00
Steven Wallace 4170ff3e27 Update sysproto.h to reflect changes. 1995-10-07 23:57:04 +00:00
Steven Wallace a932a33de3 Fix misc formatting errors in makesyscalls.sh.
Add CPT_NOA type which is COMPAT with NOARGS -- do not produce argument
struct in sysproto.

Change accept, recvfrom, getsockname to CPT_NOA type.
Fix getrlimit, setrlimit argument #2 name to struct rlimit.
1995-10-07 23:56:20 +00:00
Steven Wallace 58440970f8 Remove compat int from wait_args structure since no longer used or desired. 1995-10-07 23:48:07 +00:00
Steven Wallace 93c9414e49 Remove compat_43 psuedo-argument hack, and replace with a better hack.
Instead of using a fake "compat" argument, pass a real compat int to function
if COMPAT_43 is defined.  Functions involved: wait4, accept, recvfrom,
getsockname.

With the compat psuedo-argument, this introduces an argument structure
that can have two possible sizes depending on compat options.
This makes life difficult for lkm modules like ibcs2, which would
have to guess what size used in kernel when compiled.  Also,
the prototype generator for these structures cannot generate proper sizes.

Now there is only one fixed structure and makes everybody happy.

I recommend these changes be introduced to 2.1 so that ibcs2, linux
lkm's generated for 2.2 can still run on a 2.1 kernel.
1995-10-07 23:47:26 +00:00
David Greenman aacd778ef0 Add SIOCGIFADDR support. 1995-10-07 20:34:30 +00:00
Bruce Evans c402cd1545 Restore my changes from revisions 1.8, 1.9 and 1.10. They were blown away
be the previous commit.  It didn't even compile.
1995-10-07 20:07:18 +00:00
David Greenman cd41fc123e Fix argument passing to the "freeer" routine. Added some prototypes. (bde)
Moved extern declaration of swap_pager_full into swap_pager.h and out of
the various files that reference it. (davidg)

Submitted by:	bde & davidg
1995-10-07 19:02:56 +00:00
Bruce Evans 821692d618 Return EINVAL instead of panicing for rename("dir1", "dir2/..").
Fixes part of PR 760.

This bug seems to be very old.
1995-10-07 10:14:12 +00:00
Steven Wallace 4887ee51b2 Remake generated files to reflect makesyscalls.sh changes 1995-10-07 06:29:30 +00:00
Steven Wallace f171307e84 Add new functionality to makesyscalls.sh:
o  optional config-file to set vars: sysnames, sysproto, sysproto_h,
	syshdr, syssw, syshide, syscallprefix, switchname, namesname, sysvec.
  o  change syntax of syscalls.master entry:
	remove argument count.
	add pseudo-prototype field defining function name and arguments.
  o  generates correct structure definitions for all system calls
	in sys/sysproto.h
  o  add type NOARGS:  same as STD except do not create structure in
	sys/sysproto.h
  o  add type NOPROTO:  same as STD except do not create structure or function
	prototype in sys/sysproto.h

New functionality provides complete prototype definitions.
Usefull for generating files for emulated systems like my new ibcs2 code.

Update syscalls.master to reflect new changes.  For example, read()
entry now looks like:

3	STD	POSIX	{ int ibcs2_read(int fd, char *buf, u_int nbytes); }

This is similar to how NetBSD generates these files.
1995-10-07 06:24:08 +00:00
Garrett Wollman 1cb55cbffc Put newline at end of log()ed messages so syslog can't fill up your
/var quite as fast.
1995-10-06 19:30:43 +00:00
Poul-Henning Kamp b49afdd5c4 use roundup2 to avoid a bunch of 64bit divides. 1995-10-06 09:56:51 +00:00
Poul-Henning Kamp 1784a84a1f Add roundup2(x,y) for when y is a power of two. 1995-10-06 09:56:26 +00:00
Poul-Henning Kamp b67501dcda Avoid some 64bit divides. 1995-10-06 09:47:58 +00:00
Poul-Henning Kamp e83e1865c0 A little hack to avoid a 64bit divide. Can go away if Gcc ever learns to
optimise 64bit stuff...
1995-10-06 09:43:32 +00:00
Poul-Henning Kamp a5eb0e27e4 Avoid a 64bit divide. 1995-10-06 09:42:11 +00:00
Jordan K. Hubbard 2bcff10177 matcd -> matcdc 1995-10-06 05:36:51 +00:00
Peter Wemm c196603b4d Part 2 of the overlapping kzip changes.
Submitted by:	Gary Jones(?) <gj@freefall>
1995-10-06 02:57:26 +00:00
Poul-Henning Kamp e8413d1db1 Make the netboot more tolerant about the config file. 1995-10-05 20:51:39 +00:00
Garrett Wollman 66800f5742 Convert ARP to use queue.h macros rather than insque/remque. While
we're at it, eliminate obsolete exposure of `struct llinfo_arp' to
the world.  (This dates back to when ARP entries were not stored in
the routing table, and there was no other way for the `arp' program
to read the whole table than to grovel around in /dev/kmem.)
1995-10-05 20:08:43 +00:00
Poul-Henning Kamp 16657f0ba9 Comment out, but don't delete stuff we don't use.
Classify in "gcc stuff" and "legitimate stuff".
1995-10-05 14:46:07 +00:00
Poul-Henning Kamp 92a69bc337 remove GCC divsi3 routines which are never used. 1995-10-05 10:32:47 +00:00
Jordan K. Hubbard 429e99f1d2 Change kernel name to make a more unique target for sed. 1995-10-05 04:34:30 +00:00
David Greenman edeea08413 1) Fixed irq logic so that it uses the kernel configured irq if it doesn't
match the board setting.
2) Fixed the warning message to properly print the irq mismatch (as opposed
   to the bit encoded value).
3) Add irq autodetection if the kernel has "?" or no irq specified.
4) Add missing splimp protection in ixioctl().
1995-10-05 03:01:13 +00:00
Bruce Evans f2caf6f548 Fix pollution of application namespace by declarations of kernel
functions.  The application header <sys/user.h> includes <vm/vm.h>
which includes <vm/lock.h>...

vm.h:
Don't include <machine/cpufunc.h>.  It is already included by
<sys/systm.h> in the kernel and isn't designed to be included by
applications (the 2.1 version causes a syntax error in C++ and the
current version has initializers that are invalid in strict C++).

lock.h:
Only declare kernel functions if KERNEL is defined.
1995-10-05 01:11:48 +00:00
Bruce Evans 9cdeffd562 Don't wait for output to drain in pppclose(). Discard output immediately
for the same reasons as in slclose().

Free the cblock in the canonical queue in pppclose().  This is a no-op in
the usual cases where the tty is being closed or the line discipline is
being switched back to the standard discipline, but it saves a cblock if
the line discipline is being switched to one that doesn't use the canonical
queue.

Add prototypes.  I use `extern' in prototypes for functions with bogus
linkage.  This should be fixed someday.

Continue cleaning up new init stuff yet again.
1995-10-05 00:33:27 +00:00
Jordan K. Hubbard 9e8433e6e0 This upgrades the driver for Cronyx-Sigma multiplexor boards
from version 1.2 to version 1.9.
Submitted by:	Serge Vakulenko, <vak@cronyx.ru>
1995-10-04 22:24:16 +00:00
Jordan K. Hubbard 1d8812734b I have applied my last changes correcting the bug in dgbselect() to it
and here is the patch.  Submit it please. Thank you!

BTW, there is a new option "NDGBPORTS". By default it is equal to
NDGB*16 and means the number of ports of all Digiboards for which the
tty structures are reserved. It can be set to the real value in config-file
like:

       options "NDGBPORTS=8"
Submitted by:	Serge A. Babkin <babkin@hq.icb.chel.su>
1995-10-04 21:51:26 +00:00
Garrett Wollman 6bb9a8e77d Make a whole bunch of PCB variables ints rather than shorts. There appear
to be no ill effects, and so far as Iknow none of the variables in
question depend on 16-bit wraparound behavior.  (The sizes are in
many cases relics from when a PCB had to fit inside a 128-byte mbuf.  PCBs
are no longer stored in that way, and the old structure would not have
fit, either.)
1995-10-04 20:49:03 +00:00
Julian Elischer 56c3ab883e find some way of letting a node know where in its parent's directory structure
it was referenced from.. stops a rather annoying panic, but
introduces a rather interesting but "I can live with it" bug
`ln a b ; mv a b; echo ?`
returns a rather than b..
I know why but I need to think of the 'correct' answer. at least this is 'safe'
1995-10-04 11:05:09 +00:00
Julian Elischer 4c1a35b2a6 fix REALLY STUPID bug/typo
don't look at the diffs.. it's too embarassing :)
1995-10-04 08:58:00 +00:00
Jordan K. Hubbard dce7e5c9d4 Add the kernel config file (only for 2.1) that I'll be using
to generate my special IDE CDROM installation boot floppy.
1995-10-04 08:25:24 +00:00
Julian Elischer 00c6cadad3 Submitted by: Juergen Lock <nox@jelal.hb.north.de>
Obtained from: other people on the net ?

1. stepping over syscalls (gdb ni) sends you to DDB, and returned
to the wrong address afterwards, with or without DDB.  patch in
i386/i386/trap.c below.

2. the linux emulator (modload'ed) still causes panics with DIAGNOSTIC,
re-applied a patch posted to one of the lists...
1995-10-04 07:08:04 +00:00
Joerg Wunsch 16b04b6ae7 Hide the "input/output timeout" messages behind the bootverbose case.
This message has been confusing innocent ft users.

It should go into 2.1 as well, it's a very simple fix.
1995-10-04 07:01:23 +00:00
Julian Elischer 2f5585d1ac add the file kern_conf.c so it can be compiled in when needed
for testing.. (for cdevsw_add and bdevsw_add)

make the lkm code use the new generic devsw add routines (if so required)
define these routines in conf.h so we can use them
1995-10-04 03:43:18 +00:00
Julian Elischer d8af1be3d9 add the file kern_conf.c so it can be compiled in when needed
for testing.. (for cdevsw_add and bdevsw_add)

make the lkm code use the new generic devsw add routines (if so required)
1995-10-04 03:42:39 +00:00
Julian Elischer ec477e8b5e add the file kern_conf.c so it con be compiled in when needed
for testing.. (for cdevsw_add and bdevsw_add)
1995-10-04 03:41:38 +00:00
Garrett Wollman e79adb8ed6 Finish 4.4-Lite-2 merge: randomize TCP initial sequence numbers
to make ISS-guessing spoofing attacks harder.
1995-10-03 16:54:17 +00:00
Bill Paul b6e1531773 Make swapgeneric.c compile and (sort of) work again.
This is really just a token gesture at this point. We can't really turn
on swapping here anymore because (I think) we need to do a namei() lookup
in order to get a vnode which we can pass to swaponvp(). But to do a
namei(), we need a properly initialized proc structure, and we don't
have one. (I was hopping to toss it proc0, but that isn't initialized
until later.) We could conceiveably fabricate a dummy proc structure
to make namei() happy, but that's too much work for too little payoff.

For now, swapgeneric's only remaining saving grace is that it lets
you set the root device with -a.
1995-10-03 14:49:38 +00:00
Jordan K. Hubbard 8e4115484c Whoops, I misunderstood this. IRQ *12* is a better GUS default. 1995-10-03 01:12:59 +00:00
Garrett Wollman 973f098aab Compress manual pages (if desired) in the obj directory rather
than in the installation destination.  Should make release-building
substantially faster.  The msun Makefile changes simple adapt to the new
scheme.
1995-10-02 20:02:05 +00:00
David Greenman ee709c2f32 Check for failure to map the interrupt. Not doing so will guarantee that
the machine will wedge later.
1995-10-02 14:04:33 +00:00
David Greenman df31aac551 Fixed bug where wrong thing was being checked for NULL before calling
free(), resulting in a panic. This happend whenever an irq had already
been allocated by another device (like something on the ISA bus).
1995-10-02 13:43:11 +00:00
Julian Elischer f8a760b32a actually compiles.. (previous commit was to just get it into the tree) 1995-10-02 10:15:40 +00:00
Julian Elischer 26453f354f Obtained from: well it has a relationship with the LKM code..
This is a place for all things to do with conf.c and conf.h
that are not machine specific.
Other things that are at present in i386/isa/conf.c might
migrate into here..
It's the first small step in cleaning up the device interface
to make it more dynamic and to assist in more modular drivers
(i.e. both loadable via LKMs and linked in..
e.g able to add a device without having to edit conf.c)

this code is not yet used and the whole thing will be conditionally
compiled in for a while till proven useful :)
1995-10-02 09:24:44 +00:00
Ugen J.S. Antsilevich 37afa1e829 Well..finally..this is the first part..it should take care of
matching IP options..Check and test this - i made only a couple
of rough tests and this could be buggy.. Ipaccounting can't use
IP Options (and i don't see any need to cound packets with specific
options either..)
More to come...
1995-10-01 21:52:50 +00:00
David Greenman 23e56ee8d7 Insert zeroed pages at the head of the zero queue rather than at the tail.
A measurable performance improvement results from the potential for the
page to be partially cached when it is eventually used.
1995-10-01 20:10:20 +00:00
Peter Dufault 84f1508aea Say so if a sense code is vendor specific. 1995-10-01 15:19:05 +00:00
Peter Dufault 5dde8b2750 Support the 1542CP by recognizing the new ID. Try to make future
1542 revs work by assuming the next few sequential ID codes are
new Adaptec boards and enabling them after printing a warning.

Conditionalize the informational boot messages with "if (bootverbose)".
1995-10-01 15:09:51 +00:00
David Greenman 7329854ac4 Two critical bugfixes:
1) "obj" was't initialized properly, resulting in an important vm_page_lookup
   always failing (resulting in a panic).
2) busy pages could be put on the cache queue or freed (resulting in a panic).
1995-10-01 05:50:27 +00:00
David Greenman 90b8a1a5c7 Make ATAPI support completely optional - if ATAPI isn't defined, the
original code/algorithm is used completely (with one bugfix). This makes
it "safe" to bring these changes into -stable.
1995-09-30 15:19:44 +00:00
Jordan K. Hubbard 5f614f1df9 Bring IDE CDROM support up to latest version (1.8a?) from Serge.
Submitted by:	vak@cronyx.ru
1995-09-30 00:11:19 +00:00
David Greenman 86d61837c8 Latest version from Matt Thomas. This version works with the newer
DC21041 NICs and with ZNYX cards.

Submitted by:	Matt Thomas
1995-09-29 19:52:10 +00:00
Bruce Evans abc260cb3f Fix FAT_CURSOR to give scanlines 0-15 instead of (the current start)-15. 1995-09-28 18:43:40 +00:00
Jordan K. Hubbard 0134f4737b o Support for CDIOCPREVENT and CDIOCALLOW ioctls that xcdplayer
were making and were no-brainers.  However, the xcdplayer
    eject button didn't work because xcdplayer gave up and didn't bother
    to try the EJECT ioctl anyway when CDIOCALLOW was not available.
    This all works now.

o   A change so that xcdplayer gets TOC entry data for the lead-out area
    on the disc.  Xcdplayer can now play the last track on a CD, which
    it would not do in earlier versions (but no one reported).
    Cdplayer gets the TOC data differently and it works in old and new
    versions.

o   Eliminated a race condition that caused the driver to sleep forever
    on very slow and heavily loaded systems on rare occasions when
    the system was doing lots of audio-related ioctls to the drive.

o   Fixed a problem where a locked drive could be unlocked by accessing
    one of the non-locking devs.  Door locking now follows the documented
    rules.

o   Made all wait channel strings unique to matcd.

Submitted by: Frank Durda IV <uhclem%nemesis@fw.ast.com>
1995-09-28 13:15:49 +00:00
Andrey A. Chernov 50c15f2110 Back out MTUDISC description per Garrett request, yet not ready 1995-09-27 19:12:20 +00:00
Andrey A. Chernov aa3b19e087 Document MTUDISC 1995-09-27 17:26:30 +00:00
Garrett Wollman e9a30d0016 Add newline at end of log message and reduce log level to INFO from NOTICE. 1995-09-27 15:00:49 +00:00
Poul-Henning Kamp 2b76bec4e6 if_ze.c was derived from if_ed.c about 42 (!) versions ago. It is now
scheduled for demolition.  This is a first step: get rid of if_zereg.h,
by adding the five extra definitions to if_edreg.h.
Also add some definitions which will become needed when if_ze.c gets
replaced entirely by pccard and if_ed.c.  (this is a 2.1.0 candidate)
1995-09-26 08:57:47 +00:00
Garrett Wollman e508a00419 Add BPF and IP multicast capabilities to the `tun' and `lp' network
interfaces.

Submitted by:	Bill Fenner <fenner@parc.xerox.com>
1995-09-25 16:57:54 +00:00
John Dyson 10d86e5e1f Re-enable read clustering. 1995-09-25 06:00:59 +00:00
John Dyson 0e27a03ffb Perform more checking for proper loading of the UPAGES when a process
is swapped in.  Also, remove unnecessary map locking/unlocking during
selection of processes to be swapped out.

This code might afford proper panics as opposed to spontaneous reboots
on certain systems.  This should allow us to debug these problems better.
1995-09-24 19:51:50 +00:00
John Dyson 22ba64e870 Significantly simplify the fault clustering code. After some analysis by
David Greenman, it has been determined that the more sophisticated code
only made a very minor difference in fault performance.  Therefore, this
code eliminates some of the complication of the fault code, decreasing
the amount of CPU used to scan shadow chains.
1995-09-24 19:47:58 +00:00
David Greenman b025187719 siostop() is a void function, so don't return a value. 1995-09-24 04:59:16 +00:00
David Greenman 2f82e60467 Check that the swap block is valid before including it in a cluster.
Submitted by:	John Dyson
1995-09-24 04:40:19 +00:00
John Dyson 164fd96f34 These changes fix a bug in the clustering code that I made worse when adding
support for EXT2FS.  Note that the Sig-11 problems appear to be caused by
this, but there is still probably an underlying VM problem that let this
clustering bug cause vnode objects to appear to be corrupted.

The direct manifestation of this bug would have been severely mis-read
files.  It is possible that processes would Sig-11 on very damaged
input files and might explain the mysterious differences in system
behaviour when phk's malloc is being used.
1995-09-23 21:12:45 +00:00
Peter Wemm 0d04cf6a1b Tone down the doom-and-gloom prediction if one enables the si driver.. 1995-09-23 08:52:30 +00:00
Garrett Wollman d7f570e630 Merge 4.4-Lite-2: update version number (we already have the same fixes).
Obtained from:	4.4BSD-Lite-2
1995-09-22 20:05:58 +00:00
Peter Wemm e0ad6557c5 Add some hooks visible from outside via nlist, so pstat can read the tty
state.
1995-09-22 20:00:12 +00:00
Garrett Wollman 6dfab5b1e1 Merge 4.4-Lite-2: always check the UDP checksum if it is present, even
if we are not generating checksums.  (Save a test in the input path.)
1995-09-22 19:56:26 +00:00
Stefan Eßer 77b573149a New approach to the PCI bus configuration mechanism probe problem:
- try to make sure there is any kind of PCI device
- if there is anything at port 0x0cf8, then check for mech. 1 or 2
1995-09-22 19:10:54 +00:00
Peter Wemm b769f8efd6 Remove the "Danger will robinson!" printf's at the start. I'm pretty happy
with the driver's stability now.  I've not had a single problem with it for
weeks..  All that remains is a bit of performance tuning, and finishing
the manpages.
1995-09-22 18:28:21 +00:00
Garrett Wollman 963e4c2a50 Fix BPf to generate a header mbuf for writes.
Fix loopback and discard interfaces to understand BPF writes.
(These two from Bill Fenner to fix PR 512.)

Move ifpromisc() from bpf.c to if.c as suggested by comment in BPF.
Send a notice to the log when promiscuous mode is enabled.
1995-09-22 17:57:48 +00:00
Garrett Wollman f001bbb882 Correct spelling error in MTUDISC code. 1995-09-22 17:43:37 +00:00
Peter Wemm 4dc45a5fa1 Remove duplicate definition for tcps_persistdrop, as added by davidg some
time ago.  I left in Garrett's one, because his was in the 4.4-Lite-2
location, making any diffs just that little bit smaller.

I presume this choice means that netstat needs to be recompiled before
"netstat -s" will give a meaningful answer on tcp stats.
1995-09-22 07:40:18 +00:00
David Greenman ecf0c3ce4f Shit! I changed the wrong doclusterread! ...Thanks to Steven Wallace and
Poul-Henning for convincing me that I should look at my mistake! :-)
1995-09-22 06:02:40 +00:00
David Greenman aee3c74900 Disable file read clustering until the bug(s) in vfs_cluster.c are fixed.
This should temporarily fix the sig 10/11 problems that people have been
having for the past 3 weeks.
1995-09-22 00:05:46 +00:00
Garrett Wollman 25f26ad85a Merge with 4.4-Lite-2: fix bug that caused getsockopt of IP_HDRINCL
to fail.

Obtained from:	4.4BSD-Lite-2
1995-09-21 19:59:43 +00:00
Garrett Wollman 3271ad14d8 Merge 4.4-Lite-2 by updating the version number.
Obtained from:	4.4BSD-Lite-2
1995-09-21 18:04:43 +00:00
Garrett Wollman 425f123ed4 Merge 4.4-Lite-2: update some declarations that we don't support anyway.
Obtained from:	4.4BSD-Lite-2
1995-09-21 17:58:07 +00:00
Garrett Wollman 2469dd60b7 Merge 4.4-Lite-2: use M_NOWAIT in in_pcballoc(), and return EACCES rather
than EPERM on illegal attempt to bind a reserved port.

Obtained from:	4.4BSD-Lite-2
1995-09-21 17:55:49 +00:00
Garrett Wollman 2180b92513 Merge with 4.4-Lite-2. This is actually a 64-bit fix; the second parameter
to in_control() is sometimes a pointer, and sometimes an integer, so use
u_long rather than int.

Obtained from:	4.4BSD-Lite-2
1995-09-21 17:50:45 +00:00
Garrett Wollman ef91e5283e Merge with 4.4-Lite-2. This involves changing the version number and
moving a declaration around.

Obtained from:	4.4BSD-Lite-2
1995-09-21 17:39:51 +00:00
Garrett Wollman 6c52bc4648 Merge with 4.4-Lite-2. This just adds a couple of tcpstat entries which
we don't currently set, but might in the future.
1995-09-21 17:29:13 +00:00
Stefan Eßer d4a471bda0 Add preliminary support for the 53c860 and 53c875 ULTRA SCSI chips,
and for the 53c810ap, the improved version of the 53c810.
The driver should work with all those controllers, but doesn't know
about any of their advanced features.
1995-09-21 17:27:28 +00:00
Garrett Wollman f138387af1 Add support in TCP for Path MTU discovery. This is highly experimental
and gated on `options MTUDISC' in the source.  It is also practically
untested becausse (sniff!) I don't have easy access to a network with
an MTU of less than an Ethernet.  If you have a small MTU network,
please try it and tell me if it works!
1995-09-20 21:00:59 +00:00
Garrett Wollman 2eeab93993 Only print `bpf: foo0 attached' if bootverbose. 1995-09-20 20:48:29 +00:00
David Greenman 0704324a55 Fix rounding bug in last commit that would have caused the problem to not
be completely fixed.
1995-09-20 13:01:17 +00:00
Jordan K. Hubbard 92e1dc86fa Add `visual' command to help menu.
Fix a small benign display bug.
Submitted by:	Michael Smith <msmith@atrad.adelaide.edu.au>
1995-09-20 12:07:22 +00:00
Poul-Henning Kamp 872fd9222e Missed these changes to the pccard stuff. Sorry Martin! 1995-09-20 07:23:51 +00:00
Jordan K. Hubbard 8355a05ba8 Now supports `expand all' and `collapse all'.
Now comes up in the old line-oriented interface by default for serial
and pcvt folk with a `visual' command for going to the visual interface.
Best of both worlds, no?
Submitted by:	Michael Smith <msmith@atrad.adelaide.edu.au>
1995-09-20 06:48:54 +00:00
Bruce Evans 2e69f359d1 Fix benign type mismatches in isa interrupt handlers. Many returned int
instead of void.
1995-09-19 18:55:37 +00:00
Bruce Evans c1b0bf4649 Update machine-generated files. 1995-09-19 13:56:09 +00:00
Bruce Evans d60a9ca6ab Oops. Avoid literal $Id in an awk string to stop cvs from substituting it. 1995-09-19 13:50:26 +00:00
Bruce Evans 3cb43dbdaf Generate prototypes for syscall-implementing functions. Put them in
<sys/sysproto.h> and use them (so far only) in kern/init_sysent.c.

Don't put $Id in generated files.

kern/syscalls.master:
I had to add some new fields to describe some non-orthogonal names.
E.g., the args struct for the syscall-implementing function foo()
is usually named `foo_args', but for getpid() it is named `args'.

sys/sysent.h:
sy_call_t is still incomplete to hide a couple of warnings.
1995-09-19 13:31:04 +00:00
Poul-Henning Kamp ccdbc84cba The stuff needed to remove a pccard with a sio port on it...
Not optimal, but pretty solid.
1995-09-19 12:37:41 +00:00
Bruce Evans 04cc52dfc3 Don't clear the session pointer in ptcclose(). It must be left alone
until the session leader exits so that a SIGHUP gets sent to the process
group and the pty slave gets revoked.
1995-09-19 12:26:47 +00:00
Julian Elischer d51afe9d38 added support for link, and remove (unlink)
can now ln /devs/disks/floppy/fd1.1200 to fd1
and remove unwanted dirs and devices etc.
Still has a fatal bug.. don't use yet :)
1995-09-19 07:32:01 +00:00
Stefan Eßer a3adc4f8c5 Revert most changes of previous commit.
Changes relative to 1.12:
- Put extra instruction between outl()/inl() sequence to prevent the
  old value being read back because of the bus capacitance.
- Additional check for existence of register at CONF2_ENABLE_PORT.
1995-09-18 21:48:39 +00:00
Garrett Wollman 5cbf3e086c Initial back-end support for IP MTU discovery, gated on MTUDISC. The support
for TCP has yet to be written.
1995-09-18 15:51:40 +00:00
Andrey A. Chernov f7f7fe111b Clear SC_OUTWAIT after checking of free clists, not before 1995-09-17 23:38:29 +00:00
David Greenman c87ad37e61 Check the return value from vm_map_pageable() when mapping the process's
UPAGES and associated page table page. Panic on error. This is less than
optimial and will be fixed in the future, but is better than the old
behavior of panicing with a "kernel page directory invalid" in pmap_enter.
1995-09-17 01:46:03 +00:00
Paul Traina 0b4a1769be Our existing Cyrix cache-disable code was short-cutting the steps for
setting the control register.  Make the read and write operations two
completely separate steps.

While we're at it, pull in the whole set of Cyrix cache control options
from NetBSD-current,  since a few motherboards do the right thing with
the Cyrix chip.

There is no option to disable the internal cache completely (yet).

Reviewed by:	pst
Obtained from:	NetBSD
1995-09-16 21:31:55 +00:00
Bruce Evans 191e1a59da Remove transitory labelling code. Labels are now handled by essentially
the original 4.4lite code.  Machine Specific Partitions are now handled
separately.
1995-09-16 17:04:06 +00:00
Bruce Evans 72b3459d61 Add comments about the bogus zeroing of the drive number for floppies
and the bogus dummy partition table.
1995-09-16 13:51:20 +00:00
Bruce Evans 45c7e5044d Fix recent breakage of non-floppies with 36 sectors/track.
Disable support for not looking at the label when booting from fd2d
(15-sector floppies in drive 2) and fd2b (other floppies in drive 2).
1995-09-16 13:03:59 +00:00
Nate Williams e21fd30049 When confronted with a drive that says there are 36 sectors/track,
ignore and set it to 18 sectors/track.  This allows FreeBSD to boot with
2.88MB floppies which are used in older ThinkPads.

Submitted by:	Random Net person whose name I lost
1995-09-16 05:02:37 +00:00
David Greenman 97e112628f Check for page being resident when doing I/O with /dev/kmem and return
EFAULT if it is not resident. This prevents the system from manufacturing
a zero-fill page for unused but allocated areas of the kernel's VM. This
should fix the "CMAP busy" panic that some people saw during system
startup.
1995-09-15 23:49:23 +00:00
Jordan K. Hubbard 6c11cc590a Make dsp0 work for playback.
Submitted by:	Alain Kalker <alain@Wit401402.student.utwente.nl>
1995-09-15 22:04:03 +00:00
Stefan Eßer 2d14418625 Another try to determine the PCI bus configuration mode (and whether
there is a PCI bus at all) ...

- Do not expect the chip sets to follow even very clearly expressed
  requirements of the PCI 2.0 spec.
- Do not read back the value just written to an I/O port without making
  sure that some other data have crossed the bus in between ...
1995-09-15 21:43:45 +00:00
Andreas Schulz 9af3551d46 Correct the calculation of the unit number. it is not minor(x) & 3. It need
to be shifted >> 3. The last bits are the partition info.
1995-09-15 10:45:42 +00:00
David Greenman 0937c08c4e 1) Killed 'BSDVM_COMPAT'.
2) Killed i386pagesperpage as it is not used by anything.
3) Fixed benign miscalculations in pmap_bootstrap().
4) Moved allocation of ISA DMA memory to machdep.c.
5) Removed bogus vm_map_find()'s in pmap_init() - the entire range was
   already allocated kmem_init().
6) Added some comments.

virual_avail is still miscalculated NKPT*NBPG too large, but in order to
fix this properly requires moving the variable initialization into locore.s.
Some other day.
1995-09-15 08:31:19 +00:00
David Greenman d69caef5ed Killed isa_allocphysmem() and isa_freephysmem(). They are completely used
functions. This file is disgusting; the isa DMA stuff is especially bad and
should be rewritten.
1995-09-15 03:10:06 +00:00
David Greenman 6ce5b54918 1) Don't double map the kernel page tables. The double mapping was never
used and went a long way toward confusing the code.
2) Fix proc0's initial stack to not be 48 bytes smaller than it needs to
   be.
3) Correct comment about 'first' arg to init386().
1995-09-15 02:13:18 +00:00
Stefan Eßer da42a6e8f3 Add vendor ID of Compaq, now that I found what it is ... 1995-09-14 23:24:29 +00:00
Stefan Eßer d7ea35fc88 Improved verification of configuration space accesses working:
Scan for devices instead of assuming that device 0 is present on bus 0
of every PCI motherboard.
1995-09-14 20:27:31 +00:00
Stefan Eßer 0d1d9baee5 Remove '#ifdef undef' that was only supposed to be in my local test version. 1995-09-14 17:26:24 +00:00
Garrett Wollman e1765236c2 Remove bogus (caddr_t) casts from FREE macros; they can obscure serious
bugs that the type-checking would otherwise have found.  (This has no
effect on anything that I noticed in the current system other than finding
the bug in some code that I am writing.)
1995-09-14 16:25:06 +00:00
John Dyson 21bf390418 Fixed a typo in vm_fault_additional_pages. 1995-09-14 13:42:52 +00:00
Stefan Eßer def1b9aa9a Do not include the verbose boot messages, if PCI_QUIET is defined. 1995-09-14 13:13:33 +00:00
Stefan Eßer 7324a7b336 Minor changes to the PCI probe messages. 1995-09-14 13:09:40 +00:00
Julian Elischer 55b7166d83 Submitted by: bde
prototype file follows the sources..
1995-09-14 06:17:28 +00:00
Garrett Wollman b6e3d50f4c Don't leak mbufs in an unusual error case in tcp_usrreq().
Reviewed by:	Andras Olah <olah@freebsd.org>
Obtained from:	Lite-2
1995-09-13 17:54:03 +00:00
Garrett Wollman 51823c3a93 If tcp_output() is unable to allocate space for a copy of the data waiting
to be sent, just clean up and return ENOBUFS rather than silently
proceeding without sending any of the data.  This makes it consistent
with the `#ifdef notyet' case immediately above.

Reviewed by:	Andras Olah <olah@freebsd.org>
Obtained from:	Lite-2
1995-09-13 17:36:31 +00:00
Stefan Eßer cda6791190 Make the PCI host bridge probe code more robust when dealing with chip sets
that use configuration mode 1, but still violate the PCI 2.0 specs ...
(Required for the Compaq Proliant, for example.)
1995-09-13 17:03:47 +00:00
Peter Wemm 832e06d4dc From Bruce Evans: (prototype related changes, other cleanups)
Add prototypes.  Use static for function definitions to match existing
prototypes.  Otherwise leave functions that should be static as extern.
TODO: declare everthing except sidriver and siintr as static.  I use
some new cdevs registration functions to do this for syscons and pcvt.

Fix siintr() to match its prototype in ioconf.c (don't return anything).
This may break the eisa support, but Julian says that eisa interrupts
never worked anyway.

(EISA support was never tested anyway - Peter)

Submitted by:	bde
1995-09-13 08:45:28 +00:00
Peter Wemm fbb8b7bb60 Move some kernel-only stuff to a kernel-only file.
Submitted by:	bde
1995-09-13 08:39:28 +00:00
David Greenman a89f7290be Increased SOMAXCONN from 5 to 32. 5 was too small a value for just about
any reasonably busy machine, and by any measure is a lousy "max" value.
32 was chosen after a careful analysis of typical listen queue depths
on several busy Internet servers (both web and ftp). I also intend to
add a statistics counter for dropped connection requests due to the limit
being exceeded.
1995-09-13 05:35:49 +00:00
Sean Eric Fagan e6df7bbb57 Unlock the vnode after checking permissions; this is necessary to prevent
a panic whenever an iBCS2 file is exec'd.

Obtained from: FreeBSD
1995-09-13 02:12:51 +00:00
John Dyson 6eab77f210 Fix really bogus casting of a block number to a long. Also change the
comparison from a "< 0" to "== -1" like it should be.
1995-09-12 14:42:43 +00:00
Stefan Eßer f7fe07b585 Introduce NCB_SCRIPT_PHYS and CCB_PHYS macros to find physical addresses
of NCR script labels and of command control block structure components.
This allows for easy modification of the actual virtual to physical
mapping operator used ...
Make all applicable references to physical address values use the above
macros instead of calls to vtophys().
1995-09-11 19:34:30 +00:00
Bruce Evans 5e3e8d2b88 Generate prototypes for VOP functions. I decided to keep the old-style
definitions even though the functions are inline.  If vnode_if.h was
compiled by a non-ANSI compiler, then `inline' would be defined away,
so vnode_if.h might compile correctly.
1995-09-11 16:05:16 +00:00
Bruce Evans 0efe304fe1 Fix benign type mismatch in a call to VOP_BMAP(). 1995-09-11 15:56:46 +00:00
Stefan Eßer 1be758653e Put back p_script component into NCR control block.
The driver currently doesn't use it, but ncrcontrol needs it
to print some script addresses relative to the script start.
1995-09-11 12:10:19 +00:00
Peter Wemm c91214d4b8 Restore two checks for TS_ISOPEN.. I managed to panic my machine
without them..  I thought TS_CONNECTED implied TS_ISOPEN, but apparently
that's not the case.
1995-09-11 06:28:38 +00:00
John Dyson 894048d71c Make sure that the prezero flag is cleared when needed. 1995-09-11 00:47:17 +00:00
John Dyson b1fc01b7da Fix an error that can cause attempted reading beyond the end of file. 1995-09-11 00:46:19 +00:00
John Dyson ccbb2f7226 Code cleanup and minor performance improvement in the faultin cluster
code.
1995-09-11 00:45:15 +00:00
Bruce Evans e7451974bb Make pcvt and syscons live in the same kernel. If both are enabled, then
the first one in the config has priority.  They can be switched using
userconfig().

i386/i386/conf.c:
Initialize the shared syscons/pcvt cdevsw entry to `nx'.

Add cdevsw registration functions.

Use devsw functions of the correct type if they exist.

i386/i386/cons.c:
Add renamed syscons entry points to constab.

i386/i386/cons.h:
Declare the renamed syscons entry points.

i386/i386/machdep.c:
Repeat console initialization after userconfig() in case the current
console has become wrong.  This depends on cn functions not wiring down
anything important.

sys/conf.h:
Declare new functions.

i386/isa/isa.[ch]:
Add a function to decide which display driver has priority.  Should be
done better.

i386/isa/syscons.c:
Rename pccn* -> sccn*.

Initialize CRTC start address in case the previous driver has moved it.

i386/isa/syscons.c, i386/isa/pcvt/*
Initialize the bogusly shared variable Crtat dynamically in case the
stored value was changed by the previous driver.

Initialize cdevsw table from a template.

Don't grab the console if another display driver has priority.

i386/isa/syscons.h, i386/isa/pcvt/pcvt_hdr.h:
Don't externally declare now-static cdevsw functions.

i386/isa/pcvt/pcvt_hdr.h:
Set the sensitive hardware flag so that pcvt doesn't always have lower
priority than syscons.  This also fixes the "stupid" detection of the
display after filling the display with text.

i386/isa/pcvt/pcvt_out.c:
Don't be confused the off-screen cursor offset 0xffff set by syscons.

kern/subr_xxx.c:
Add enough nxio/nodev/null devsw functions of the correct type for syscons
and pcvt.
1995-09-10 21:36:12 +00:00
Bruce Evans f2cb5630d0 cons.c:
Split off cdevsw initialization in cninit() into a new function
cninit_finish() that isn't called until all hardware device drivers
have been attached.  The bdevsw entry of the driver for the physical
console needs to be hooked after the physical driver has been
attached in case the attachment modified the entry.

Rearrange cninit() to avoid changing cn_tab until the driver for the
physical console has been initialized, so that the previous driver
(if any) can be used for debugging.

Start removing half-baked lint support.  bdevsw functions usually have
unused args but /*ARGSUSED*/ was used for only about 5% of them.

cons.h:
Declare cn_init_finish().

autoconf.c:
Call cn_init_finish().

Start adding prototypes.  Functions with bogus linkage (extern where
static is probably should be static) are explicitly declared as extern
so that the can be found easily (extern in a non-header is usually
wrong).

All:
Continue cleaning up init stuff: init functions shall be static;
INITs should be at the start of files...
1995-09-10 18:57:26 +00:00
Bruce Evans 6b435e575c Call output process in slstart() whether or not there is any output. As
in pppstart(), the output process may be overloaded to handle hardware
flow control and hardware output completions.

Don't wait for output to drain in slclose().  Discard output immediately.
New output is not prevented while processes are waiting for output to
drain (this is a bug), so the wait was sometimes forever.  Infinite
waits are also possible when CCTS_OFLOW is enabled and CTS is down.
Infinite waits were also caused by the above bug in slstart().

Start changing new init stuff yet again: rename unused arg `dummy'.

Reviewed by:	davidg
1995-09-10 12:22:59 +00:00