Commit Graph

22413 Commits

Author SHA1 Message Date
Bosko Milekic
7ba0dcf1ae Correct check for NULL in MEXT_INIT_REF() which should be checking whether
mbuf->m_ext.ref_cnt is NULL, and not whether mbuf is.
Also, remove spaces before "mbtypes" in MGET and MGETHDR macros.

Pointed out by: dwmalone
2000-10-15 17:57:00 +00:00
Warner Losh
d62abc771f Lots of little fixes. We no longer panic on card insert:
o initialize ivars with bzero.
o remove interrupt function pointer.  netbsd needs it, but we don't.
o add lots of comments about bogus things that I've been kludging to try
  to make the simple cases work.
o add new ivar accessor for cis4 to match cis3.  likely neither will be
  needed, but it doesn't hurt to have it.
2000-10-15 17:21:50 +00:00
Nick Hibma
d686268728 Put the header section in the header file not the c file.
Submitted by:	Jonathan Chen <jon@spock.org>
PR:		21982
2000-10-15 15:19:35 +00:00
Poul-Henning Kamp
db7e3af111 Remove unneeded #include <machine/clock.h> 2000-10-15 14:19:01 +00:00
Peter Wemm
642f0c46bf Slight cleanup - this is logically equivalent code but means one less
use of the evil resource_locate() function.
2000-10-15 10:17:55 +00:00
Poul-Henning Kamp
398bc678aa Move DELAY() from <machine/clock.h> to <sys/systm.h> 2000-10-15 09:51:49 +00:00
Peter Wemm
1198579d7b Clean up as in isa/* - resource_query_string() loop cosmetic tweaks. 2000-10-15 09:32:58 +00:00
Peter Wemm
efed28b046 Repeat after me: I will test *before* commit, not after.... *blush* 2000-10-15 09:18:14 +00:00
Yoshihiro Takahashi
b48b645254 Fixed warnings. 2000-10-15 09:04:21 +00:00
Peter Wemm
ada54f9e54 Untangle some resource matching loops that were getting on my nerves
and seemed to be getting cut/pasted to places they shouldn't be.
2000-10-15 08:50:45 +00:00
Boris Popov
c523a62949 Make nfs PDIRUNLOCK aware. Now it is possible to use nullfs mounts on top
of nfs mounts, but there can be side effects because nfs uses shared locks
for vnodes.
2000-10-15 08:06:32 +00:00
Boris Popov
823548e131 Add missed vop_stdunlock() for fifo's vnops (this affects only v2 mounts).
Give nfs's node lock its own name.
2000-10-15 08:01:28 +00:00
Bosko Milekic
6c041b7532 While I'm here:
Small change (remove tab in one of the MEXT* macros) - probably slipped
through (accidently?) in dwmalone's KASSERT() addition (rev 1.58).
2000-10-15 06:27:01 +00:00
Boris Popov
d45a191e99 Fix nullfs breakage caused by incomplete migration of v_interlock from
simple_lock to mutex.

Reset LK_INTERLOCK flag when interlock released manually.
2000-10-15 06:25:42 +00:00
Bosko Milekic
181d2a1564 Add nmbcnt sysctl and make it tunable at boottime; nmbcnt is the
number of ext_buf counters that are possibly allocatable.

Do this because:

  (i) It will make it easier to influence EXT_COUNTERS for if_sk,
      if_ti (or similar) users where the driver allocates its own
      ext_bufs and where it is important for the mbuf system to take
      it into account when reserving necessary space for counters.

  (ii) Facilitate some percentile calculation for netstat(1)
2000-10-15 06:24:07 +00:00
Yoshihiro Takahashi
6bf6c91f5d Fixed warnings. 2000-10-15 04:54:17 +00:00
Yoshihiro Takahashi
54bb2a24af Merged from sys/boot/i386/loader/main.c revision 1.21. 2000-10-15 02:56:48 +00:00
Brian Somers
d6c1f63959 Redefine __word_swap_long, __byte_swap_long and __byte_swap_word
as inline functions, renaming them to __uint16_swap_uint32,
__uint8_swap_uint32 and __uint8_swap_uint16.

Doing it properly suggested by: msmith
Reviewed by: msmith
2000-10-15 00:45:19 +00:00
Alan Cox
e0284d2eb1 Change the text for the ServerWorks north bridge chips. RCC is now
officially listed as ServerWorks by www.pcisig.com.
2000-10-14 23:45:09 +00:00
Alan Cox
34fc4aef48 Recognize the ServerWorks IB6566 south bridge. 2000-10-14 23:16:42 +00:00
Poul-Henning Kamp
afd05ac212 Remove the HPFPLIB copyright which we have never used. 2000-10-14 19:14:48 +00:00
Poul-Henning Kamp
1f22e63352 Remove even more unneeded #includes. 2000-10-14 17:37:32 +00:00
Poul-Henning Kamp
2d99f9a72c Remove even more nneeded #includes. 2000-10-14 15:57:44 +00:00
Mark Murray
a6278a2a42 After some complaints about the dir names, the random device is
now in dirs called sys/*/random/ instead of sys/*/randomdev/*.

Introduce blocking, but only at startup; the random device will
block until the first reseed happens to prevent clients from
using untrustworthy output.

Provide a read_random() call for the rest of the kernel so that
the entropy device does not need to be present. This means that
things like IPX no longer need to have "device random" hardcoded
into thir kernel config. The downside is that read_random() will
provide very poor output until the entropy device is loaded and
reseeded. It is recommended that developers do NOT use the
read_random() call; instead, they should use arc4random() which
internally uses read_random().

Clean up the mutex and locking code a bit; this makes it possible
to unload the module again.
2000-10-14 10:59:56 +00:00
Poul-Henning Kamp
1b3c07c893 Duh! LINT is called NOTES these days.
Make sure LINT checks profiling code as well.
2000-10-14 08:40:47 +00:00
Poul-Henning Kamp
990e680b90 Fix compilation of profiled kernels by including <machine/lock.h> 2000-10-14 08:34:27 +00:00
Poul-Henning Kamp
412916079c Make it possible to specify profiling in the kernel config file.
Do so for LINT.
2000-10-14 08:33:22 +00:00
John W. De Boskey
2ec40c9aac Remove the signal value check from the PT_STEP codepath. It
can cause an bogus failure.

Reviewed by:    Sean Eric Fagan <sef@kithrup.com>
                and no other response to the review request.
2000-10-14 03:56:01 +00:00
Adrian Chadd
0b0c10b48d Initial commit of IFS - a inode-namespaced FFS. Here is a short
description:

How it works:
--

Basically ifs is a copy of ffs, overriding some vfs/vnops. (Yes, hack.)
I didn't see the need in duplicating all of sys/ufs/ffs to get this
off the ground.

File creation is done through a special file - 'newfile' . When newfile
is called, the system allocates and returns an inode. Note that newfile
is done in a cloning fashion:

fd = open("newfile", O_CREAT|O_RDWR, 0644);
fstat(fd, &st);

printf("new file is %d\n", (int)st.st_ino);

Once you have created a file, you can open() and unlink() it by its returned
inode number retrieved from the stat call, ie:

fd = open("5", O_RDWR);

The creation permissions depend entirely if you have write access to the
root directory of the filesystem.

To get the list of currently allocated inodes, VOP_READDIR has been added
which returns a directory listing of those currently allocated.

--

What this entails:

* patching conf/files and conf/options to include IFS as a new compile
  option (and since ifs depends upon FFS, include the FFS routines)

* An entry in i386/conf/NOTES indicating IFS exists and where to go for
  an explanation

* Unstaticize a couple of routines in src/sys/ufs/ffs/ which the IFS
  routines require (ffs_mount() and ffs_reload())

* a new bunch of routines in src/sys/ufs/ifs/ which implement the IFS
  routines. IFS replaces some of the vfsops, and a handful of vnops -
  most notably are VFS_VGET(), VOP_LOOKUP(), VOP_UNLINK() and VOP_READDIR().
  Any other directory operation is marked as invalid.

What this results in:

* an IFS partition's create permissions are controlled by the perm/ownership of
  the root mount point, just like a normal directory

* Each inode has perm and ownership too

* IFS does *NOT* mean an FFS partition can be opened per inode. This is a
  completely seperate filesystem here

* Softupdates doesn't work with IFS, and really I don't think it needs it.
  Besides, fsck's are FAST. (Try it :-)

* Inodes 0 and 1 aren't allocatable because they are special (dump/swap IIRC).
  Inode 2 isn't allocatable since UFS/FFS locks all inodes in the system against
  this particular inode, and unravelling THAT code isn't trivial. Therefore,
  useful inodes start at 3.

Enjoy, and feedback is definitely appreciated!
2000-10-14 03:02:30 +00:00
Mike Smith
d1eefff418 Whoops, add the 'twe' files.
Submitted by:	Chris Faulhaber <jedgar@fxp.org>
2000-10-14 01:23:29 +00:00
Bill Paul
4c2efe270a Clean up a few things in dc_setcfg() pointed out to be me by
aaron@openbsd.com on IRC earlier today.
2000-10-14 00:40:14 +00:00
Jonathan Lemon
834801e8af Look at both the vendor and subvendor information when determining
whether this is a Smart Array.  This fixes a problem where the driver
would incorrectly match a Dell RAID device.

Reviewed by: msmith
2000-10-13 23:34:47 +00:00
Bill Paul
a95b77ec78 Remember to assign an_dev to device_t before calling an_attach(). 2000-10-13 22:04:20 +00:00
Peter Wemm
ac5f943c37 savectx() is now used exclusively by the crash dump system. Move the
i386 specific gunk (copy %cr3 to the pcb) from the MI dumpsys() to the
MD savectx().
2000-10-13 22:03:29 +00:00
Bill Paul
736f03e49a Convert the Aironet driver to use mutexes instead of spls. 2000-10-13 21:58:36 +00:00
Paul Saab
16a011f973 Do not allocate a callout for all crashdumps, not just when you panic. 2000-10-13 21:49:19 +00:00
Bill Paul
9fa3f7b0f2 Update the wi driver to use mutexes instead of spls. 2000-10-13 20:33:24 +00:00
Bill Paul
d308faacc2 Add #include <machine/mutex.h> since these files need it and don't
include anything else that includes mutex.h. Needed to resolve struct mtx
from struct dc_softc.
2000-10-13 19:15:50 +00:00
Chuck Paterson
f59dd3ae6a Make mutex name reflect device driver name.
Destroy mutex when detaching the device.
Submitted by: John Baldwin <jhb@FreeBSD.ORG>
2000-10-13 18:59:29 +00:00
Bill Paul
1e856a7b34 Use device_get_nameunit(dev) as the mutex string when calling
mtx_init() instead of hard-coded string constant. Also remember to do
the mutex changes to the ste driver, which I forgot in the first commit.
2000-10-13 18:35:49 +00:00
Bill Paul
d1ce910572 First round of converting network drivers from spls to mutexes. This
takes care of all the 10/100 and gigE PCI drivers that I've done.
Next will be the wireless drivers, then the USB ones. I may pick up
some stragglers along the way. I'm sort of playing this by ear: if
anyone spots any places where I've screwed up horribly, please let me
know.
2000-10-13 17:54:19 +00:00
Robert Watson
ab024bb02e o Simplify capability types away from an array of ints to a single
u_int64_t flag field, bounding the number of capabilities at 64,
  but substantially cleaning up capability logic (there are currently
  43 defined capabilities).

o Heads up to anyone actually using capabilities: the constant
  assignments for various capabilities have been redone, so any
  persistent binary capability stores (i.e., '$posix1e.cap' EA
  backing files) must be recreated.  If you have one of these,
  you'll know about it, so if you have no idea what this means,
  don't worry.

o Update libposix1e to reflect this new definition, fixing the
  exposed functions that directly manipulate the flags fields.

Obtained from:	TrustedBSD Project
2000-10-13 17:12:58 +00:00
Matthew Dillon
64bcb9c815 The swap bitmap allocator was not calculating the bitmap size properly
in the face of non-stripe-aligned swap areas.  The bug could cause a
      panic during boot.

      Refuse to configure a swap area that is too large (67 GB or so)

      Properly document the power-of-2 requirement for SWB_NPAGES.

      The patch is slightly different then the one Tor enclosed in the P.R.,
      but accomplishes the same thing.

PR: kern/20273
Submitted by: Tor.Egge@fast.no
2000-10-13 16:44:34 +00:00
Søren Schmidt
7c6d7d5f82 Add ata-raid.c to the ata driver 2000-10-13 15:42:58 +00:00
Hellmuth Michaelis
5d113d0ac0 Submitted by: phk
Remove not needed includes.
2000-10-13 14:10:51 +00:00
Bruce Evans
6092d1874e Fixed namespace pollution in rev.1.78. Don't export <sys/stat.h> to
userland from here; just forward declare struct stat.  fhstat.2
(== fhopen.2 == fhstatfs.2) has always specified including
<sys/stat.h> before using any of the fh functions although this is
only necessary for dereferencing the "struct stat *" arg of fhstat(),
so applications should not notice this change.

Fixed unsorting of user prototypes in rev.1.78.
2000-10-13 14:04:26 +00:00
Bruce Evans
3d7613a6e2 Avoid impending world breakage.
1. Don't include <sys/conf.h> in userland.  It is not used, and including it
   without including its prerequisite <sys/time.h> should have broken the
   world.
2. Don't include <sys/mount.h>.  It is not used, except in -current it
   bogusly includes <sys/stat.h> which bogusly includes <sys/time.h> and
   thus accidentally provides the prerequisite in (1).
3. Cleaned up nearby include messes.

Not approved by despite 5 weeks notice: MAINTAINER
2000-10-13 13:43:37 +00:00
Søren Schmidt
e9cf6115e4 Add support for ATA "pseudo" RAID controllers as the Promise Fasttrak
and HighPoint HPT370 controllers.

Use by defining the RAID in the BIOS and the "ar driver will pick it up
automagically...
2000-10-13 13:04:45 +00:00
Søren Schmidt
d851448bbf Add the ar ATA pseudo RAID driver 2000-10-13 13:02:17 +00:00
Søren Schmidt
8d8f318a08 Fix ISA only systems. 2000-10-13 12:09:23 +00:00