Commit Graph

419 Commits

Author SHA1 Message Date
msmith
e2ce4e5ccf This commit was generated by cvs2svn to compensate for changes in r85756,
which included commits to RCS files with non-trunk default branches.
2001-10-31 02:32:29 +00:00
msmith
dda50f5fd9 Import the Intel ACPI CA 20011018 snapshot 2001-10-31 02:32:28 +00:00
msmith
5671c94d6a This commit was generated by cvs2svn to compensate for changes in r85754,
which included commits to RCS files with non-trunk default branches.
2001-10-31 02:32:28 +00:00
msmith
d45f619025 Actually delete this file; aborting 'cvs delete -f' has unexpeted results... 2001-10-05 09:24:34 +00:00
msmith
312a68b266 Kill a couple of files off the vendor branch, as suggested by ru. 2001-10-05 09:23:41 +00:00
msmith
5212fcf606 Remove file obsoleted by the 20010920 snapshot. 2001-10-04 23:17:35 +00:00
msmith
25157ef061 Merge our local patches into the 20010920 snapshot. Note that the
"implicit return" hack in psparse.c was resubmitted by Iwasaki-san.

Submitted by:	iwasaki
2001-10-04 23:15:26 +00:00
msmith
414e433eba Import of the Intel ACPI CA 20010920 snapshot. 2001-10-04 23:12:14 +00:00
msmith
83cb0f4040 This commit was generated by cvs2svn to compensate for changes in r84493,
which included commits to RCS files with non-trunk default branches.
2001-10-04 23:12:14 +00:00
msmith
ba72040ab6 Import of the Intel ACPI CA 20010920 snapshot. 2001-10-04 23:12:13 +00:00
msmith
8322450e5c This commit was generated by cvs2svn to compensate for changes in r84491,
which included commits to RCS files with non-trunk default branches.
2001-10-04 23:12:13 +00:00
darrenr
dbedb20a4e IPFilter munges multicast address packets on the loopback interface.
Submitted by:	Frank Zolf
Approved by:	jkh
MFC after:	0
2001-09-12 22:06:36 +00:00
cvs2svn
cd9921ad61 This commit was manufactured by cvs2svn to create branch
'VENDOR-sys-ipfilter'.
2001-09-12 22:00:04 +00:00
darrenr
a180ed322d Add IPFLITER.LICENCE to the kernel (requested by rwatson) 2001-09-12 22:00:03 +00:00
julian
5596676e6c KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.

Sorry john! (your next MFC will be a doosie!)

Reviewed by: peter@freebsd.org, dillon@freebsd.org

X-MFC after:    ha ha ha ha
2001-09-12 08:38:13 +00:00
msmith
900b040f00 Merge our local branch changes with the 20010831 snapshot. 2001-09-07 02:52:26 +00:00
msmith
9d39e615a8 Vendor-branch import of the Intel ACPI CA 20010831 snapshot. 2001-09-07 01:22:25 +00:00
msmith
47317efb99 This commit was generated by cvs2svn to compensate for changes in r83174,
which included commits to RCS files with non-trunk default branches.
2001-09-07 01:22:25 +00:00
msmith
b01167587a Nuke the Windows platform defines; we don't need them. 2001-08-26 22:46:28 +00:00
msmith
397b5abcd4 Merge local changes. 2001-08-26 22:45:42 +00:00
msmith
56186efdbc Vendor import of the Intel ACPI CA 20010816 update. 2001-08-26 22:28:18 +00:00
msmith
73f2104b29 This commit was generated by cvs2svn to compensate for changes in r82367,
which included commits to RCS files with non-trunk default branches.
2001-08-26 22:28:18 +00:00
darrenr
a2f0fd9705 fix import/merge related code problems 2001-07-30 10:53:23 +00:00
darrenr
d58b006a82 fix conflicts created by import 2001-07-28 11:58:26 +00:00
darrenr
e64a51d4c6 Import version 3.4.20 of IPFilter 2001-07-28 11:42:17 +00:00
peter
57aef806e0 Commit the hwsleep.c patch for suspend/resume onto the vendor branch.
This has supposedly been incorporated into the Intel code already, so this
will get cleanly replaced with the "official" version when it is next
imported and will not cause any conflicts or hiccups.
2001-07-25 22:10:56 +00:00
peter
3344c4cdc2 This commit was generated by cvs2svn to compensate for changes in r80357,
which included commits to RCS files with non-trunk default branches.
2001-07-25 22:10:56 +00:00
msmith
183b6c470d Merge local changes with the ACPI CA 20010717 import. 2001-07-21 03:57:37 +00:00
msmith
91b87ce244 Vendor import of the Intel ACPI CA 20010717 snapshot. 2001-07-21 03:55:17 +00:00
msmith
a6caba5723 This commit was generated by cvs2svn to compensate for changes in r80062,
which included commits to RCS files with non-trunk default branches.
2001-07-21 03:55:17 +00:00
msmith
4a8fbafe90 Vendor import of the Intel ACPI CA 20010717 snapshot. 2001-07-21 03:55:15 +00:00
msmith
2ff441217c This commit was generated by cvs2svn to compensate for changes in r80060,
which included commits to RCS files with non-trunk default branches.
2001-07-21 03:55:15 +00:00
msmith
8ee0a1a5cd We haven't had AcpiSetSystemSleepState for a while now, clean out the
prototype.
2001-07-20 08:49:17 +00:00
msmith
00fd1050c5 Merge FreeBSD-specific changes. 2001-06-29 20:19:59 +00:00
msmith
ec0a44c215 Vendor import of the Intel ACPI CA 20010615 snapshot. 2001-06-29 20:11:04 +00:00
msmith
6067484852 This commit was generated by cvs2svn to compensate for changes in r78986,
which included commits to RCS files with non-trunk default branches.
2001-06-29 20:11:04 +00:00
joerg
ad173225ba Do only call oltr_stop() if we are not already in OL_STOPPED state.
This avoids a null pointer deref panic in TRlldClose() inside the
vendor-supplied object code.  It's now possible to unload the driver
at all.

Implement deallocation of malloc()ed memory regions.

MFC after:	2 months
2001-06-14 15:08:40 +00:00
msmith
89dd86f647 Remove old ACPI CA code. These will be drained from the repo at some
future date.
2001-05-29 20:22:11 +00:00
msmith
810dc37f4b - wbinvd isn't an inline on ia64.
- includes are not in subdirectories.
2001-05-29 20:03:32 +00:00
msmith
adc622bc2d Merge FreeBSD-specific changes with the ACPI CA 20010518 release. 2001-05-29 19:56:18 +00:00
msmith
bc4d4229dc Import the 20010518 Intel ACPI CA release. Note that Intel's directory layout
keeps changing, so to reduce repository thrash everything has been moved into
a single directory.  (repo copy involved)
2001-05-29 19:52:40 +00:00
msmith
96a626e3c3 This commit was generated by cvs2svn to compensate for changes in r77424,
which included commits to RCS files with non-trunk default branches.
2001-05-29 19:52:40 +00:00
msmith
3c0029a0e8 Import the 20010518 Intel ACPI CA release. Note that Intel's directory layout
keeps changing, so to reduce repository thrash everything has been moved into
a single directory.  (repo copy involved)
2001-05-29 19:52:32 +00:00
msmith
7bec4652bb This commit was generated by cvs2svn to compensate for changes in r77422,
which included commits to RCS files with non-trunk default branches.
2001-05-29 19:52:32 +00:00
phk
16caeec9b0 Actually biofinish(struct bio *, struct devstat *, int error) is more general
than the bioerror().

Most of this patch is generated by scripts.
2001-05-06 20:00:03 +00:00
phk
f44754b579 Update the DiskOnChip firmware to OSAK version 4.1.
Sponsored by:	Redfern Broadband Networks (www.RedFernNetworks.com)
2001-05-06 12:37:42 +00:00
darrenr
df2a765614 fix security hole created by fragment cache 2001-04-06 15:52:28 +00:00
phk
c47745e977 Send the remains (such as I have located) of "block major numbers" to
the bit-bucket.
2001-03-26 12:41:29 +00:00
mdodd
b3227af0b7 Move configuration of work_memory to oltr_init() rather than
oltr_pci_attach().  This only affects the OC-3139 and OC-3540.

MFC candidate.

PR:		kern/24074
2001-03-08 01:38:58 +00:00
msmith
59ed04a4ec Resolve merge conflicts. 2001-03-05 02:16:51 +00:00
msmith
cc64c75258 Belated vendor update to the Intel ACPI CA 20010208 snapshot. 2001-03-05 02:15:19 +00:00
msmith
7c6e2c6a5b This commit was generated by cvs2svn to compensate for changes in r73561,
which included commits to RCS files with non-trunk default branches.
2001-03-05 02:15:19 +00:00
darrenr
c4fdb153ac fix duplicate rcsid 2001-02-04 15:25:15 +00:00
darrenr
48b4ca8e6a fix conflicts 2001-02-04 14:26:56 +00:00
darrenr
872f518753 Update IP Filter kernel source 2001-02-04 14:15:48 +00:00
msmith
4ae46f1754 Patch the reintroduced (~0 << 32) == 1 bug with a cryptic but functional
version.  This should fix the read-before-write problem again.

Obtained from:	"Adam J. Richter" <adam@yggdrasil.com>
2001-02-02 08:31:50 +00:00
msmith
55303e9ac4 Merge conflicts from the ACPI CA 20010125 import. 2001-01-31 09:44:45 +00:00
msmith
7480ca9852 Remove obsoleted files. 2001-01-31 09:25:42 +00:00
msmith
7948a3a804 Update to the 20010125 ACPI CA snapshot. 2001-01-31 09:17:50 +00:00
msmith
d0b0463ce5 This commit was generated by cvs2svn to compensate for changes in r71867,
which included commits to RCS files with non-trunk default branches.
2001-01-31 09:17:50 +00:00
iwasaki
af68207f90 Disable strstr() if ACPICA is compiled in userland.
Reviewed by:	msmith
2001-01-10 19:28:03 +00:00
msmith
4b40c9999c Resolve conflicts from the ACPI CA 20001215 vendor import. 2000-12-21 07:04:32 +00:00
msmith
68d9171019 Update to the Intel 20001215 ACPI CA snapshot. 2000-12-21 06:56:46 +00:00
msmith
07e76fb2a2 This commit was generated by cvs2svn to compensate for changes in r70243,
which included commits to RCS files with non-trunk default branches.
2000-12-21 06:56:46 +00:00
dwmalone
dd75d1d73b Convert more malloc+bzero to malloc+M_ZERO.
Submitted by:	josh@zipperup.org
Submitted by:	Robert Drehmel <robd@gmx.net>
2000-12-08 21:51:06 +00:00
phk
c3f2ee9700 Staticize some malloc M_ instances. 2000-12-08 20:09:00 +00:00
msmith
edd9dc46ad Resolve conflicts from the 20001201 merge. 2000-12-08 09:22:18 +00:00
msmith
f4b6d0429c Update to the 20001201 ACPI CA snapshot. 2000-12-08 09:20:40 +00:00
msmith
a47afc72fb This commit was generated by cvs2svn to compensate for changes in r69746,
which included commits to RCS files with non-trunk default branches.
2000-12-08 09:20:40 +00:00
msmith
85cd920774 Remove duplicate definition. 2000-12-01 12:10:06 +00:00
msmith
9ec0ffdb78 Update local changes for new hardware register interface. 2000-12-01 12:09:18 +00:00
msmith
706c27579b Resolve conflicts from the vendor update. 2000-12-01 09:49:35 +00:00
msmith
4d595f4926 Update to the 20001115 Intel ACPI CA snapshot. 2000-12-01 09:36:25 +00:00
msmith
f5e9caf11e This commit was generated by cvs2svn to compensate for changes in r69450,
which included commits to RCS files with non-trunk default branches.
2000-12-01 09:36:25 +00:00
jlemon
954e1d2ccd Lock down the network interface queues. The queue mutex must be obtained
before adding/removing packets from the queue.  Also, the if_obytes and
if_omcasts fields should only be manipulated under protection of the mutex.

IF_ENQUEUE, IF_PREPEND, and IF_DEQUEUE perform all necessary locking on
the queue.  An IF_LOCK macro is provided, as well as the old (mutex-less)
versions of the macros in the form _IF_ENQUEUE, _IF_QFULL, for code which
needs them, but their use is discouraged.

Two new macros are introduced: IF_DRAIN() to drain a queue, and IF_HANDOFF,
which takes care of locking/enqueue, and also statistics updating/start
if necessary.
2000-11-25 07:35:38 +00:00
bmilekic
22569f9f96 While I'm here, get rid of (now useless) MCLISREFERENCED and use MEXT_IS_REF
instead.
Also, fix a small set of "avail." If we're setting `avail,' we shouldn't
be re-checking whether m_flags is M_EXT, because we know that it is, as if
it wasn't, we would have already returned several lines above.

Reviewed by: jlemon
2000-11-11 23:05:59 +00:00
darrenr
df59a7ec10 Fix conflicts creted by import. 2000-10-29 07:53:05 +00:00
darrenr
ab46516b6b Import IP filter 3.4.13 2000-10-29 07:50:11 +00:00
msmith
2e093a62cd We should include <machine/stdarg.h> not <stdarg.h>
Submitted by:	phk
2000-10-28 08:32:43 +00:00
msmith
430258152b Some AML code assumes that a function without an explicit ReturnOp will
return the last value returned by a nested method call.  This violates
the ACPI spec, but is implemented by the Microsoft interpreter, and thus
vendors can (and do) get away with it.

Intel's stance is that this is illegal and should not be supported.
As they put it, however, we have to live in the real world.  So go ahead
and implement it.

Submitted by:	Mitsaru IWASAKI <iwasaki@jp.freebsd.org>
2000-10-28 07:32:13 +00:00
msmith
e170b01108 FreeBSD-specific customisations:
- Set debugger options for kernel build
 - Define some missing functions
 - Bring in GCC defines
 - Disable the 'wbinvd' macro as it conflicts with our inline
2000-10-28 07:29:08 +00:00
msmith
37860cc264 Add some extra fuctions:
- AcpiGetProcessorID (fetch the ACPI processor ID for a given ACPI_HANDLE)
 - AcpiSetSystemSleepState (set the Sx sleeping state, proposed by Intel
   but not actually implemented)
2000-10-28 07:26:48 +00:00
msmith
748be15501 Initial import of the Intel-maintained ACPI Component Architecture. This
is Intel's reference implementation of the core operating-system ACPI
support.  (This import is on the vendor branch.)
2000-10-28 05:01:06 +00:00
msmith
25edde61bd This commit was generated by cvs2svn to compensate for changes in r67754,
which included commits to RCS files with non-trunk default branches.
2000-10-28 05:01:06 +00:00
obrien
1712fe1dbd Include sys/param.h for `__FreeBSD_version' rather than the non-existent
osreldate.h.

Submitted by:	dougb
2000-10-27 12:53:31 +00:00
darrenr
1a1de29bc0 fix conflicts from rcsids 2000-10-26 12:33:42 +00:00
darrenr
e04f9f34d2 Import IP Filter 3.4.12 into kernel source tree 2000-10-26 12:28:47 +00:00
ru
1c21cf3de3 We now keep the ip_id field in network byte order all the
time, so there is no need to make the distinction between
ip_output() and ip_input() cases.

Reviewed by:	silence on freebsd-net
2000-10-25 10:56:41 +00:00
ru
75996829e6 If we do not byte-swap the ip_id in the first place, don't do it in
the second.  NetBSD (from where I've taken this originally) needs
to fix this too.
2000-10-18 11:36:09 +00:00
phk
beadbd4365 Remove unneeded #include <machine/clock.h> 2000-10-15 14:19:01 +00:00
lile
53d0f58f81 o Change TX_BUFFER_LEN from 512 to 2048.
o Remove bogus "spurious interrupt" message.

o Ring buffer head and avail were incorrectly calculated.

o Fix fragment count.

o Fix ring entry for single station, default to 16Mbit.

o Don't complain about long frames.
2000-10-10 00:54:02 +00:00
phk
861b7f5396 remove unused #include. 2000-10-07 19:38:31 +00:00
phk
4b8192c10b Remove SMP hack. 2000-09-16 18:57:18 +00:00
ru
92269e49c4 Follow BSD/OS and NetBSD, keep the ip_id field in network order all the time.
Requested by:	wollman
2000-09-14 14:42:04 +00:00
kris
5eb6c27b70 Install mode 644, not mode 664 during kernel compile. Yes, Peter, I am
psycho :-)
2000-08-15 11:06:56 +00:00
darrenr
24d61c1ea6 resolve conflicts 2000-08-13 04:31:06 +00:00
darrenr
15d169cdfc Import IP Filter 3.4.9 bits into the kernel 2000-08-13 04:28:25 +00:00
roberto
aab96ffa41 Change __FreeBSD_Version into the proper __FreeBSD_version.
Submitted by:	Alain.Thivillon@hsc.fr (Alain Thivillon) (for ip_fil.c)
2000-08-01 17:14:38 +00:00
ache
16cb133f9b Add missing '0' to FreeBSD_version test: 50011 -> 500011 2000-08-01 00:04:24 +00:00
darrenr
d18ce92d58 activate pfil_hooks and covert ipfilter to use it 2000-07-31 13:11:42 +00:00
darrenr
9f3624548b fix conflicts 2000-07-19 14:02:09 +00:00
darrenr
89b6cd99cd import ipfilter 3.4.8 2000-07-19 13:57:32 +00:00
peter
7819765a7d Remove these here, these were repocopied to src/sys/ufs/ffs. 2000-06-23 00:11:32 +00:00
mckusick
aa0e1b74b0 Update to new copyright. 2000-06-22 00:29:53 +00:00
mckusick
2be2bf630e When running with quotas enabled on a filesystem using soft updates,
the system would panic when a user's inode quota was exceeded (see
PR 18959 for details). This fixes that problem.

PR:		18959
Submitted by:	Jason Godsey <jason@unixguy.fidalgo.net>
2000-06-18 22:14:28 +00:00
mckusick
cad9618566 Some additional performance improvements. When freeing an inode
check to see if it has been committed to disk. If it has never
been written, it can be freed immediately. For short lived files
this change allows the same inode to be reused repeatedly.
Similarly, when upgrading a fragment to a larger size, if it
has never been claimed by an inode on disk, it too can be freed
immediately making it available for reuse often in the next slowly
growing block of the same file.
2000-06-18 22:05:57 +00:00
phk
74e1ff15ad ARGH! I have too many source trees :-(
Fix prototype errors in last commit.
2000-06-16 13:00:33 +00:00
phk
4ec91666fa Virtualizes & untangles the bioops operations vector.
Ref: Message-ID: <18317.961014572@critter.freebsd.dk> To: current@
2000-06-16 08:48:51 +00:00
peter
2ab13233a1 Unused include: #include "fla.h" 2000-06-10 11:05:17 +00:00
peter
51a6e2c56d Fix a reference to an old FreeBSD 2.2 register name.
s/PCI_COMMAND_STATUS_REG/PCIR_COMMAND/
2000-05-28 16:21:45 +00:00
darrenr
1816cb0fd4 define CSUM_DELAY_DATA to match merge 2000-05-26 07:28:03 +00:00
jake
961b97d434 Back out the previous change to the queue(3) interface.
It was not discussed and should probably not happen.

Requested by:		msmith and others
2000-05-26 02:09:24 +00:00
darrenr
f8a289a9a1 fix up #ifdef jungle for FreeBSD 2000-05-25 16:24:46 +00:00
darrenr
8e62250edd remove duplicate prototypes 2000-05-25 16:23:30 +00:00
darrenr
ac5003302a fix duplicate rcsid's 2000-05-24 19:38:17 +00:00
peter
4133b85951 It would have been nice if this actually compiled. Close the header
comment */.
2000-05-24 09:08:55 +00:00
darrenr
af0a4a0591 fix up conflicts 2000-05-24 04:40:17 +00:00
darrenr
28218f546c fix conflicts 2000-05-24 04:21:35 +00:00
darrenr
08110f1e41 fix conflicts 2000-05-24 04:09:13 +00:00
darrenr
9c90494417 fix conflicts 2000-05-24 04:01:49 +00:00
darrenr
3a99aee60f fix conflicts 2000-05-24 04:01:30 +00:00
darrenr
9c26b06dba fix conflicts 2000-05-24 03:43:24 +00:00
darrenr
e517ff28a4 fix conflicts 2000-05-24 03:17:16 +00:00
darrenr
911a5a839e Import IP Filter 3.4.4 into the kernel 2000-05-24 02:55:58 +00:00
jake
d93fbc9916 Change the way that the queue(3) structures are declared; don't assume that
the type argument to *_HEAD and *_ENTRY is a struct.

Suggested by:	phk
Reviewed by:	phk
Approved by:	mdodd
2000-05-23 20:41:01 +00:00
jlemon
8ad2993760 Compute the checksum before handing the packet off to IPFilter.
Tested by:  Cy Schubert <Cy.Schubert@uumail.gov.bc.ca>
2000-05-21 21:26:06 +00:00
darrenr
4e731bbb1b Fix bug in dealing with "hlen == 1 and opt > 1" 2000-05-09 23:35:24 +00:00
ps
cffec0416c Add missing include machine/in_cksum.h.
Submitted by:	n_hibma
2000-05-09 16:56:51 +00:00
phk
36c3965ff9 Separate the struct bio related stuff out of <sys/buf.h> into
<sys/bio.h>.

<sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall
not be made a nested include according to bdes teachings on the
subject of nested includes.

Diskdrivers and similar stuff below specfs::strategy() should no
longer need to include <sys/buf.> unless they need caching of data.

Still a few bogus uses of struct buf to track down.

Repocopy by:    peter
2000-05-05 09:59:14 +00:00
peter
22f6069a2a Add $FreeBSD$ 2000-05-01 20:32:07 +00:00
phk
06ce96a42b Enforce and respect the 8 unit limit. 2000-04-23 09:10:09 +00:00
phk
aaaef0b54e Complete the bio/buf divorce for all code below devfs::strategy
Exceptions:
        Vinum untouched.  This means that it cannot be compiled.
        Greg Lehey is on the case.

        CCD not converted yet, casts to struct buf (still safe)

        atapi-cd casts to struct buf to examine B_PHYS
2000-04-15 05:54:02 +00:00
rwatson
a0dd5ab0fd Introduce extended attribute support for FFS, allowing arbitrary
(name, value) pairs to be associated with inodes.  This support is
used for ACLs, MAC labels, and Capabilities in the TrustedBSD
security extensions, which are currently under development.

In this implementation, attributes are backed to data vnodes in the
style of the quota support in FFS.  Support for FFS extended
attributes may be enabled using the FFS_EXTATTR kernel option
(disabled by default).  Userland utilities and man pages will be
committed in the next batch.  VFS interfaces and man pages have
been in the repo since 4.0-RELEASE and are unchanged.

o ufs/ufs/extattr.h: UFS-specific extattr defines
o ufs/ufs/ufs_extattr.c: bulk of support routines
o ufs/{ufs,ffs,mfs}/*.[ch]: hooks and extattr.h includes
o contrib/softupdates/ffs_softdep.c: extattr.h includes
o conf/options, conf/files, i386/conf/LINT: added FFS_EXTATTR

o coda/coda_vfsops.c: XXX required extattr.h due to ufsmount.h
(This should not be the case, and will be fixed in a future commit)

Currently attributes are not supported in MFS.  This will be fixed.

Reviewed by:	adrian, bp, freebsd-fs, other unthanked souls
Obtained from:	TrustedBSD Project
2000-04-15 03:34:27 +00:00
phk
8ee11d587f Move B_ERROR flag to b_ioflags and call it BIO_ERROR.
(Much of this done by script)

Move B_ORDERED flag to b_ioflags and call it BIO_ORDERED.

Move b_pblkno and b_iodone_chain to struct bio while we transition, they
will be obsoleted once bio structs chain/stack.

Add bio_queue field for struct bio aware disksort.

Address a lot of stylistic issues brought up by bde.
2000-04-02 15:24:56 +00:00
lile
f6f3b06726 o Get basic if_media support working.
o Add more diagnostic and status messages.

o General clean up of old debug messages and
  small style fixes.
2000-03-26 23:56:15 +00:00
phk
5df766a0f8 Rename the existing BUF_STRATEGY() to DEV_STRATEGY()
substitute BUF_WRITE(foo) for VOP_BWRITE(foo->b_vp, foo)

substitute BUF_STRATEGY(foo) for VOP_STRATEGY(foo->b_vp, foo)

This patch is machine generated except for the ccd.c and buf.h parts.
2000-03-20 11:29:10 +00:00
phk
a246e10f55 Remove B_READ, B_WRITE and B_FREEBUF and replace them with a new
field in struct buf: b_iocmd.  The b_iocmd is enforced to have
exactly one bit set.

B_WRITE was bogusly defined as zero giving rise to obvious coding
mistakes.

Also eliminate the redundant struct buf flag B_CALL, it can just
as efficiently be done by comparing b_iodone to NULL.

Should you get a panic or drop into the debugger, complaining about
"b_iocmd", don't continue.  It is likely to write on your disk
where it should have been reading.

This change is a step in the direction towards a stackable BIO capability.

A lot of this patch were machine generated (Thanks to style(9) compliance!)

Vinum users:  Greg has not had time to test this yet, be careful.
2000-03-20 10:44:49 +00:00
lile
5ba5b5b6b4 o Fix typo in the RapidFire 3540 adapter name
4/16/100 -> 100/16/4 so that it matches all of the others.

o Since we went to all the trouble of getting the correct
  working memory size actually use it.

* Submitted by: Nikolai Saoukh <nms@otdel-1.org>
2000-03-19 15:08:39 +00:00
lile
c778d5b01b o Replace the old "oltr" driver with the completely re-written
new-bus Olicom driver, previously known as "ol".  The new
  driver unfortunately does not support ISA cards yet.

o Update the microcode files, interface library and include files
  to the latest PowerMACH works version.  Force even byte alignment
  of adapter microcode.

o Roll in some of the patches from Nikolai Saoukh <nms@ethereal.ru>.
2000-03-18 23:51:54 +00:00
guido
e515e856f2 Re add rev 1.11 diffs to ip_fil.h Also discover that I did not undefine
CVS_FUBAR (which no longer exists) and thus forgot to add $FreeBSD's.
Add them.

Approved by: jkh (is part of ipfilter upgrade)
2000-02-10 21:29:11 +00:00
guido
2fb4ae435f Bring over ipfilter v3_3_8 kernel sources, including merging the
local modifications.
Also fix initializing fr_running in KLD case.
Rename ipl_inited to fr_runninhg in mlfk_ipl

Approved by: jkh
2000-02-09 20:56:36 +00:00
mckusick
541e13d43c When writing out bitmap buffers, need to skip over ones that already
have a write in progress. Otherwise one can get in an infinite loop
trying to get them all flushed.

Submitted by:	Matthew Dillon <dillon@apollo.backplane.com>
2000-01-30 20:32:59 +00:00
peter
a9988a615b Remove a somewhat odd #if that is always true (NOLTR will be always
1 or more if this file is being compiled)
2000-01-29 18:38:31 +00:00
mckusick
e8eebed1f3 During fastpath processing for removal of a short-lived inode, the
set of restrictions for cancelling an inode dependency (inodedep)
is somewhat stronger than originally coded. Since this check appears
in two places, we codify it into the function check_inode_unwritten
which we then call from the two sites, one freeing blocks and the
other freeing directory entries.

Submitted by:	Steinar Haug via Matthew Dillon
2000-01-18 01:33:05 +00:00
mckusick
37dbb3e53f Need to reorganize the flushing of directory entry (pagedep) dependencies
so that they never try to lock an inode corresponding to ".." as this
can lead to deadlock. We observe that any inode with an updated link count
is always pushed into its buffer at the time of the link count change, so
we do not need to do a VOP_UPDATE, but merely find its buffer and write it.
The only time we need to get the inode itself is from the result of a
mkdir whose name will never be ".." and hence locking such an inode will
never request a lock above us in the filesystem tree. Thanks to Brian
Fundakowski Feldman for providing the test program that tickled soft updates
into hanging in "inode" sleep.

Submitted by:	Brian Fundakowski Feldman <green@FreeBSD.org>
2000-01-18 01:30:03 +00:00
mckusick
c6b8373708 Better bounding on softdep_flushfiles; other minor tweeks to checks. 2000-01-17 06:35:11 +00:00
mckusick
e7e567fb65 Must track multiple uncommitted renames until one ultimately gets
committed to disk or is removed.
2000-01-17 06:28:18 +00:00
guido
e66131d414 Apply patches in rev 1.2 and 1.9 that I forgot
Pointe out by:	bde
2000-01-14 19:48:42 +00:00
dillon
53da3b72da Non-operational change, fix compiler warning.
Reviewed by:  mckusick
2000-01-14 04:39:28 +00:00
mckusick
7eac0e762a Confirming Peter's fix (locking 101: release the lock before you go
to sleep). Locking 101, part 2: do not look at buffer contents after
you have been asleep. There is no telling what wonderous changes may
have occurred.
2000-01-13 20:03:22 +00:00
guido
de7edf803a Bring over ipfilter kernel sources, including merging the local modifications. 2000-01-13 19:01:33 +00:00
peter
f45fdd3f47 Free the global softupdates lock prior to tsleep() in getdirtybuf().
This seems to be responsible for a bunch of panics where the process
sleeps and something else finds softupdates "locked" when it shouldn't
be.  This commit is unreviewed, but has been a big help here.
Previously my boxes would panic pretty much on the first fsync() that
wrote something to disk.
2000-01-13 18:48:12 +00:00
mckusick
e5a3075fbb Because cylinder group blocks are now written in background,
it is no longer sufficient to get a lock on a buffer to know
that its write has been completed. We have to first get the
lock on the buffer, then check to see if it is doing a
background write. If it is doing background write, we have
to wait for the background write to finish, then check to see
if that fullfilled our dependency, and if not to start another
write. Luckily the explanation is longer than the fix.
2000-01-13 07:20:01 +00:00
mckusick
28d13b9ecf A panic occurs during an fsync when a dirty block associated with
a vnode has not been written (which would clear certain of its
dependencies). The problems arises because fsync with MNT_NOWAIT
no longer pushes all the dirty blocks associated with a vnode. It
skips those that require rollbacks, since they will just get instantly
dirty again. Such skipped blocks are marked so that they will not be
skipped a second time (otherwise circular dependencies would never
clear). So, we fsync twice to ensure that everything will be written
at least once.
2000-01-13 07:17:39 +00:00
mckusick
57887aa35c We cannot proceed to free the blocks of the file until the dependencies
have been cleaned up by deallocte_dependencies(). Once that is done, it
is safe to post the request to free the blocks. A similar change is also
needed for the freefile case.
2000-01-11 06:52:35 +00:00
phk
ae0c1ec8f7 Give vn_isdisk() a second argument where it can return a suitable errno.
Suggested by:	bde
2000-01-10 12:04:27 +00:00
mckusick
b09e759229 Missing FREE_LOCK call before handle_workitem_freeblocks.
Submitted by:	"Kenneth D. Merry" <ken@kdm.org>
2000-01-10 08:39:03 +00:00
mckusick
d4409da210 Several performance improvements for soft updates have been added:
1) Fastpath deletions. When a file is being deleted, check to see if it
   was so recently created that its inode has not yet been written to
   disk. If so, the delete can proceed to immediately free the inode.
2) Background writes: No file or block allocations can be done while the
   bitmap is being written to disk. To avoid these stalls, the bitmap is
   copied to another buffer which is written thus leaving the original
   available for futher allocations.
3) Link count tracking. Constantly track the difference in i_effnlink and
   i_nlink so that inodes that have had no change other than i_effnlink
   need not be written.
4) Identify buffers with rollback dependencies so that the buffer flushing
   daemon can choose to skip over them.
2000-01-10 00:24:24 +00:00
mckusick
db94728905 Keep tighter control of removal dependencies by limiting the number
of dirrem structure rather than the collaterally created freeblks
and freefile structures. Limit the rate of buffer dirtying by the
syncer process during periods of intense file removal.
2000-01-09 23:35:38 +00:00
mckusick
51339d9a78 Reorganize softdep_fsync so that it only does the inode-is-flushed
check before the inode is unlocked while grabbing its parent directory.
Once it is unlocked, other operations may slip in that could make
the inode-is-flushed check fail. Allowing other writes to the inode
before returning from fsync does not break the semantics of fsync
since we have flushed everything that was dirty at the time of the
fsync call.
2000-01-09 23:14:57 +00:00
mckusick
722b90c9d5 Make static non-exported functions from soft updates. 2000-01-09 22:40:09 +00:00
eivind
0ab244240a KERNEL -> _KERNEL 2000-01-05 16:25:20 +00:00
eivind
cd012aae28 Garbage collect oltr_pci_shutdown 1999-12-21 08:21:36 +00:00
peter
9ab99bd843 The ipfilter module name wasn't exactly conventional.. 1999-12-20 15:49:38 +00:00
mckusick
f9019037ba The function request_cleanup() had a tsleep() with PCATCH. It is
quite dangerous, since the process may hold locks at the point,
and if it is stopped in that tsleep the machine may hang. Because
the sleep is so short, the PCATCH is not required here, so it has
been removed. For the future, the FreeBSD team needs to decide
whether it is still reasonable to stop a process in tsleep, as that
may affect any other code that uses PCATCH while holding kernel locks.

Submitted by:	Dmitrij Tejblum <tejblum@arc.hq.cti.ru>
Reviewed by:	Kirk McKusick <mckusick@mckusick.com>
1999-12-16 22:02:09 +00:00
eivind
287836faea Lock reporting and assertion changes.
* lockstatus() and VOP_ISLOCKED() gets a new process argument and a new
  return value: LK_EXCLOTHER, when the lock is held exclusively by another
  process.
* The ASSERT_VOP_(UN)LOCKED family is extended to use what this gives them
* Extend the vnode_if.src format to allow more exact specification than
  locked/unlocked.

This commit should not do any semantic changes unless you are using
DEBUG_VFS_LOCKS.

Discussed with:	grog, mch, peter, phk
Reviewed by:	peter
1999-12-11 16:13:02 +00:00
ken
235e74ef14 Revamp the devstat priority system. All disks now have the same priority.
The same goes for CD drivers and tape drivers.  In systems with mixed IDE
and SCSI, devices in the same priority class will be sorted in attach
order.

Also, the 'CCD' priority is now the 'ARRAY' priority, and a number of
drivers have been modified to use that priority.

This includes the necessary changes to all drivers, except the ATA drivers.
Soren will modify those separately.

This does not include and does not require any change in the devstat
version number, since no known userland applications use the priority
enumerations.

Reviewed by:	msmith, sos, phk, jlemon, mjacob, bde
1999-12-08 04:45:23 +00:00
guido
0f8152eb00 Last minute patch that I forgot to apply: check return code of iplattach() 1999-12-06 21:21:47 +00:00
cvs2svn
5b3b642ec0 This commit was manufactured by cvs2svn to create branch
'VENDOR-sys-ipfilter'.
1999-12-06 20:36:52 +00:00
guido
4cc3cbace7 Revive mlfk_ipl here. This version is slightly changed from
the old one: an unnecessary define (KLD_MODULE) has been deleted and
the initialisation of the module is  done after domaininit was called
to be sure inet is running.

Some slight changed were made to ip_auth.c and ip_state.c in order
to assure including of sys/systm.h in case we make a kld

Make sure ip_fil does nmot include osreldate in kernel mode

Remove mlfk_ipl.c from here: no sources allowed in these directories!
1999-12-06 20:36:50 +00:00
billf
3d7f6e72a3 Fix typo, add $FreeBSD$ 1999-12-03 00:34:26 +00:00
peter
948036bd20 Fix a stray (ifdef'ed) reference to a non-existing file. 1999-11-29 13:31:02 +00:00
guido
8eccd0ab73 Get rid of useless osreldate include for KLD/LKM modules (sys/param.h
already carries what is needed).
This is needed for the KLD support.
1999-11-23 22:16:41 +00:00
guido
75b4f99d65 Add kernel parts of revived ipfilter (3.3.3.) 1999-11-23 21:44:59 +00:00
phk
1848d96439 Convert various pieces of code to use vn_isdisk() rather than checking
for vp->v_type == VBLK.

In ccd: we don't need to call VOP_GETATTR to find the type of a vnode.

Reviewed by:    sos
1999-11-22 10:33:55 +00:00
phk
1adcecffd9 struct mountlist and struct mount.mnt_list have no business being
a CIRCLEQ.  Change them to TAILQ_HEAD and TAILQ_ENTRY respectively.

This removes ugly  mp != (void*)&mountlist  comparisons.

Requested by:   phk
Submitted by:   Jake Burkholder jake@checker.org
PR:             14967
1999-11-20 10:00:46 +00:00
phk
942fabe617 Finding root devices is a much more sane thing now. 1999-11-10 10:50:51 +00:00
dfr
229cdb9144 * Add struct resource_list* argument to resource_list_alloc and
resource_list_release. This removes the dependancy on the
  layout of ivars.

* Move set_resource, get_resource and delete_resource from
  isa_if.m to bus_if.m.

* Simplify driver code by providing wrappers to those methods:

     bus_set_resource(dev, type, rid, start, count);
     bus_get_resource(dev, type, rid, startp, countp);
     bus_get_resource_start(dev, type, rid);
     bus_get_resource_count(dev, type, rid);
     bus_delete_resource(dev, type, rid);

* Delete isa_get_rsrc and use bus_get_resource_start instead.

* Fix a stupid typo in isa_alloc_resource reported by Takahashi
  Yoshihiro <nyan@FreeBSD.org>.

* Print a diagnostic message if we can't assign resources to a PnP
  device.

* Change device_print_prettyname() so that it doesn't print
  "(no driver assigned)-1" for anonymous devices.
1999-10-12 21:35:51 +00:00
phk
3e30281358 remove unused #includes. 1999-10-11 19:12:30 +00:00
peter
c5fae33605 Nuke the old antique copy of ipfilter from the tree. This is old enough
to be dangerous.  It will better serve us as a port building a KLD,
ala SKIP.

The hooks are staying although it would be better to port and use
the NetBSD pfil interface rather than have custom hooks.
1999-10-10 15:09:59 +00:00
phk
e9e0512210 Remove five now unused fields from struct cdevsw. They should never
have been there in the first place.  A GENERIC kernel shrinks almost 1k.

Add a slightly different safetybelt under nostop for tty drivers.

Add some missing FreeBSD tags
1999-09-25 18:24:47 +00:00
phk
d612df1de6 Remove NBPF conditionality of bpf calls in most of our network drivers.
This means that we will not have to have a bpf and a non-bpf version
of our driver modules.

This does not open any security hole, because the bpf core isn't loadable

The drivers left unchanged are the "cross platform" drivers where the respective
maintainers are urged to DTRT, whatever that may be.

Add a couple of missing FreeBSD tags.
1999-09-25 12:06:01 +00:00
phk
a41657c540 Use devstat_end_transaction_buf() rather than Use devstat_end_transaction() 1999-09-18 21:30:27 +00:00
phk
12c22f65a5 Bite the bullet and allocate the devsw entry at compile time. 1999-09-12 20:40:29 +00:00
phk
22b8607abf Use a different tactic when creating the devsw so that disk_create()
doesn't need to malloc.
1999-09-12 09:16:00 +00:00
phk
3f39c0c765 Update docs for 3.3-R
OK'ed by:	jkh
1999-09-08 12:42:15 +00:00
peter
4b3b93bd90 Clean $Log$ debris. 1999-09-06 07:26:52 +00:00
phk
5cc364cfd3 Improve the micro "disk" layer after gaining more experience with it. 1999-09-01 05:38:09 +00:00
phk
fa702b9bb3 Remove unneeded slice element. 1999-08-29 14:52:02 +00:00
phk
ee7265381c Convert to use the new "disk" layer.
A few cleanups while here.
1999-08-29 13:29:29 +00:00
phk
9c72381e09 We don't need to pass the diskname argument all over the diskslice/label
code, we can find the name from any convenient dev_t
1999-08-28 14:33:44 +00:00
peter
d41244b69e $Id$ -> $FreeBSD$ 1999-08-28 02:16:32 +00:00
peter
3b842d34e8 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
phk
c640158ac4 SMP: Release the giant lock while we work the flash array
Use splbio() rather than fiddling the hardware interrupts.
Remove the compatibility stuff for older FreeBSD versions.
Add devstat support.
1999-08-15 14:30:09 +00:00
phk
5f45261e99 Spring cleaning around strategy and disklabels/slices:
Introduce BUF_STRATEGY(struct buf *, int flag) macro, and use it throughout.
please see comment in sys/conf.h about the flag argument.

Remove strategy argument from all the diskslice/label/bad144
implementations, it should be found from the dev_t.

Remove bogus and unused strategy1 routines.

Remove open/close arguments from dssize().  Pick them up from dev_t.

Remove unused and unfinished setgeom support from diskslice/label/bad144 code.
1999-08-14 11:40:51 +00:00
phk
e938d317d5 Decommision miscfs/specfs/specdev.h. Most of it goes into <sys/conf.h>,
a few lines into <sys/vnode.h>.

Add a few fields to struct specinfo, paving the way for the fun part.
1999-08-08 18:43:05 +00:00
bde
99e98dba54 Fixed a bogus include pathname which broke compiling in an obj directory. 1999-08-07 13:11:12 +00:00
bde
2521c81c48 Fixed syntax errors. Code should be tested before committing it, or at
least before enabling it in LINT and merging it into RELENG_3.
1999-08-07 13:09:30 +00:00
phk
ba1d30f976 Better way to circumvent the boot problem on older versions.
Submitted by:	Larry Baird <lab@gta.com>
1999-08-06 17:06:49 +00:00
phk
5b101ade52 Add driver support for M-systems DiskOnChip Products.
Sponsored by:	M-systems Inc.	http://www.m-sys.com
1999-08-06 15:59:07 +00:00