Commit Graph

10511 Commits

Author SHA1 Message Date
Poul-Henning Kamp
81aee63d19 Wrong header length used for certain reassembled IP packets.
PR:		6177
Reviewed by:	phk, wollman
Submitted by:	Eric Sprinkle <eric@ennovatenetworks.com>
1998-04-13 17:27:08 +00:00
Semen Ustimenko
72a43c1b0a Fixed autonegotiation. Card registers are now accessed via memory
not i/o space.
1998-04-13 14:15:40 +00:00
KATO Takenori
625c217460 Sync with sys/i386/isa/wd.c revision 1.156. 1998-04-13 08:35:37 +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
KATO Takenori
44ed0f3748 Sync with sys/i386/isa/wd.c revision 1.155. 1998-04-12 05:05:19 +00:00
KATO Takenori
66cc72d13d Fix the problem when SCSI ID is not contiguous.
Submitted by:	URATA Shuichiro <s-urata@nmit.tmg.nec.co.jp>
1998-04-12 04:48:11 +00:00
John Dyson
71af8fba17 Add aio_error decl. 1998-04-12 03:09:43 +00:00
Poul-Henning Kamp
aba558930b setsockopt() transports user option data in an mbuf. if the user
data is greater than MLEN, setsockopt is unable to pass it onto
the protocol handler.  Allocate a cluster in such case.

PR:		2575
Reviewed by:	 phk
Submitted by:	Julian Assange proff@iq.org
1998-04-11 20:31:46 +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
Poul-Henning Kamp
a2481bbe8e When pmap_pinit0() allocates a page for proc0's page directory,
kernal page table may need to be extended.  But while growing the
kernel page table (pmap_growkernel()), newly allocated kernel page
table pages are entered into every process' page directory. For
proc0, the page directory is not allocated yet, and results in a
page fault.  Eventually, the machine panics with "lockmgr: not
holding exclusive lock".

PR:		5458
Reviewed by:	phk
Submitted by:	Luoqi Chen <luoqi@luoqi.watermarkgroup.com>
1998-04-11 17:24:06 +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
Alexander Langer
7c2e3d329a Grammar police. 1998-04-10 00:09:04 +00:00
Søren Schmidt
f559a836a2 Add the new LBA mode support in the wd? config examples. 1998-04-09 22:28:57 +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
Nate Williams
c839c3ace3 - Whoops, better have the structure created before trying to use it in
the patch I just submitted.

Noticed by:     phk
1998-04-09 14:01:13 +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
Wolfram Schneider
5ddc8ded1d New mount option nosymfollow. If enabled, the kernel lookup()
function will not follow symbolic links on the mounted
file system and return EACCES (Permission denied).
1998-04-08 18:31:59 +00:00
Nate Williams
9d24fe0e45 - Fix bug I introduced a few months ago. If a driver fails the probe,
correctly unregister the interrupt from the system.

[ My fix is much simpler than the one provided in the PR ]

PR:		6249
1998-04-08 15:00:02 +00:00
Poul-Henning Kamp
5f88ec3625 Minor adjustments to the timecounting and proc0.
Mostly Submitted by:	bde
1998-04-08 09:01:53 +00:00
KATO Takenori
216949b446 Sync with sys/i386/boot/biosboot/README.serial revision 1.9. 1998-04-07 15:33:47 +00:00
KATO Takenori
7b0e2080ab Sync with sys/i386/isa/npx.c revision 1.58. 1998-04-07 09:09:41 +00:00
KATO Takenori
74a64e52c9 Sync with sys/i386/conf/files.i386 revision 1.196. 1998-04-07 09:08:27 +00:00
KATO Takenori
130eeca5d6 Sync with sys/i386/i386/machdep.c revision 1.294. 1998-04-07 09:07:53 +00:00
Peter Wemm
100ceca222 Today is not my lucky day. Fix missing brace and I got a request
to use EMLINK instead.
1998-04-06 19:32:37 +00:00
Peter Wemm
514bc6cb56 Fix VM86 compiles. a #include "opt_vm86.h" was missing, and the my_tr
variable was needed in the non-SMP case.

Submitted by:  Jonathan Lemon <jlemon@americantv.com>
1998-04-06 18:59:15 +00:00
Peter Wemm
193afe0189 Use a different errno (ELOOP (as sef mentioned) since the text that goes
with the error sounds ok for the condition) if O_NOFOLLOW gets a link.
1998-04-06 18:43:28 +00:00
Peter Wemm
0fdc628b41 Rather than let users get fd's to symlink files, make O_NOFOLLOW cause
an error if it gets a link (like it does if it gets a socket).  The
implications of letting users try and do file operations on symlinks
themselves were too worrying.
1998-04-06 18:25:21 +00:00
Peter Wemm
a66ae6f438 Back this out, allowing users to get a fd connected to a symlink is
just too dangerous.
1998-04-06 18:18:50 +00:00
Peter Wemm
b587fd008d Don't panic if a VOP_READ() gets through on a short link, Just Do It
(because we can :-).  This means you can open a link file (or pseudo-file
in the case of short links where the data is stored in the inode rather
than disk blocks) and read the contents.
However, trap any writes from the user as it's difficult to do the right
thing in all cases.  A link may be short and the user may be trying to
extend it beyond the limit and so on.  Although.. being able to re-target
a symlink without deleting it first might have been nice.
This stuff is a bit perverse since symlink() and readlink() calls can
end up actually being implemented as read/write vnode ops.

Reviewed by: phk
1998-04-06 17:44:40 +00:00
Peter Wemm
7e3426aa1f Implement a new open(2) flag: O_NOFOLLOW. This will instruct open
to not follow symlinks, but to open a handle on the link itself(!).
As strange as this might sound, it has several useful applications
safe race-free ways of opening files in hostile areas (eg: /tmp, a mode
1777 /var/mail, etc).  It also would allow things like fchown() to work
on the link rather than having to implement a new syscall specifically for
that task.

Reviewed by: phk
1998-04-06 17:38:43 +00:00
Peter Wemm
aacdc613e5 curproc is initialized in locore at the same time for both SMP and UP now. 1998-04-06 15:51:22 +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
Peter Wemm
e8b4f186cd add globals.s for data that is treated differently on SMP. 1998-04-06 15:49:35 +00:00
Peter Wemm
cf34ef61ee Use real types for the SMP pages being allocated rather than arrays of
ints.  Remove some no longer needed casts.  Initialize the per-cpu
global data area using the structs rather than knowing too much about
layout, alignment, etc.
1998-04-06 15:48:30 +00:00
Peter Wemm
0c8df3b4c5 clean up #ifdefs, define the variables that have to be per-cpu on SMP
in globals.s only and use externs always.
1998-04-06 15:46:17 +00:00
Peter Wemm
741643627f _curpcb is always defined in globals.s instead of here in #ifdefs 1998-04-06 15:44:31 +00:00
Peter Wemm
55caa497cb Bogus casts 1998-04-06 15:43:29 +00:00
Peter Wemm
56a5021bad Defunct, now part of globals.s 1998-04-06 15:42:54 +00:00
Peter Wemm
858118ef47 Rather than filling this file up with SMP .sets, use those from
globals.s instead.
Initialize curproc in the same place for both UP and SMP.
1998-04-06 15:42:26 +00:00
Peter Wemm
e3f5516d18 Generate #defines that the asm code can access for the per-cpu data
structures.
1998-04-06 15:40:10 +00:00
Peter Wemm
60392aa674 generate .sets for variables used in asm and C that are stored in per-cpu
space under SMP.
1998-04-06 15:39:09 +00:00
Peter Wemm
937288c5bb A pair of C structures used for laying out the SMP per-cpu data space. 1998-04-06 15:37:21 +00:00
Peter Wemm
5d0ef2fd65 some missing symbols 1998-04-06 15:33:02 +00:00
Poul-Henning Kamp
98b9590ef3 Use getmicrotime() for if_lastchange, 10msec is plenty precision. 1998-04-06 11:43:12 +00:00
Poul-Henning Kamp
2f5f6b74ca Use random() to find our initial xid. 1998-04-06 11:41:07 +00:00
Poul-Henning Kamp
9f7d4611b3 Use read_random() 1998-04-06 11:40:42 +00:00
Poul-Henning Kamp
33b0bb6af7 Use random() for seq numbers and read_random for CHAP challenge. 1998-04-06 11:40:17 +00:00
Poul-Henning Kamp
7cd5051bec Use random() rather then than homegrown stuff. 1998-04-06 11:39:04 +00:00
Poul-Henning Kamp
8184a0a4d1 Remove stuff related to microtime.s, which is gone. 1998-04-06 11:38:18 +00:00
Poul-Henning Kamp
9729e74321 Use getmicrotime insted of microtime, we only use the second part. 1998-04-06 11:37:17 +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
4cf41af3d4 Make a kernel version of the timer* functions called timerval* to be
more consistent.

OK'ed by:	bde
1998-04-06 08:26:08 +00:00
Amancio Hasty
e248ae96af take out opt_bktr.h from brooktree848.c 1998-04-06 07:57:55 +00:00
Poul-Henning Kamp
8e5db87cdb Remove the last traces of TUBA.
Inspired by:	PR kern/3317
1998-04-06 06:52:47 +00:00
Peter Wemm
a7017d7f9e Really make this compile..
Pointed out by: bde
1998-04-06 05:11:42 +00:00
KATO Takenori
237d5c328a Sync with sys/i386/isa/clock.c revision 1.119. 1998-04-06 03:38:18 +00:00
KATO Takenori
c8e4433596 Sync with sys/i386/isa/syscons.c revision 1.258. 1998-04-06 03:37:55 +00:00
Amancio Hasty
f7c015e72e Reviewed by: Amancio
Submitted by:	Frank Nobis  <fn@Radio-do.de>

Mods to view german cable tv and minor fix to correctly identify bt849.
1998-04-05 20:57:46 +00:00
Poul-Henning Kamp
9018b53439 Commit a much more functional version of this driver. 1998-04-05 19:26:08 +00:00
Andrey A. Chernov
aaf0bb1961 Print explanation diagnostics when mount is impossible
Submitted by: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
1998-04-05 13:10:11 +00:00
Poul-Henning Kamp
5704ba6a06 More fixes for the iterative case of nanosleep1 from bruce.
I hate the 2-arg time{spec|val}{add|sub} functions!
1998-04-05 12:10:41 +00:00
Poul-Henning Kamp
bfe6c9fabf Make the dummy timecounter run at 1 MHz rather than 100kHz (noticed by bde)
fix the itimer(REAL) handling.
1998-04-05 11:49:36 +00:00
Peter Wemm
d59fbbf6c8 If there is no error code, don't copyout the remaining time. (As
documented in the man page and the standards).  (and besides, nanosleep1
isn't setting it in this case at present anyway, so we'd be copying junk).
1998-04-05 11:17:19 +00:00
Poul-Henning Kamp
338418263d Fix nanosleep1 based on Bruces suggestion. 1998-04-05 10:28:01 +00:00
Andrey A. Chernov
80a39463c9 Remove unused atv.tv_usec = 0; from select/poll code 1998-04-05 10:03:52 +00:00
Peter Wemm
2257b488b9 tsleep() returns EWOULDBLOCK if the timeout expired. Don't return this
to usermode, otherwise sleep(3) fails, cron doesn't work, etc etc etc.
1998-04-05 07:31:44 +00:00
Peter Wemm
48e88c192e Maybe fix netkey. I am not sure how to test this.. 1998-04-05 05:19:00 +00:00
Peter Wemm
b90dcc0c5d Fix previous commit. Don't people read compiler messages or something?? 1998-04-05 02:59:10 +00:00
Tor Egge
c547ef5cd4 Remove some unneeded statements that enabled interrupts. 1998-04-05 01:04:48 +00:00
Poul-Henning Kamp
cc6447a365 Use microruntime() rather than doing it by hand. 1998-04-04 18:56:54 +00:00
Poul-Henning Kamp
91ad39c6b3 Handle double fraction overflow in nano & microtime functions (spotted by Bruce)
Use tvtohz() a place where it fits.
1998-04-04 18:46:13 +00:00
Poul-Henning Kamp
c90cdf29ba Substitute a panic for a undefined function so LINT will compile. 1998-04-04 18:07:01 +00:00
KATO Takenori
71dab323ee Sync with sys/i386/isa/syscons.c revision 1.257. 1998-04-04 17:18:09 +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
John Dyson
aec0bcdf5b Perhaps fix a problem that some drivers have that they don't properly
initialize the b_kvasize element.  This might fix some of the split
I/O requests that some people have.
1998-04-04 05:55:05 +00:00
KATO Takenori
18352eee9a Sync with sys/i386/isa/wd.c revision 1.152. 1998-04-02 11:06:59 +00:00
Poul-Henning Kamp
4ff16568be Try to fix poll & select after I broke them. 1998-04-02 07:22:17 +00:00
Eivind Eklund
512f816a5d Shut up GCC. 1998-04-02 02:10:47 +00:00
Tor Egge
5758c2de94 Add two workarounds for broken MP tables:
- Attempt to handle PCI devices where the interrupt is
	  an ISA/EISA interrupt according to the mp table.

	- Attempt to handle multiple IO APIC pins connected to
	  the same PCI or ISA/EISA interrupt source.  Print a
	  warning if this happens, since performance is suboptimal.
	  This workaround is only used for PCI devices.

With these two workarounds, the -SMP kernel is capable of running on
my Asus P/I-P65UP5 motherboard when version 1.4 of the MP table is disabled.
1998-04-01 21:07:37 +00:00
Tor Egge
300e9a7696 Declare some variables modified by interrupt handlers as volatile. 1998-04-01 20:38:28 +00:00
Poul-Henning Kamp
460608e768 Fix an off by 1<<32 error. 1998-03-31 10:47:01 +00:00
Poul-Henning Kamp
75da0aa298 Add a dummy timecounter until we find the real thing(s). 1998-03-31 10:44:56 +00:00
KATO Takenori
e40c3a225b Cosmetic. Move a blank line. 1998-03-31 09:37:44 +00:00
KATO Takenori
2dbeac88d1 Sync with sys/i386/i386/trap.c revision 1.125 and sys/i386/isa/clock.c
revision 1.118.
1998-03-31 07:53:13 +00:00
Jean-Marc Zucconi
c61333539c Add an ioctl to retrieve the next writable address.
Defer the WRITE SESSION command until the first write command, so that
it works like the prepare track command, allowing the device to be
closed after the command.
1998-03-31 01:56:29 +00:00
KATO Takenori
2d6b7367bc - Use existing file (psm.c) though the driver does not work under
PC-98 arch.
- Merge the change in sys/i386/conf/files.i386 revision from 1.187 to
1.188.
1998-03-30 12:36:16 +00:00
KATO Takenori
95e9ae97a6 Merge the change in sys/i386/boot/rawboot/Makefile revision from 1.7
to 1.8.

Forgotten by:	kato
1998-03-30 12:24:12 +00:00
KATO Takenori
ea73828adc Added missing #include's. 1998-03-30 12:10:02 +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
John Dyson
006b9b7df9 Correct a significant problem with the softupdates port. Allow fsync
to work properly within the softupdates framework, and thereby eliminate
some unfortunate panics.
1998-03-29 18:23:44 +00:00
KATO Takenori
7f3e28046d Sync with sys/i386/isa/if_ed.c revision 1.138. 1998-03-29 12:48:46 +00:00
KATO Takenori
ebec4c06c1 Sync with sys/i386/i386/trap.c revision 1.124. 1998-03-29 12:48:01 +00:00
KATO Takenori
15edc4b569 Sync with sys/i386/isa/if_ed.c revision 1.137. 1998-03-29 12:45:39 +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
Peter Wemm
00d21a1337 regenerate 1998-03-29 08:04:49 +00:00
Peter Wemm
1e8dabab3f The linux chown syscall is more like lchown, a new chown syscall that
follows links was added.
1998-03-29 07:59:10 +00:00
Wolfgang Helbig
94316d1ddb pcics are devices not controllers. 1998-03-29 07:58:03 +00:00
Peter Wemm
d5e73b9fe5 Patch up some space/tab problems. It looks like some of this came
from an xterm via cut/paste.  No other changes apart from whitespace.
1998-03-29 07:53:19 +00:00
Peter Wemm
c740a51211 Add in placeholders for the newer linux syscalls 1998-03-29 06:35:22 +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
Peter Dufault
adc5342c47 The system call stubs for the sched_* system calls can't be
optional.

The kernel will now link but the new system calls can't be LKM'd in
without the P1003_1B option - I will remove this option later.
1998-03-28 22:44:28 +00:00
Peter Dufault
7c9f6f8f8b Remove duplicate comment 1998-03-28 18:16:29 +00:00
Steve Price
b9921401f1 Don't allow the readdirplus routine to be used in NFS V2.
PR:		5102
Reviewed by:	msmith
Submitted by:	Dmitry Kohmanyuk <dk@farm.org>
1998-03-28 16:05:05 +00:00
Peter Dufault
38c76440b8 Include sys/resource.h to get PRIO_MAX. 1998-03-28 14:49:47 +00:00
Bruce Evans
3c1300a6b3 Removed unused #includes. 1998-03-28 13:25:01 +00:00
Bruce Evans
8c375f5868 Don't export anything from <sys/socket.h> except AF_MAX from here.
This only affects the KERNEL case.

Don't include <sys/radix.h> twice for the KERNEL case.  This fixes
a mismerge from Lite2.

Don't include <sys/radix.h> at all for the !KERNEL case.  This fixes
a wrong cleanup in Lite2.
1998-03-28 12:13:01 +00:00
Bruce Evans
771b51ef7b Don't depend on <sys/mount.h> including <sys/socket.h>. 1998-03-28 12:04:40 +00:00
Peter Dufault
8a6472b723 Finish _POSIX_PRIORITY_SCHEDULING. Needs P1003_1B and
_KPOSIX_PRIORITY_SCHEDULING options to work.  Changes:

Change all "posix4" to "p1003_1b".  Misnamed files are left
as "posix4" until I'm told if I can simply delete them and add
new ones;

Add _POSIX_PRIORITY_SCHEDULING system calls for FreeBSD and Linux;

Add man pages for _POSIX_PRIORITY_SCHEDULING system calls;

Add options to LINT;

Minor fixes to P1003_1B code during testing.
1998-03-28 11:51: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
Bruce Evans
8781d8e928 Fixed style bugs (mostly) in previous commit. 1998-03-28 10:18:26 +00:00
Bruce Evans
812d997c85 Get socket and locking stuff by including <sys/socket.h> and <sys/lock.h>,
not by including <sys/mount.h> and depending on namespace pollution in it.
1998-03-28 08:07:12 +00:00
Andrey A. Chernov
32d3966f1a Fix dead hang writing to FAT
Submitted by: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
1998-03-28 07:22:03 +00:00
Stefan Eßer
a0f4d79940 Add two VLSI chip set components: 82C592 and 82C593
Submitted by:	Warner Losh <imp@village.org>
1998-03-27 20:36:54 +00:00
Peter Wemm
4acf4a68c9 When building in in the kernel rather than as a LKM, don't compile
all the LKM load/unload junk, and don't forget to register the SYSINIT
so that the cdevsw entry is attached.

BTW: I think the way it builds it's /dev nodes on the fly as an LKM with
vnode ops is kinda cute - I guess that'd be one way to solve the devfs
persistance problems.. :-)  (ie: have the drivers make the nodes in /dev
on disk directly if they are missing, but leave them alone if present).
1998-03-27 18:08:08 +00:00
Peter Wemm
5e9135b2e1 allow open on all minors 1998-03-27 18:03:13 +00:00
Peter Wemm
5c3a5f4a20 A fix for a link down route cleanup panic, when the route cleanup
pulls the rug out from underneath itself.

Obtained from: wollman (a few months ago, I've been using this for ages)
1998-03-27 14:30:18 +00:00
Peter Wemm
26cf9c3b75 Enable the use of soft updates on the root filesystem. Previously, the
softdep mode could only be activated on the initial mount of a filesystem
and then only if it was a read-write mount.  A 'mount -r' (as done in the
rootfs mount) followed by a 'mount -u' to convert to read-write didn't
start softdep mode.
1998-03-27 14:20:57 +00:00
Poul-Henning Kamp
c6bcf724da Split the padding out into a separate function.
Synchronize the kernel and libmd versions of md5c.c

PR:		misc/6127
Reviewed by:	phk
Submitted by:	Ari Suutari <ari@suutari.iki.fi>
1998-03-27 10:23:00 +00:00
John Dyson
f9be84912c Correct a problem where buffers might not be zeroed when needed. The
B_MALLOC buffers might not have been properly zeroed.
1998-03-27 06:48:24 +00:00
Peter Wemm
cbd71a62bb Give this a shot at actually working as an LKM.. 1998-03-27 04:05:08 +00:00
Poul-Henning Kamp
a0502b19d4 Add two new functions, get{micro|nano}time.
They are atomic, but return in essence what is in the "time" variable.
gettime() is now a macro front for getmicrotime().

Various patches to use the two new functions instead of the various
hacks used in their absence.

Some puntuation and grammer patches from Bruce.

A couple of XXX comments.
1998-03-26 20:54:05 +00:00
Warner Losh
9b5728dbde Remove unused cheat static. 1998-03-25 22:40:06 +00:00
Peter Wemm
8209dfe2f4 Quieten a debug message.. This happens under "normal" operation by 4 bytes
on a frequent enough rate to be annoying.  There is a real bug somewhere,
but it looks harmless enough.
1998-03-25 14:28:28 +00:00
Garrett Wollman
3d4d47f398 Use the zone allocator to allocate inpcbs and tcpcbs. Each protocol creates
its own zone; this is used particularly by TCP which allocates both inpcb and
tcpcb in a single allocation.  (Some hackery ensures that the tcpcb is
reasonably aligned.)  Also keep track of the number of pcbs of each type
allocated, and keep a generation count (instance version number) for future
use.
1998-03-24 18:06:34 +00:00
Jonathan Lemon
098171734b Fix a stupid bug where I was returning the wrong value. It's a wonder
this code even worked in the first place.
1998-03-24 16:51:36 +00:00
Jonathan Lemon
eefbfc25cb Only read the cr4 register if the cpu_feature flag indicates the machine
has VME support.

Noticed by: kato
1998-03-24 16:47:12 +00:00
KATO Takenori
b53480bf6f PC-98 does not have a BIOS call to get memory size. 1998-03-24 08:29:05 +00:00
KATO Takenori
c85e487d23 Sync with sys/i386/i386/machdep.c and trap.c revisions 1.293 and
1.123, respectively.
1998-03-24 08:27:21 +00:00
KATO Takenori
469057f93e Sync with sys/i386/conf/files.i386 revision 1.195. 1998-03-24 08:26:02 +00:00
Kazutaka YOKOTA
c4118fc0b0 Describe the SC_DISABLE_REBOOT option. 1998-03-24 02:55:03 +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
59088db3cb si driver has changed microcode file locations. 1998-03-23 16:44:22 +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
Jun-ichiro itojun Hagino
6d8df845b0 key_getspi() bugfix.
Submitted by:	k-sugyou@ccs.mt.nec.co.jp
1998-03-23 14:49:12 +00:00
Bruce Evans
3d2d6cc3d8 Forward declare even more structs to restore some self-sufficiency.
Didn't fix new dependence on <ufs/ufs/inode.h> and its prerequisites.
1998-03-23 14:12:37 +00:00
Bruce Evans
957f617878 Fixed syntax errors. 1998-03-23 14:06:25 +00:00
Bruce Evans
35ec516616 Don't depend on namespace pollution to help misdeclare pointers as arrays. 1998-03-23 14:05:25 +00:00
Bruce Evans
bd7ac1b26b Added a forward struct declaration so that this file is less
self-insufficient.
1998-03-23 13:58:02 +00:00
Bruce Evans
bf9a92b782 FixedSpellingErrorInAFunctionname. 1998-03-23 12:28:31 +00:00
John Birrell
fb52ada2d6 Add vm_ooffset_t and vm_pindex_t that FreeBSD uses (but NetBSD doesn't).
Ugh, this is for user code that looks into vm_map_entry. I'd shoot
it but semi-automatic guns aren't legal here anymore. 8-(
1998-03-23 08:17:16 +00:00
Peter Wemm
880dcadfce ppp-2.3.x ships with a bad compression number for deflate. It uses number
24 (which is magnalink!) rather than the correct 26.

Initial attempt at a compatability kludge that will negotiate for either
but will prefer to use the correct deflate compression type.
1998-03-22 06:51:57 +00:00
Peter Wemm
52403fe6de Update kernel parts of ppp to ppp-2.3.3. Not much has changed except
that the deflate components use zlib 1.0.4 instead of zlib 0.95.
1998-03-21 20:56:16 +00:00
Peter Wemm
e1ddf71b7b Make it compile.. missing "opt_ipfilter.h" and missing <sys/malloc.h> 1998-03-21 14:42:45 +00:00
Peter Wemm
1689d8bdca Add IPFILTER, IPFILTER_LOG and note IPFILTER_LKM. 1998-03-21 14:13:47 +00:00
Peter Wemm
0be272dc79 Some patchups for when this code is compiled in userland (!). 1998-03-21 13:37:44 +00:00
Peter Wemm
09410d0f8b On most other systems "out there", <net/if.h> does not require the caller
to #include <sys/time.h> first.  I've lost count of the number of times
I've had to patch this in porting code.  The problem is the
"struct timeval ifi_lastchange" in the mib stats.  (most other systems don't
have this, until 4.4bsd anyway).
1998-03-21 13:36:20 +00:00
Peter Wemm
cf3fd327f4 replaced by FreeBSD specific version 1998-03-21 11:36:36 +00:00
Peter Wemm
1ee25934a9 Make this compile.. There are some unpleasing hacks in here.
A major unifdef session is sorely tempting but would destroy any remaining
chance of tracking the original sources.
1998-03-21 11:34:28 +00:00
Peter Wemm
48cb3612ce Merge vendor changes from 3.2.1 -> 3.2.3 onto mainline 1998-03-21 10:20:13 +00:00
Peter Wemm
65c83eff1e This commit was generated by cvs2svn to compensate for changes in r34742,
which included commits to RCS files with non-trunk default branches.
1998-03-21 10:11:54 +00:00
Peter Wemm
27064bb159 Import kernel parts of ipfilter v3.2.3 1998-03-21 10:11:54 +00:00
Peter Wemm
c0a3aab811 zap 'vector siintr' from example si0 config 1998-03-21 06:21:03 +00:00
Peter Wemm
d53b8e5f34 merge from 2.2 1998-03-21 06:17:14 +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
John Dyson
9eebcfcf8c Softdep_sync_metadata appears to expect that it is called at splbio,
so make it so...
1998-03-21 05:16:09 +00:00
Mike Smith
1b5691c329 Remove unuseful (and annoying) ENXIO printf. 1998-03-20 23:14:52 +00:00
KATO Takenori
a8e4411603 Deleted 1024bytes/sector floppy code for PC-98 arch. The
1024bytes/sector code has not worked for long time and it should be
re-implemented.
1998-03-20 02:33:42 +00:00
Bill Fenner
75daa6a53f Remove the check for SYN in SYN_RECEIVED state; it breaks simultaneous
connect.  This check was added as part of the defense against the "land"
attack, to prevent attacks which guess the ISS from going into ESTABLISHED.
The "src == dst" check will still prevent the single-homed case of the
"land" attack, and guessing ISS's should be hard anyway.

Submitted by:	David Borman <dab@bsdi.com>
1998-03-20 00:43:29 +00:00
John Dyson
34f72be5af Fix vfs_bio_awrite usage, and correct vtruncbuf usage. 1998-03-19 22:49:44 +00:00
John Dyson
0b52b1b3ee Remove b_generation. 1998-03-19 22:49:01 +00:00
John Dyson
52c64c95c5 In kern_physio.c fix tsleep priority messup.
In vfs_bio.c, remove b_generation count usage,
	remove redundant reassignbuf,
	remove redundant spl(s),
	manage page PG_ZERO flags more correctly,
	utilize in invalid value for b_offset until it
		is properly initialized.  Add asserts
		for #ifdef DIAGNOSTIC, when b_offset is
		improperly used.
	when a process is not performing I/O, and just waiting
		on a buffer generally, make the sleep priority
		low.
	only check page validity in getblk for B_VMIO buffers.

In vfs_cluster, add b_offset asserts, correct pointer calculation
	for clustered reads.  Improve readability of certain parts of
	the code.  Remove redundant spl(s).

In vfs_subr, correct usage of vfs_bio_awrite (From Andrew Gallatin
	<gallatin@cs.duke.edu>).  More vtruncbuf problems fixed.
1998-03-19 22:48:16 +00:00
John Dyson
b1a7842b22 Add ENABLE_VFS_IOOPT kernel option. 1998-03-19 22:37:37 +00:00
John Dyson
1c77c6b7b0 Fix an embarassing problem in vtruncbuf. 1998-03-19 18:46:58 +00:00
Tatsumi Hosokawa
bf595ed7c2 Uninitialized pointer reference may happen on particular environment.
(for example, it kills my new laptop, Toshiba Libretto 100....)
1998-03-19 16:19:16 +00:00
Bruce Evans
5f1c0dcd1a Fixed CLEANFILES. Some temporary files were missing. 1998-03-19 13:22:46 +00:00
Bruce Evans
d2ca4e981b Fixed building of kernels without `options FFS'. ffs_softdep_stub.c is
not optional, since several "standard" files in ufs/ufs reference it.
1998-03-19 13:01:50 +00:00
Bruce Evans
77d71f644a Fixed a race to build the @' and machine' symlinks early enough
for `make -jN'.
1998-03-19 12:35:55 +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
Garrett Wollman
2cc2df490e Add preliminary support for IEEE 802.1Q VLAN tagging. It doesn't actually
work reliably yet (I've had panics), but it does seem to occasionally
be able to transmit and receive syntactically-correct packets.
Also fixes one of if_ethersubr.c's legion style bugs, and removes
the hostcache code from standard kernels---the code that depends on it
is not going to happen any time soon, I'm afraid.
1998-03-18 01:40:12 +00:00
John Dyson
4641c8ac1d Correct a problem where data OR metadata could be thrown away if a
buffer is grown.
1998-03-17 17:36:05 +00:00
Daniel O'Callaghan
b9e8979b7b PR: i386/6040
Submitted by:	nakagawa@jp.freebsd.org
Add new PCI NE2000 (VIA VT86C926)
1998-03-17 10:54:23 +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
KATO Takenori
b2bde4cb07 If lowervp is NULLVP, vap was clobbered.
Submitted by:	Naofumi Honda <honda@Kururu.math.sci.hokudai.ac.jp>
Obtained from:	NetBSD/pc98
1998-03-17 08:47:50 +00:00
KATO Takenori
b96ae93234 Sync with sys/i386/isa/clock.c revision 1.117. 1998-03-17 08:42:18 +00:00
KATO Takenori
f1aca9c33f Deleted PC-98 code because (1) machine dependent code should not be in
here, and (2) the flag used in PC-98 code has been assigned to another
purpose.
1998-03-17 08:41:28 +00:00
John Dyson
2deb5d0417 Correct a severely evil bug in the vtruncbuf code. It didn't cause
me any problems until after the previous commit.  This problem then
caused a severe case of creeping crud on my diskdrive, and hosed
my system so bad, that I needed to do a complete reinstall.  Sorry!!!

I assume that others have manifest this bug.
1998-03-17 06:30:52 +00:00
Mike Smith
4d1b2b52df Add missing entry to list of major device names. This list should not
exist.
1998-03-17 00:28:02 +00:00
Eivind Eklund
f909c15bec Clear up DPT comment to avoid further confusion. This is a hardware
driver.
1998-03-16 23:04:07 +00:00
Julian Elischer
c2a94b7a3c Remove a soft-update hook that was accidentally added to the READ path.
also add some comments, and a couple of very minor cosmetic changes.
1998-03-16 18:39:41 +00:00
Mike Smith
14e6f79297 Spell 'compatibility' like everyone else. 1998-03-16 12:07:54 +00:00
Mike Smith
2167f84289 Use dkmakeminor() rather than magic knowledge of the size and location of
the slice field.  Handle incomprehensible slice numbers slightly better.
Suggested by:	bde
1998-03-16 11:50:39 +00:00
Poul-Henning Kamp
b05dcf3c2f A bunch of BNN (Bruce Normal Nits) from bde:
Bring back the softclock inlining
	save a couple of <<32's
	many white-space shuffles.
1998-03-16 10:19:12 +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
John Dyson
e85c1afb7c Allow vfs_ioopt to be enabled with a (temporary) config option. 1998-03-16 02:13:03 +00:00
John Dyson
bef608bd7e Some VM improvements, including elimination of alot of Sig-11
problems.  Tor Egge and others have helped with various VM bugs
lately, but don't blame him -- blame me!!!

pmap.c:
1)	Create an object for kernel page table allocations.  This
	fixes a bogus allocation method previously used for such, by
	grabbing pages from the kernel object, using bogus pindexes.
	(This was a code cleanup, and perhaps a minor system stability
	 issue.)

pmap.c:
2)	Pre-set the modify and accessed bits when prudent.  This will
	decrease bus traffic under certain circumstances.

vfs_bio.c, vfs_cluster.c:
3)	Rather than calculating the beginning virtual byte offset
	multiple times, stick the offset into the buffer header, so
	that the calculated offset can be reused.  (Long long multiplies
	are often expensive, and this is a probably unmeasurable performance
	improvement, and code cleanup.)

vfs_bio.c:
4)	Handle write recursion more intelligently (but not perfectly) so
	that it is less likely to cause a system panic, and is also
	much more robust.

vfs_bio.c:
5)	getblk incorrectly wrote out blocks that are incorrectly sized.
	The problem is fixed, and writes blocks out ONLY when B_DELWRI
	is true.

vfs_bio.c:
6)	Check that already constituted buffers have fully valid pages.  If
	not, then make sure that the B_CACHE bit is not set. (This was
	a major source of Sig-11 type problems.)

vfs_bio.c:
7)	Fix a potential system deadlock due to an incorrectly specified
	sleep priority while waiting for a buffer write operation.  The
	change that I made opens the system up to serious problems, and
	we need to examine the issue of process sleep priorities.

vfs_cluster.c, vfs_bio.c:
8)	Make clustered reads work more correctly (and more completely)
	when buffers are already constituted, but not fully valid.
	(This was another system reliability issue.)

vfs_subr.c, ffs_inode.c:
9)	Create a vtruncbuf function, which is used by filesystems that
	can truncate files.  The vinvalbuf forced a file sync type operation,
	while vtruncbuf only invalidates the buffers past the new end of file,
	and also invalidates the appropriate pages.  (This was a system reliabiliy
	and performance issue.)

10)	Modify FFS to use vtruncbuf.

vm_object.c:
11)	Make the object rundown mechanism for OBJT_VNODE type objects work
	more correctly.  Included in that fix, create pager entries for
	the OBJT_DEAD pager type, so that paging requests that might slip
	in during race conditions are properly handled.  (This was a system
	reliability issue.)

vm_page.c:
12)	Make some of the page validation routines be a little less picky
	about arguments passed to them.  Also, support page invalidation
	change the object generation count so that we handle generation
	counts a little more robustly.

vm_pageout.c:
13)	Further reduce pageout daemon activity when the system doesn't
	need help from it.  There should be no additional performance
	decrease even when the pageout daemon is running.  (This was
	a significant performance issue.)

vnode_pager.c:
14)	Teach the vnode pager to handle race conditions during vnode
	deallocations.
1998-03-16 01:56:03 +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
KATO Takenori
d16238bcdd Sync with sys/i386/isa/clock.c revision 1.116. 1998-03-15 13:35:42 +00:00
Mike Smith
0fd31d39fa Use dsname() to generate the disk region name for the "changing root
device to" message.  Suppress this message if only the slice number
has changed.
1998-03-15 04:42:23 +00:00
Alexander Langer
6d473e818c Allow ICMP unreachable messages to be sent in response to ICMP query
packets (as per Stevens volume 1 section 6.2).
1998-03-15 00:36:27 +00:00
John Dyson
26300b34f1 Disable the vfs.ioopt option for now, so that we don't get gratuitious
bugreports.  I might not be able to fix the problems before 3.0, due
to other, more important things.
1998-03-14 19:50:36 +00:00
Tor Egge
8f7030a7cc Add a BOOTP_WIRED_TO option, for use on machines with multiple network
cards where the first detected card should not be used for bootp.
Submitted by:	Doug Ambrisko <ambrisko@whistle.com>
1998-03-14 04:13:56 +00:00
Tor Egge
8bd965cce4 Update workaround for limitations in the arp code.
Adjust the RPC timeout message which occured when the old workaround
broke to show the correct IP address.
1998-03-14 03:25:18 +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