dragonfly.git
13 years agoHook nfe(4) into module building
Sepherosa Ziehau [Sun, 27 Aug 2006 03:36:08 +0000 (03:36 +0000)]
Hook nfe(4) into module building

13 years ago- Port nfe(4) from OpenBSD.
Sepherosa Ziehau [Sun, 27 Aug 2006 03:28:21 +0000 (03:28 +0000)]
- Port nfe(4) from OpenBSD.
- Use spare RX DMA map to recover from bus_dmamap_load_mbuf() failure in
  nfe_newbuf_sda().
- In nfe_encap(), properly handle excessive fragmented frame with m_defrag(),
  instead of descard it.
- Use additional serializer to protect jumbo buffer pool.
- In nfe_enacp(), set NFE_TX_VALID for each segments after all segment
  are in place.  Otherwise TX engine will be confused and never generates
  TX interrupts, which triggers the unpleasant "watchdog timeout".
Diagnosed-and-fixed-by: dillon@
- Add polling(4) support.  By: dillon@

Thank Jonathan Gray <jsg@openbsd.org> and
Damien Bergamini <damien.bergamini@free.fr> for their work on this driver.

Thank Matthew Dillon (dillon@) for diagnosing and fixing the serious bug
in TX path.

Tested-by: dillon@ corecode@(an early version)
13 years agoMove atomic_intr_t to machine/stdint.h and predent __ to reduce
Joerg Sonnenberger [Sat, 26 Aug 2006 17:43:54 +0000 (17:43 +0000)]
Move atomic_intr_t to machine/stdint.h and predent __ to reduce
namespace pollution. Include that file in sys/serialize.h instead
of machine/atomic.h to dramatically reduce namespace pollution of
userland applications.

13 years ago-WARNS6 cleanup (4670 warnings)
Peter Avalos [Sat, 26 Aug 2006 17:05:05 +0000 (17:05 +0000)]
-WARNS6 cleanup (4670 warnings)
-ANSI function declarations
-Staticize functions
-Rename local variables that shadowed global declarations
-Remove an extra semicolon after an if statement in makemaze()
-Remove code that was previously commented out, or that was unused
-Use NULL for string pointers == 0 and don't redefine NULL
-Add function protoypes for all functions
-Add macros for stty and gtty that use ioctl which removes the dependency
on libcompat.
-Add DragonFly keyword where needed
-Add new arrays (potionhide/scrollhide) to prevent modifying string
constants, then fix problems associated with this hiding
mechanism.  (taken from NetBSD)

13 years agoDocument the recent upgrade of the printf and scanf families of functions.
Sascha Wildner [Sat, 26 Aug 2006 10:27:55 +0000 (10:27 +0000)]
Document the recent upgrade of the printf and scanf families of functions.

Taken-from:   FreeBSD
Submitted-by: Trevor Kendall <trevorjkendall@gmail.com>
13 years agoRemove more DEC Alpha support.
Sascha Wildner [Fri, 25 Aug 2006 22:37:09 +0000 (22:37 +0000)]
Remove more DEC Alpha support.

13 years agoMerge rev 1.96 of NetBSD's net/if_spppsubr.c:
Joerg Sonnenberger [Wed, 23 Aug 2006 20:43:17 +0000 (20:43 +0000)]
Merge rev 1.96 of NetBSD's net/if_spppsubr.c:
  A problem has been identified in the in-kernel PPP code shared by ISDN PPP
  interfaces ippp(4) and pppoe(4). Insufficient checking of options presented
  by the peer may cause writing of copies of the malicious input beyond the
  end of a buffer allocated for that purpose.

  Issue found by pavel@
  Fix from martin@

  This is SA2006-019 (CVE-2006-4304)

13 years agoSome more fixes:
Sascha Wildner [Wed, 23 Aug 2006 18:29:02 +0000 (18:29 +0000)]
Some more fixes:

* Add /home and /sys

* Fix alphabetic order for /modules and /mnt

* Add mdoc for pathnames

13 years agoGeneral overhaul to bring hier(7) closer to reality:
Sascha Wildner [Wed, 23 Aug 2006 17:51:39 +0000 (17:51 +0000)]
General overhaul to bring hier(7) closer to reality:

* Remove obsolete entries.

* Add some missing entries.

* Adjust column widths.

* ports -> pkgsrc

* Add some .Pp macros to separate subdirectories.

Based on a patch submitted by: Victor Balada Diaz <victor@bsdes.net>

13 years agoBring in the initial cut of the Cache Coherency Management System module.
Matthew Dillon [Wed, 23 Aug 2006 06:45:40 +0000 (06:45 +0000)]
Bring in the initial cut of the Cache Coherency Management System module.
Add a sysctl kern.ccms_enable for testing.  CCMS operations are disabled by
default.

The comment below describes the whole enchillada.  Only basic locking has
been implemented in this commit.

CCMS is a duel-purpose cache management layer based around offset ranges.

#1 - Threads on the local machine can obtain shared, exclusive, and modifying
     range locks.  These work kinda like lockf locks and the kernel will use
     them to enforce UNIX I/O atomicy rules.

#2 - The BUF/BIO/VM system can manage the cache coherency state for offset
     ranges.  That is, Modified/Exclusive/Shared/Invalid (and two more
     advanced states).

     These cache states to not represent the state of data we have cached.
     Instead they represent the best case state of data we are allowed
     to cache within the range.

     The cache state for a single machine (i.e. no cluster), for every
     CCMS data set, would simply be 'Exclusive' or 'Modified' for the
     entire 64 bit offset range.

The way this works in general is that the locking layer is used to enforce
UNIX I/O atomicy rules locally and to generally control access on the local
machine.  The cache coherency layer would maintain the cache state for
the object's entire offset range.  The local locking layer would be used
to prevent demotion of the underlying cache state, and modifications to the
cache state might have the side effect of communicating with other machines
in the cluster.

Take a typical write().  The offset range in the file would first be locked,
then the underlying cache coherency state would be upgraded to Modified.
If the underlying cache state is not compatible with the desired cache
state then communication might occur with other nodes in the cluster in
order to gain exclusive access to the cache elements in question so they
can be upgraded to the desired state.  Once upgraded, the range lock
prevents downgrading until the operation completes.  This of course can
result in a deadlock between machines and deadlocks would have to be dealt
with.

Likewise, if a remote machine needs to upgrade its representation of
the cache state for a particular file it might have to communicate with
us in order to downgrade our cache state.  If a remote machine
needs an offset range to be Shared then we have to downgrade our
cache state for that range to Shared or Invalid.  This might have side
effects on us such as causing any dirty buffers or VM pages to be flushed
to disk.  If the remote machine needs to upgrade its cache state to
Exclusive then we have to downgrade ours to Invalid, resulting in a
flush and discard of the related buffers and VM pages.

Both range locks and range-based cache state is stored using a common
structure called a CST, in a red-black tree.  All operations are
approximately N*LOG(N).  CCMS uses a far superior algorithm to the one
that the POSIX locking code (lockf) has to use.

It is important to note that layer #2 cache state is fairly persistent
while layer #1 locks tend to be ephermal.  To prevent too much
fragmentation of the data space the cache state for adjacent elements
may have to be actively merged (either upgraded or downgraded to match).
The buffer cache and VM page caches are naturally fragmentory, but we
really do not want the CCMS representation to be too fragmented.  This
also gives us the opportunity to predispose our CCMS cache state so
I/O operations done on the local machine are not likely to require
communication with other hosts in the cluster.  The cache state as
stored in CCMS is a superset of the actual buffers and VM pages cached
on the local machine.

13 years agoFix format string to process all arguments. Noticed by Trevor Kendall
Joerg Sonnenberger [Tue, 22 Aug 2006 13:02:30 +0000 (13:02 +0000)]
Fix format string to process all arguments. Noticed by Trevor Kendall
in private mail.

13 years ago-WARNS6 cleanup (7422 warnings)
Peter Avalos [Mon, 21 Aug 2006 19:45:32 +0000 (19:45 +0000)]
-WARNS6 cleanup (7422 warnings)
-ANSI function declarations
-staticize functions
-use stdbool.h where needed
-remove (void) casts for unchecked function returns
-put extern function declarations and variables in hack.h
-remove code that was previously commented out
-rename local variables where needed that were colliding with globals
-use variable argument lists from stdarg.h
-add DragonFly keyword

13 years agoRemove register specifier.
Sascha Wildner [Sun, 20 Aug 2006 22:18:48 +0000 (22:18 +0000)]
Remove register specifier.

13 years agoVNode sequencing and locking - part 4/4 - subpart 1 of many.
Matthew Dillon [Sat, 19 Aug 2006 17:27:25 +0000 (17:27 +0000)]
VNode sequencing and locking - part 4/4 - subpart 1 of many.

Move the vnode lock for VOP_READDIR out of the kernel upper layers and
into the filesystem.

13 years agoCorrect the rgephy driver so that it only applies the DSP fixup for
Sepherosa Ziehau [Sat, 19 Aug 2006 09:33:37 +0000 (09:33 +0000)]
Correct the rgephy driver so that it only applies the DSP fixup for
PHY revs 0 and 1.  Later chips are fixed and don't need the fixup.

Make the rgephy driver advertise both 1000_FD and 1000_HD bits in
autoneg mode.  A couple of the devices don't autoneg correctly unless
configured this way.

Obtained-from: FreeBSD (wpaul@freebsd.org)

13 years agoComment out WARNS line. libc is not even WARNS=0 clean.
Sascha Wildner [Sat, 19 Aug 2006 09:14:27 +0000 (09:14 +0000)]
Comment out WARNS line. libc is not even WARNS=0 clean.

13 years agoRemove coda remains.
Sascha Wildner [Sat, 19 Aug 2006 01:36:39 +0000 (01:36 +0000)]
Remove coda remains.

13 years agoProperly update the mtime for directories.
Matthew Dillon [Fri, 18 Aug 2006 16:05:00 +0000 (16:05 +0000)]
Properly update the mtime for directories.

Requested-by: Oliver Fromme <check+j46qnt00rswghizp@fromme.com>
13 years agoThe coda filesystem is gone from the system.
Sascha Wildner [Fri, 18 Aug 2006 08:22:43 +0000 (08:22 +0000)]
The coda filesystem is gone from the system.

13 years agoUpgrade to sendmail 8.13.8
Gregory Neil Shapiro [Fri, 18 Aug 2006 03:07:00 +0000 (03:07 +0000)]
Upgrade to sendmail 8.13.8

13 years agoFix section ordering.
Sascha Wildner [Fri, 18 Aug 2006 01:42:58 +0000 (01:42 +0000)]
Fix section ordering.

13 years agoFix a memory leak and greatly reduce the memory allocated when remembering
Matthew Dillon [Fri, 18 Aug 2006 01:13:51 +0000 (01:13 +0000)]
Fix a memory leak and greatly reduce the memory allocated when remembering
hardlinked files.

13 years agoRemove the coda fs. It hasn't worked in a long time.
Matthew Dillon [Thu, 17 Aug 2006 22:07:52 +0000 (22:07 +0000)]
Remove the coda fs.  It hasn't worked in a long time.

13 years agoAdd DragonFly instructions file to new version directory
Gregory Neil Shapiro [Thu, 17 Aug 2006 05:52:16 +0000 (05:52 +0000)]
Add DragonFly instructions file to new version directory

13 years agoMerge from vendor branch SENDMAIL:
Gregory Neil Shapiro [Thu, 17 Aug 2006 05:50:12 +0000 (05:50 +0000)]
Merge from vendor branch SENDMAIL:
Import sendmail 8.13.8

13 years agoImport sendmail 8.13.8
Gregory Neil Shapiro [Thu, 17 Aug 2006 05:50:12 +0000 (05:50 +0000)]
Import sendmail 8.13.8

13 years agoAdd a postscript printer filter example using ghostscript for a
Matthew Dillon [Tue, 15 Aug 2006 16:21:23 +0000 (16:21 +0000)]
Add a postscript printer filter example using ghostscript for a
non-postscript HP laserjet.

13 years agoUse nl_langinfo(3) to obtain the format string for strftime(3).
Sascha Wildner [Mon, 14 Aug 2006 07:37:38 +0000 (07:37 +0000)]
Use nl_langinfo(3) to obtain the format string for strftime(3).

Suggested-by: joerg
13 years agoGenerate a nice message and make sure the program exits if we lose a
Matthew Dillon [Mon, 14 Aug 2006 02:41:10 +0000 (02:41 +0000)]
Generate a nice message and make sure the program exits if we lose a
pipe to a remote machine.

13 years agoOops! Add null character.
Sascha Wildner [Sun, 13 Aug 2006 22:08:14 +0000 (22:08 +0000)]
Oops! Add null character.

13 years agoUse dirty trick to silence -Wformat warning.
Sascha Wildner [Sun, 13 Aug 2006 22:00:45 +0000 (22:00 +0000)]
Use dirty trick to silence -Wformat warning.

13 years agoFix typo in comment.
Sascha Wildner [Sun, 13 Aug 2006 20:55:12 +0000 (20:55 +0000)]
Fix typo in comment.

Submitted-by: Trevor Kendall <trevorjkendall@gmail.com>
13 years agoAdd a remote host capability for both the source and target directory
Matthew Dillon [Sun, 13 Aug 2006 20:51:40 +0000 (20:51 +0000)]
Add a remote host capability for both the source and target directory
specifications.  A specification in the form user@host:path will initiate
a ssh link to the remote machine and attempt to run a cpdup slave.

The protocol is not all that fast but it is a good start.  The cpignore
and md5 features are not currently available for remote sources and the
fsmid feature is not currently available for remote targets.  However, the
incremental backup feature (-H) *IS* available.

The code is currently considered to be highly experimental and does
not yet adjust for mismatched byte orderings (but the protocol is designed
to make this possible in the future).

13 years agoFix wording.
Sascha Wildner [Sun, 13 Aug 2006 20:50:26 +0000 (20:50 +0000)]
Fix wording.

Submitted-by: Trevor Kendall <trevorjkendall@gmail.com>
13 years agoAdd some linux compatibility defines, _DIRENT_HAVE_D_NAMLEN and
Matthew Dillon [Sun, 13 Aug 2006 19:19:47 +0000 (19:19 +0000)]
Add some linux compatibility defines, _DIRENT_HAVE_D_NAMLEN and
_DIRENT_HAVE_D_TYPE.

13 years agoUse proper casts to silence warnings.
Sascha Wildner [Sun, 13 Aug 2006 19:19:44 +0000 (19:19 +0000)]
Use proper casts to silence warnings.

13 years agoAdd a #define that source code can check to determine that the stat
Matthew Dillon [Sun, 13 Aug 2006 19:12:04 +0000 (19:12 +0000)]
Add a #define that source code can check to determine that the stat
structure has a st_flags field.

13 years agoUse 'j' size modifier for printf'ing ino_t.
Sascha Wildner [Sun, 13 Aug 2006 18:16:04 +0000 (18:16 +0000)]
Use 'j' size modifier for printf'ing ino_t.

13 years agoSilence warning.
Sascha Wildner [Sun, 13 Aug 2006 16:21:34 +0000 (16:21 +0000)]
Silence warning.

13 years agoRemove unnecessary argument.
Sascha Wildner [Sun, 13 Aug 2006 02:18:51 +0000 (02:18 +0000)]
Remove unnecessary argument.

13 years agoInitialize local variable.
Sascha Wildner [Sun, 13 Aug 2006 02:15:07 +0000 (02:15 +0000)]
Initialize local variable.

13 years agoRemove unused string.
Sascha Wildner [Sun, 13 Aug 2006 02:13:45 +0000 (02:13 +0000)]
Remove unused string.

13 years agoFix dubious construct.
Sascha Wildner [Sun, 13 Aug 2006 02:12:18 +0000 (02:12 +0000)]
Fix dubious construct.

13 years agos/FreeBSD/DragonFly/
Sascha Wildner [Sat, 12 Aug 2006 22:42:29 +0000 (22:42 +0000)]
s/FreeBSD/DragonFly/

[forgotten in my previous commit]

Submitted-by: Trevor Kendall <trevorjkendall@gmail.com>
13 years ago* s/FreeBSD/DragonFly/
Sascha Wildner [Sat, 12 Aug 2006 22:34:23 +0000 (22:34 +0000)]
* s/FreeBSD/DragonFly/

* Fix spelling & grammar mistakes.

Submitted-by: Trevor Kendall <trevorjkendall@gmail.com>
13 years agoUpdate the X11 path for the default login.conf.
Matthew Dillon [Sat, 12 Aug 2006 16:47:18 +0000 (16:47 +0000)]
Update the X11 path for the default login.conf.

Reported-by: Francois Tigeot <ftigeot@wolfpond.org>
13 years agoFor some iwi(4), the frequency of firmware error is very high, so resurrect
Sepherosa Ziehau [Sat, 12 Aug 2006 13:43:21 +0000 (13:43 +0000)]
For some iwi(4), the frequency of firmware error is very high, so resurrect
firmware monitor thread, which will reinitialize firmware if some firmware
errors occur.  Rearrange the firmware monitor code to avoid possible races.

Reported-by: Tom Hummel <tom@bluespice.org>
Tested-by: Tom Hummel <tom@bluespice.org>
13 years agoSync with Intel's em(4) driver version 6.1.4
Sepherosa Ziehau [Sat, 12 Aug 2006 13:03:44 +0000 (13:03 +0000)]
Sync with Intel's em(4) driver version 6.1.4
- Add support for new chipset revisions embedded in the ESB2 and ICH8 core
  logic chipsets.
- Add PCI id for the PCIe quad port copper adapter. [*]
- Improve media support for fiber adapters. [*]
- Instead of creating TX DMA map in em_encap(), create all of the during
  em_init().
  Fix a bug in Intel's code:
  The TX desc used to hold mbuf, does not necessarily have the DMA map
  that is used to load the mbuf, so in em_clean_transmit_interrupts() or
  during em_stop(), wrong DMA map may be used.
- Update README

Bug fixes:
- Properly serialize em_shutdown()
- (BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD) -> BUS_DMASYNC_PREWRITE
- Correct polling(4) support: disable interrupt if polling(4) is enabled.

Tested with an 82540EM.

# I have committed a slightly different version(6.1.4) than the version(6.0.5)
# posted to submit@, since 6.1.4 came immediately after my submission for
# testing/reviewing, and the difference between it and the submitted version
# is really very small (only added [*] part).

13 years ago* Remove bsd.cpu.gcc2.mk and bsd.cpu.gcc3.mk since those GCC versions
Sascha Wildner [Sat, 12 Aug 2006 05:42:26 +0000 (05:42 +0000)]
* Remove bsd.cpu.gcc2.mk and bsd.cpu.gcc3.mk since those GCC versions
  have been removed from the system.

* Remove handling of $CCVER values "gcc2" and "gcc3". The gcc2 override
  in src/Makefile is not changed.

* In bsd.README, add some descriptions and missing files.

* In boot2, remove the __USING_MRTD__ handling because it is no longer
  needed.

Based-on-patch-by: Trevor Kendall <trevorjkendall@gmail.com>
13 years agoCorrect path.
Sascha Wildner [Sat, 12 Aug 2006 05:30:17 +0000 (05:30 +0000)]
Correct path.

13 years agoUse pcidevs.h
Sascha Wildner [Sat, 12 Aug 2006 05:19:46 +0000 (05:19 +0000)]
Use pcidevs.h

13 years agoUse pcidevs.h
Sascha Wildner [Sat, 12 Aug 2006 05:18:31 +0000 (05:18 +0000)]
Use pcidevs.h

13 years agoUse pcidevs.h's definition of the BCM5714 id.
Sascha Wildner [Sat, 12 Aug 2006 05:17:03 +0000 (05:17 +0000)]
Use pcidevs.h's definition of the BCM5714 id.

13 years agoregenerate
Sascha Wildner [Sat, 12 Aug 2006 05:14:45 +0000 (05:14 +0000)]
regenerate

13 years agoAdd ids for Broadcom's BCM5714 and Comtrol RocketPort boards.
Sascha Wildner [Sat, 12 Aug 2006 05:12:51 +0000 (05:12 +0000)]
Add ids for Broadcom's BCM5714 and Comtrol RocketPort boards.

Taken-from: NetBSD

While I'm here, order the Broadcom devices numerically.

13 years agoSilence LINT warning.
Sascha Wildner [Sat, 12 Aug 2006 05:06:48 +0000 (05:06 +0000)]
Silence LINT warning.

13 years agoVNode sequencing and locking - part 3/4.
Matthew Dillon [Sat, 12 Aug 2006 00:26:22 +0000 (00:26 +0000)]
VNode sequencing and locking - part 3/4.

VNode aliasing is handled by the namecache (aka nullfs), so there is no
longer a need to have VOP_LOCK, VOP_UNLOCK, or VOP_ISSLOCKED as 'VOP'
functions.  Both NFS and DEADFS have been using standard locking functions
for some time and are no longer special cases.  Replace all uses with
native calls to vn_lock, vn_unlock, and vn_islocked.

We can't have these as VOP functions anyhow because of the introduction of
the new SYSLINK transport layer, since vnode locks are primarily used to
protect the local vnode structure itself.

13 years agoVNode sequencing and locking - part 2/4.
Matthew Dillon [Fri, 11 Aug 2006 01:55:02 +0000 (01:55 +0000)]
VNode sequencing and locking - part 2/4.

Control access to v_usecount and v_holdcnt with the vnode's lock's spinlock.
Use the spinlock to interlock the VRECLAIMED and VINACTIVE flags during
1->0 and 0->1 transitions.  N->N+1 transitions do not need to obtain the
spinlock and simply use a locked bus cycle increment.  Vnode operations
are still not MP safe but this gets further along that road.

The lockmgr can no longer fail when obtaining an exclusive lock, remove
the error code return from vx_lock() and vx_get().  Add special lockmgr
support routines to atomically acquire and release an exclusive lock
when the caller is already holding the spinlock.

The removal of vnodes from the vnode free list is now defered.  Removal
only occurs when allocvnode() encounters a vnode on the list which should
not be on it.  This improves critical code paths for vget(), vput() and
vrele() by removing unnecessary manipulation of the freelist.

Fix a lockmgr bug where wakeup() was being called with a spinlock held.
Instead, defer the wakeup until after the spinlock is released.

13 years agoVNode sequencing and locking - part 1/4.
Matthew Dillon [Wed, 9 Aug 2006 22:47:36 +0000 (22:47 +0000)]
VNode sequencing and locking - part 1/4.

Separate vref() for the case where the ref count is already non-zero (which
is nearly all uses of vref()), vs the case where it might be zero.  Clean
up the code in preparation for putting it under a spinlock.

13 years agoChecking commit emails.
Peter Avalos [Wed, 9 Aug 2006 20:51:05 +0000 (20:51 +0000)]
Checking commit emails.

13 years agoProtect the pfshead[] hash table with a token.
Matthew Dillon [Tue, 8 Aug 2006 21:36:28 +0000 (21:36 +0000)]
Protect the pfshead[] hash table with a token.

13 years ago-WARNS6 cleanup
Peter Avalos [Tue, 8 Aug 2006 17:08:49 +0000 (17:08 +0000)]
-WARNS6 cleanup
-ANSI function declarations
-use M_PI instead of defining our own PI
-staticize functions

13 years ago-WARNS6 cleanup
Peter Avalos [Tue, 8 Aug 2006 17:05:14 +0000 (17:05 +0000)]
-WARNS6 cleanup
-ANSI function declarations
-staticize functions
-remove (void) casts for unchecked function returns

13 years ago-WARNS6 cleanups (36 warnings)
Peter Avalos [Tue, 8 Aug 2006 16:58:59 +0000 (16:58 +0000)]
-WARNS6 cleanups (36 warnings)
-use bool from stdbool.h instead of making our own type

13 years agoRemove fortunes-o in the clean target.
Peter Avalos [Tue, 8 Aug 2006 16:52:53 +0000 (16:52 +0000)]
Remove fortunes-o in the clean target.

13 years ago-WARNS6 cleanup (1441 warnings)
Peter Avalos [Tue, 8 Aug 2006 16:47:20 +0000 (16:47 +0000)]
-WARNS6 cleanup (1441 warnings)
-ANSI function declarations
-staticize functions

13 years ago-WARNS6 cleanup (1858 warnings)
Peter Avalos [Tue, 8 Aug 2006 16:36:11 +0000 (16:36 +0000)]
-WARNS6 cleanup (1858 warnings)
-ANSI function declarations
-staticize functions
-Change if(x = foo(y)) constructs to if((x = foo(y)) != 0)
-Add $DragonFly$ where needed

13 years ago-WARNS6 cleanups (452 warnings)
Peter Avalos [Tue, 8 Aug 2006 15:03:02 +0000 (15:03 +0000)]
-WARNS6 cleanups (452 warnings)
-staticize functions
-ANSI function declarations
-Add $DragonFly$ keyword where needed

-Thanks to swildner for some of the yacc and lex cleanups.

13 years agoLK_NOPAUSE no longer serves a purpose, scrap it.
Matthew Dillon [Tue, 8 Aug 2006 03:52:45 +0000 (03:52 +0000)]
LK_NOPAUSE no longer serves a purpose, scrap it.

13 years agominor syslink cleanups to get the syslink_read() and syslink_write()
Matthew Dillon [Tue, 8 Aug 2006 01:27:14 +0000 (01:27 +0000)]
minor syslink cleanups to get the syslink_read() and syslink_write()
skeletons to work properly.

13 years agoInstead of indirectly calling vop_stdlock() and friends, install direct
Matthew Dillon [Tue, 8 Aug 2006 01:23:07 +0000 (01:23 +0000)]
Instead of indirectly calling vop_stdlock() and friends, install direct
vectors.

13 years agoFix a BM control -related panic by bringing rev 1.44-1.45
YONETANI Tomokazu [Mon, 7 Aug 2006 23:27:22 +0000 (23:27 +0000)]
Fix a BM control -related panic by bringing rev 1.44-1.45
of acpi_cpu.c from FreeBSD:
 revision 1.45
 date: 2004-10-11 21:15:10 +0000;  author: njl;  state: Exp;  lines: +28 -16;
 Update C3 support when BM control is not present.

 * Fix a bug where caches were flushed on non-C3 transitions.
 * Be sure a working flush cache instruction is present before using it.
 * Disable C3 completely if it isn't present.
 ----------------------------
 revision 1.44
 date: 2004-10-11 06:06:42 +0000;  author: njl;  state: Exp;  lines: +28 -17;
 If bus mastering control is not available (PM2_BLK), don't just disable
 C3.  Instead, flush caches before entering C3.  This may be slower but
 provides good power savings.

Reported-by: Richard Nyberg <rnyberg at murmeldjur.se>
13 years agoAdd a pointer to boot(8) where the kernel options are actually documented.
Sascha Wildner [Mon, 7 Aug 2006 19:45:56 +0000 (19:45 +0000)]
Add a pointer to boot(8) where the kernel options are actually documented.

Noticed-by: Victor Balada Diaz <victor@bsdes.net>
13 years agoAdd structures and skeleton code for a new system call called syslink()
Matthew Dillon [Sun, 6 Aug 2006 18:56:46 +0000 (18:56 +0000)]
Add structures and skeleton code for a new system call called syslink()
which will support the kernel syslink API.  This is the link protocol that
will be used for user<->kernel (e.g. user VFS) and kernel<->kernel (cluster)
communications.

Syslink-based protocols will be used for DEV, VFS, CCMS, and other
cluster-related operations.

13 years agoPerform the following cleanup in sys/dev/netif:
Sascha Wildner [Sun, 6 Aug 2006 12:49:06 +0000 (12:49 +0000)]
Perform the following cleanup in sys/dev/netif:

* Ansify function definitions.

* Remove (void) casts for discarded return values.

* Remove register keywords.

* Move types and names in function definitions on separate lines.

In-collaboration-with: Alexey Slynko <slynko@tronet.ru>
Reviewed-by: sephe
13 years agoSync MII support with NetBSD/OpenBSD:
Sepherosa Ziehau [Sun, 6 Aug 2006 10:32:23 +0000 (10:32 +0000)]
Sync MII support with NetBSD/OpenBSD:
- Standard conforming GMII support:
  1) replace mii_media_add() with mii_phy_add_media().
  2) ukphy has generic GMII support now, thus retire nvphy.
- Factor common code of PHY modules out into mii_physubr.c, noticably
  mii_phy_{set_media, tick, update}().
  In order to support this refactoring:
  1) mii_softc.{mii_reset,mii_status} funtion pointers are added, which are
     used to reset PHY modules and get PHY modules' status.
  2) mii_softc.mii_anegticks is added, which is used by PHY modules to tell
     mii_phy_tick(), how often auto-negociation should happen.  Two commonly
     used values are defined as MII_ANEGTICKS and MII_ANEGTICKS_GIGE.
     mii_softc.mii_anegticks is set to MII_ANEGTICKS by default.
- Add mii_softc.mii_media_status and rename mii_softc.mii_active to
  mii_softc.mii_media_active.  Now changes in either one of them will cause
  MIIBUS_STATCHG() being involked.
- For PHY modules that utilize mii_phy_add_media(), ifmedia_entry.ifm_data
  no longer stores value of BMCR.  It stores an index of mii_media_table[],
  which stores BMCR, ANAR and GTCR.
- Replace slightly different PHY modules detach routines with ukphy_detach().
- Use OUI and MODEL id array + mii_phy_match() in PHY modules probe routines,
  instead of original large `if, else if' or `switch' code segment.
- Support more OUIs and MODELs in individual PHY module.
- Make the usage of `mii' and `sc' stack variable more consistent.  `mii'
  refers to miibus softc, while `sc' refers to PHY module softc.
- Nuke no longer used functions' definition and declaration.
- Regen miidevs.h

Following PHY modules were tested:
acphy(dc), brgphy(bge), e1000phy(nv,sk), exphy(xl), inphy(fxp), rgephy(re),
rlphy(rl), ruephy(rue), ukphy(nv,vr,...)

MII generic code is mainly synced with NetBSD.
Individual PHY modules are mainly synced with OpenBSD.

Tested-by: swildner, corecode
13 years agoMatch .Dt with filename.
Sascha Wildner [Sun, 6 Aug 2006 02:27:56 +0000 (02:27 +0000)]
Match .Dt with filename.

13 years agoUse .Cd for config declaration and add missing quote.
Sascha Wildner [Sun, 6 Aug 2006 02:27:01 +0000 (02:27 +0000)]
Use .Cd for config declaration and add missing quote.

13 years agonone_funcname() -> none_crypto_funcname()
Sepherosa Ziehau [Sat, 5 Aug 2006 03:18:27 +0000 (03:18 +0000)]
none_funcname() -> none_crypto_funcname()

Now more ieee80211_xxx_none.c can be added without duplicated(confusing)
function names.

13 years ago- Add ieee80211com.ic_sysctl_oid, so sub-wlan module (e.g. wlan_wep) can
Sepherosa Ziehau [Fri, 4 Aug 2006 15:42:27 +0000 (15:42 +0000)]
- Add ieee80211com.ic_sysctl_oid, so sub-wlan module (e.g. wlan_wep) can
  further expand the sysctl tree
- Fix a possible memory leakage in ieee80211_sysctl_attach()

13 years agoRename acx_fw_txdesc.f_tx_{ack,rts}_fail to
Sepherosa Ziehau [Fri, 4 Aug 2006 14:04:16 +0000 (14:04 +0000)]
Rename acx_fw_txdesc.f_tx_{ack,rts}_fail to
acx_fw_txdesc.f_tx_{data,rts}_nretry.
These two fields can be used to do rate control.

13 years agoRemove all occurences of double semicolons at the end of a line by
Sascha Wildner [Thu, 3 Aug 2006 16:40:49 +0000 (16:40 +0000)]
Remove all occurences of double semicolons at the end of a line by
single ones.

Submitted-by: Bill Marquette <bill.marquette@gmail.com>
13 years agoGet rid of a bogus check that cut the blocked-lock wakeup code a little
Matthew Dillon [Thu, 3 Aug 2006 16:06:15 +0000 (16:06 +0000)]
Get rid of a bogus check that cut the blocked-lock wakeup code a little
too short, causing sendmail and postfix to sometimes block indefinitely.

Reported-by: Sven Willenberger <sven@dmv.com>, Petr Janda <elekktretterr@exemail.com.au>, Jon Hamilton <hamilton@pobox.com>
13 years agoGet rid of some unused fields in the fileops and adjust the declarations
Matthew Dillon [Wed, 2 Aug 2006 01:25:28 +0000 (01:25 +0000)]
Get rid of some unused fields in the fileops and adjust the declarations
to use the '.field = blah' initialization method.

13 years agoDon't call pci_get_device() multiple times.
Sascha Wildner [Tue, 1 Aug 2006 18:13:21 +0000 (18:13 +0000)]
Don't call pci_get_device() multiple times.

13 years agoUse pcidevs.h.
Sascha Wildner [Tue, 1 Aug 2006 18:11:47 +0000 (18:11 +0000)]
Use pcidevs.h.

13 years agoUse pcidevs.h.
Sascha Wildner [Tue, 1 Aug 2006 18:11:20 +0000 (18:11 +0000)]
Use pcidevs.h.

13 years agoUse pcidevs.h.
Sascha Wildner [Tue, 1 Aug 2006 18:10:40 +0000 (18:10 +0000)]
Use pcidevs.h.

13 years agoUse pcidevs.h.
Sascha Wildner [Tue, 1 Aug 2006 18:10:05 +0000 (18:10 +0000)]
Use pcidevs.h.

13 years agoUse pcidevs.h.
Sascha Wildner [Tue, 1 Aug 2006 18:09:37 +0000 (18:09 +0000)]
Use pcidevs.h.

13 years agoUse pcidevs.h.
Sascha Wildner [Tue, 1 Aug 2006 18:08:24 +0000 (18:08 +0000)]
Use pcidevs.h.

13 years agoUse pcidevs.h.
Sascha Wildner [Tue, 1 Aug 2006 18:07:57 +0000 (18:07 +0000)]
Use pcidevs.h.

13 years agoUse pcidevs.h.
Sascha Wildner [Tue, 1 Aug 2006 18:07:12 +0000 (18:07 +0000)]
Use pcidevs.h.

13 years agoUse pcidevs.h.
Sascha Wildner [Tue, 1 Aug 2006 18:06:44 +0000 (18:06 +0000)]
Use pcidevs.h.

13 years agoUse pcidevs.h.
Sascha Wildner [Tue, 1 Aug 2006 18:06:14 +0000 (18:06 +0000)]
Use pcidevs.h.

13 years agoUse pcidevs.h.
Sascha Wildner [Tue, 1 Aug 2006 18:05:43 +0000 (18:05 +0000)]
Use pcidevs.h.

13 years agoUse pcidevs.h.
Sascha Wildner [Tue, 1 Aug 2006 18:05:02 +0000 (18:05 +0000)]
Use pcidevs.h.

13 years agoUse pcidevs.h.
Sascha Wildner [Tue, 1 Aug 2006 18:04:22 +0000 (18:04 +0000)]
Use pcidevs.h.

13 years agoUse pcidevs.h.
Sascha Wildner [Tue, 1 Aug 2006 18:03:53 +0000 (18:03 +0000)]
Use pcidevs.h.

13 years agoUse pcidevs.h.
Sascha Wildner [Tue, 1 Aug 2006 18:03:19 +0000 (18:03 +0000)]
Use pcidevs.h.