15 years agoMerge from vendor branch LIBARCHIVE:
Peter Avalos [Sat, 18 Aug 2007 15:20:51 +0000 (15:20 +0000)]
Merge from vendor branch LIBARCHIVE:
Import libarchive 2.2.6.

15 years agoImport libarchive 2.2.6.
Peter Avalos [Sat, 18 Aug 2007 15:20:51 +0000 (15:20 +0000)]
Import libarchive 2.2.6.

15 years agoFix setting 115200 baudrate.
Hasso Tepper [Sat, 18 Aug 2007 09:44:46 +0000 (09:44 +0000)]
Fix setting 115200 baudrate.

15 years agoAdd some words about the vcd driver in the DEVICES section.
Sascha Wildner [Sat, 18 Aug 2007 08:46:32 +0000 (08:46 +0000)]
Add some words about the vcd driver in the DEVICES section.

While I'm here, adjust some TABs and copyright years, and sort the
manpages in the Makefile.

15 years agoDeprecate 'installer_*' targets. If used a warning is generated and the
Matthew Dillon [Sat, 18 Aug 2007 00:10:50 +0000 (00:10 +0000)]
Deprecate 'installer_*' targets.  If used a warning is generated and the
build will sleep for 10 seconds before continuing.

New way of doing targets: build what you want by specifying multiple
targets.  For example:  'make installer release' instead of
'make installer_release'.  This increases the flexibility of the
nrelease build by allowing us to add multiple targets to create an
enhanced result.

15 years agoAdd 'options CARP' to the SYNOPSIS.
Sascha Wildner [Fri, 17 Aug 2007 11:07:54 +0000 (11:07 +0000)]
Add 'options CARP' to the SYNOPSIS.

Reported-by: Thomas Nikolajsen <thomas.nikolajsen@mail.dk>
15 years agoMake functions static.
Hasso Tepper [Fri, 17 Aug 2007 06:40:19 +0000 (06:40 +0000)]
Make functions static.

15 years agoAdd umsm(4) driver for EVDO and UMTS modems with Qualcomm MSM chipsets.
Hasso Tepper [Thu, 16 Aug 2007 20:38:33 +0000 (20:38 +0000)]
Add umsm(4) driver for EVDO and UMTS modems with Qualcomm MSM chipsets.

Obtained-from: OpenBSD

15 years agoAdd some devices based on Qualcomm HSDPA chips.
Hasso Tepper [Thu, 16 Aug 2007 20:10:08 +0000 (20:10 +0000)]
Add some devices based on Qualcomm HSDPA chips.

15 years agoBring CARP into the tree. CARP = Common Address Redundancy Protocol, which
Matthew Dillon [Thu, 16 Aug 2007 20:03:58 +0000 (20:03 +0000)]
Bring CARP into the tree.  CARP = Common Address Redundancy Protocol, which
allows an IP address to hot switch to backup machine(s) when the master goes

Submitted-by: Baptiste Ritter <baptiste.ritter@ulp.u-strasbg.fr>,
Jonathan, and Nicolas
Testing-by: Thomas Nikolajsen, Gergo Szakal
Obtained-from: OpenBSD, NetBSD, and FreeBSD

15 years agoRemove reference to the nonexistant uhub(4).
Hasso Tepper [Thu, 16 Aug 2007 19:07:09 +0000 (19:07 +0000)]
Remove reference to the nonexistant uhub(4).

15 years agoExtra ';' after if() would cause panic if attaching failed.
Sepherosa Ziehau [Thu, 16 Aug 2007 11:20:37 +0000 (11:20 +0000)]
Extra ';' after if() would cause panic if attaching failed.

Noticed-by: hasso@
15 years agoAdd support for HandyTech's Braille displays into ubsa(4) (ID found in
Hasso Tepper [Thu, 16 Aug 2007 07:03:30 +0000 (07:03 +0000)]
Add support for HandyTech's Braille displays into ubsa(4) (ID found in
Linux driver).

15 years agoAdd the ID of USB serial interface used in HandyTech Braille displays.
Hasso Tepper [Thu, 16 Aug 2007 06:58:02 +0000 (06:58 +0000)]
Add the ID of USB serial interface used in HandyTech Braille displays.

15 years agoClean up the kvm process code. This is only used when trying to get a
Matthew Dillon [Wed, 15 Aug 2007 19:37:52 +0000 (19:37 +0000)]
Clean up the kvm process code.  This is only used when trying to get a
process list out of a kernel core with 'ps'.  Many things had gone stale.

Also adjust the code to traverse the new LWP list.

15 years ago* Add DPMS support to the vesa module.
Sascha Wildner [Wed, 15 Aug 2007 19:31:12 +0000 (19:31 +0000)]
* Add DPMS support to the vesa module.

* Adjust the V_DISPLAY_* defines to play better with DPMS.

* Fix {blank,green}_saver to check if the requested state is already

With this commit, the "blank" (for off) and "green" (for standby)
console screen savers will turn off the backlight on flat screens
if supported.

15 years agoFix uslcom path.
Sascha Wildner [Wed, 15 Aug 2007 14:34:02 +0000 (14:34 +0000)]
Fix uslcom path.

15 years agoHardware flow control support for uslcom(4).
Hasso Tepper [Wed, 15 Aug 2007 06:47:26 +0000 (06:47 +0000)]
Hardware flow control support for uslcom(4).

Obtained-from: NetBSD with modifications

15 years agoConvert the lwp list into a red-black tree. This greatly reduces the
Matthew Dillon [Wed, 15 Aug 2007 03:15:07 +0000 (03:15 +0000)]
Convert the lwp list into a red-black tree.  This greatly reduces the
overhead of looking up LWPs for numerous operations including select and
removes the hokey fork code that tried to avoid doing a list traversal.

One inefficiency remains which cannot be easily fixed, and may not matter
much anyway, and that is delivering a generic signal the process may have
to iterate through many LWPs before finding one that can handle the signal.

15 years agoSignals have to be blocked when creating our LWPs or a LWP may receive a
Matthew Dillon [Wed, 15 Aug 2007 03:10:50 +0000 (03:10 +0000)]
Signals have to be blocked when creating our LWPs or a LWP may receive a
signal before it is ready to handle it.  This can cause clock interrupt
to stop operating when booting SMP.

Fix cpu_disable_intr() - the wrong signals were being masked due to an
off-by-one error.

15 years agoAdd uark(4) driver which supports Arkmicro Technologies ARK3116 chip found
Hasso Tepper [Tue, 14 Aug 2007 22:28:11 +0000 (22:28 +0000)]
Add uark(4) driver which supports Arkmicro Technologies ARK3116 chip found
in some USB to serial adapters.

Obtained-from: OpenBSD

15 years agoAdd '-H', 'nlwp', and 'tid' options to ps(1) to display some LWP data (inspired
Matthew Dillon [Tue, 14 Aug 2007 20:29:07 +0000 (20:29 +0000)]
Add '-H', 'nlwp', and 'tid' options to ps(1) to display some LWP data (inspired
from FreeBSD options).  Clean up the kernel's initialization of the kl_tid

Submitted-by: "Nicolas Thery" <nthery@gmail.com>
15 years agoFix pci bus detection on certain motherboards. Fixes bus detect on
Matthew Dillon [Tue, 14 Aug 2007 20:09:13 +0000 (20:09 +0000)]
Fix pci bus detection on certain motherboards.  Fixes bus detect on
ALIX.1C board (www.pcengines.ch).  May fix bus detection on other esoteric

Submitted-by: Andrew Atrens <atrens@nortel.com>
Obtained-from: Various sources including FreeBSD

15 years agoFix for amd geode cs5536 companion (ehci) panic. Also fix a word-reversed
Matthew Dillon [Tue, 14 Aug 2007 20:06:13 +0000 (20:06 +0000)]
Fix for amd geode cs5536 companion (ehci) panic.  Also fix a word-reversed
AMD 8111 device ID.

Submitted-by: Andrew Atrens <atrens@nortel.com>
15 years ago- Correct SYNOPSIS section in USB serial manpages.
Hasso Tepper [Tue, 14 Aug 2007 17:40:19 +0000 (17:40 +0000)]
- Correct SYNOPSIS section in USB serial manpages.
- Add references to ubsa(4) and uslcom(4) to the ucom(4) manpage.
- Remove section regarding portno from ucom(4) manpage.

15 years ago- Overlooked pccard dark corner: NIC lan id should be returned by reference.
Sepherosa Ziehau [Tue, 14 Aug 2007 15:32:32 +0000 (15:32 +0000)]
- Overlooked pccard dark corner: NIC lan id should be returned by reference.
- Const-fy pccard_get_ether() return value.

Reported-by: EJHaug <ejh@eas.slu.edu>
15 years agoIf PCI_MAP_FIXUP is defined, we can no longer do the reallocation magic;
Sepherosa Ziehau [Tue, 14 Aug 2007 14:58:44 +0000 (14:58 +0000)]
If PCI_MAP_FIXUP is defined, we can no longer do the reallocation magic;
at least it breaks following case:

1) BIOS does not assign cbb IO memory.
2) ipw and cbb are on the same PCI bus.
3) If ipw was loaded, it would use 0xd0000000-0xd0000fff as its IO memory.
4) ipw was not loaded at boot time.
5) At boot time, cbb tried to attach, system assigned IO memory 0xd0000000
   -0xd0000fff to it.  But later on, due to incorrect IRQ assignment, cbb
   attaching failed.  The assigned IO memory was freed properly.  However,
   the resource list entry (rle) was not freed.
6) ipw was loaded after booting and successfully attached.  It occupied IO
   memory 0xd0000000-0xd0000fff.
7) Since ipw and cbb are on the same PCI bus, cbb got a second chance re-
   probe and re-attach.  But this time, no rle would be allocated by PCI bus
   code, since old rle was still there.  Old rle had 0xd0000000-0xd0000fff
   as start/end, so this allocation failed -- same IO memory segment was
   already used by ipw.
8) The reallocation magic was performed then.  It succeeded, but this left
   cbb's rle in an uninitalized state.

As pointed out in 5), cbb attaching failed again.  Reallocated IO memory
was going to be freed: assertion in pci_release_resource(), since cbb's rle
was not initialized in 8).

If PCI_MAP_FIXIP is not defined, we depend on the current mechanism to find
the PCI IO memory for cbb, given some goofy BIOSes do not assign cbb's IO
memory.  This seems to be the only way to make things working without
PCI_MAP_FIXUP, though it is vulnerable to the case described above.

Reported-by: Michael Neumann <mneumann@ntecs.de>
15 years agoAdd a new csum flag to tell IP defragmenter that csum_data does _not_
Sepherosa Ziehau [Tue, 14 Aug 2007 13:30:35 +0000 (13:30 +0000)]
Add a new csum flag to tell IP defragmenter that csum_data does _not_
contain a valid IP fragment payload checksum.  This flag is only intented
to be used by IP defragmenter.

Currently only bce(4), bge(4) and ti(4) provide valid IP fragment payload
checksum.  Turn on the new csum flag for the rest of the drivers, which
support hardware TCP/UDP checksum offload but hard-wire csum_data to 0xffff,
to avoid bypassing verification of defragmented payload's checksum.

Discussed-with: dillon@, hsu@
Approved-by: dillon@
15 years agoAdd some new uslcom(4) device ids found in Linux driver.
Hasso Tepper [Tue, 14 Aug 2007 11:31:02 +0000 (11:31 +0000)]
Add some new uslcom(4) device ids found in Linux driver.

15 years agoAdd some new uslcom(4) devices found in Linux driver.
Hasso Tepper [Tue, 14 Aug 2007 11:04:52 +0000 (11:04 +0000)]
Add some new uslcom(4) devices found in Linux driver.

15 years agouslcom(4) works with devices based on CP2103 chip. Tested by me with CP2103
Hasso Tepper [Tue, 14 Aug 2007 10:11:07 +0000 (10:11 +0000)]
uslcom(4) works with devices based on CP2103 chip. Tested by me with CP2103
evaluation kit.

15 years agoAdd uslcom(4) into LINT.
Hasso Tepper [Tue, 14 Aug 2007 09:39:26 +0000 (09:39 +0000)]
Add uslcom(4) into LINT.

Reminded-by: Sascha Wildner
15 years agoAdd uslcom(4) driver which provides support for USB devices based on
Hasso Tepper [Tue, 14 Aug 2007 08:53:59 +0000 (08:53 +0000)]
Add uslcom(4) driver which provides support for USB devices based on
Silicon Laboratories CP120x USB-UART bridges.

Obtained-from: OpenBSD

15 years agoAdd devices based on Silicon Laboratories USB-UART bridge.
Hasso Tepper [Tue, 14 Aug 2007 08:42:34 +0000 (08:42 +0000)]
Add devices based on Silicon Laboratories USB-UART bridge.

Obtained-from: OpenBSD

15 years agoRemove custom mk.copf stuff -- a correct one comes with the pkgsrc bootstrap.
Simon Schubert [Mon, 13 Aug 2007 21:33:47 +0000 (21:33 +0000)]
Remove custom mk.copf stuff -- a correct one comes with the pkgsrc bootstrap.

15 years agoPart 1/many USERFS support. Bring in the initial userfs infrastructure.
Matthew Dillon [Mon, 13 Aug 2007 17:49:17 +0000 (17:49 +0000)]
Part 1/many USERFS support.  Bring in the initial userfs infrastructure.
Add syslink-based mount support.  Most of the VOPs are still just dummy
wrappers with this commit.  USERFS is not yet linked into the build.

15 years agoAdd additional functionality to the syslink implementation. Give the
Matthew Dillon [Mon, 13 Aug 2007 17:47:20 +0000 (17:47 +0000)]
Add additional functionality to the syslink implementation.  Give the
kernel side the ability to send a syslink message asynchronously (we we
can implement an asynchronous VOP_STRATEGY) and add support code to
construct XIO's for kernel consumption.

Document the syslink element flags a bit better and add a ne wsyslink
element construction inline which constructs a simple degenerate element.

15 years agoThe new VOP_N*() (namespace) operations pass a pointer to a namecache
Matthew Dillon [Mon, 13 Aug 2007 17:43:57 +0000 (17:43 +0000)]
The new VOP_N*() (namespace) operations pass a pointer to a namecache
record.  This information is sufficient for resolving the namespace
operation.  In all cases the parent namecache record already had to have
a resolved vnode so the related directory vnode could be easily extracted
by the VFS.  But this also means the target VFSs had to traverse the
namecache topology up one level which introduced API pollution that
is not compatible with directly translating a VOP to a RPC.

To solve this we now pass a directory vnode along with the namecache pointer.
This vnode is only held, not referenced or vget()d so the target VFS must
still vget() the vnode and/or do whatever it needs to do to validate it.
This gives the target VFS full control over directory locking when performing
namespace operations.  The namespaces themselves are already guarenteed
to be locked due to the fact that the related namecache records are locked.

This change is being made to accomodate USERFS, so we can directly translate
the related VOPs to RPCs without having to reproduce the namecache topology
in the target VFS running in userland.

15 years agoRemove the vpp (returned underlying device vnode) argument from VOP_BMAP().
Matthew Dillon [Mon, 13 Aug 2007 17:31:57 +0000 (17:31 +0000)]
Remove the vpp (returned underlying device vnode) argument from VOP_BMAP().
VOP_BMAP() may now only be used to determine linearity and clusterability of
the blocks underlying a filesystem object.  The meaning of the returned
block number (other then being contiguous as a means of indicating
linearity or clusterability) is now up to the VFS.

This removes visibility into the device(s) underlying a filesystem from
the rest of the kernel.

15 years agoAdd xio_init_pages(), which builds an XIO based on an array of vm_page_t's.
Matthew Dillon [Mon, 13 Aug 2007 17:20:05 +0000 (17:20 +0000)]
Add xio_init_pages(), which builds an XIO based on an array of vm_page_t's.

15 years agoReplace the huge mess that was vnode_pager_generic_getpages() with a much
Matthew Dillon [Mon, 13 Aug 2007 17:18:16 +0000 (17:18 +0000)]
Replace the huge mess that was vnode_pager_generic_getpages() with a much
simpler version which does a UIO_NOCOPY VOP_READ.  This version requires
that all VREG file I/O pass through the buffer cache.  All filesystems
which use this function already use the buffer cache.

* specfs rolls its own for device mmaps.
* NFS rolls its own.
* UFS rolls its own by backs down to this function in certain cases.
* Remaining filesystems call this function and use the buffer cache (ext2,
  hpfs, isofs, msdosfs, ntfs, nwfs, smbfs), and are compatible.

Buffer cache side effects properly set the valid bits in the vm_page_t
and vm_faults in DragonFly are now responsible for zero-filling mapped VM
pages, so the vnode_pager*() code no longer has to do this.

The vnode_pager*() code was previously using getpbuf() and pmap_qenter() and
friends which is almost as expensive as instantiating a new buffer cache
buffer.  The vnode_pager*() code also previously ran a manual BMAP whereas
the buffer cache may already have a cached translation available.

15 years agoExplicitly extract the sector size for the underlying media. This solves
Matthew Dillon [Mon, 13 Aug 2007 17:08:34 +0000 (17:08 +0000)]
Explicitly extract the sector size for the underlying media.  This solves
some, but not all of the issues related to running fdisk on media with a
sector size greater then 512 bytes.  Still unaddressed is what to do about
the 512-byte MBR.

Reported-by: "Dennis den Brok" <d.den.brok@uni-bonn.de>
15 years agoMagic Control Technology (MCT) USB to serial converters are not handled by
Hasso Tepper [Mon, 13 Aug 2007 12:26:51 +0000 (12:26 +0000)]
Magic Control Technology (MCT) USB to serial converters are not handled by
uplcom(4), but by umct(4).

The error seems to be introduced with rev 1.9 during merge from FreeBSD.
It's probably caused by the fact that Sitecom USB to serial converters use
both - Prolific and MCT chipsets.

15 years agoFix the fstab installation example. vkd0a -> vkd0s0a.
Matthew Dillon [Sun, 12 Aug 2007 17:30:22 +0000 (17:30 +0000)]
Fix the fstab installation example. vkd0a -> vkd0s0a.

Reported-by: "Nicolas Thery" <nthery@gmail.com>
15 years agoAdd forgotten section number.
Sascha Wildner [Sun, 12 Aug 2007 17:14:26 +0000 (17:14 +0000)]
Add forgotten section number.

15 years agoChange the ordering of the zombie test for ^T to avoid a NULL pointer
Matthew Dillon [Sun, 12 Aug 2007 16:57:31 +0000 (16:57 +0000)]
Change the ordering of the zombie test for ^T to avoid a NULL pointer
dereference panic.

Reported-by: Stefan Krueger <space7@web.de>
15 years agoFix exporting of lwp data.
Simon Schubert [Sun, 12 Aug 2007 16:32:13 +0000 (16:32 +0000)]
Fix exporting of lwp data.

Submitted-by: Nicolas Thery <nthery@gmail.com>
15 years agoRe-add the bootconf rc script because newbtconf(8) needs it.
Sascha Wildner [Sun, 12 Aug 2007 14:37:48 +0000 (14:37 +0000)]
Re-add the bootconf rc script because newbtconf(8) needs it.

Reported-by: Michael Neumann <mneumann@ntecs.de>
15 years agoPCI-E re(4) needs multi hash in reverse order. Add comment about it.
Sepherosa Ziehau [Sun, 12 Aug 2007 11:51:26 +0000 (11:51 +0000)]
PCI-E re(4) needs multi hash in reverse order.  Add comment about it.

Reported-by: Dennis den Brok <d.den.brok@uni-bonn.de>
Obtained-from: NetBSD (tsutsui@netbsd.org)

15 years agoThe cvs checkout commands were improperly specified the -d option.
Matthew Dillon [Sun, 12 Aug 2007 02:28:15 +0000 (02:28 +0000)]
The cvs checkout commands were improperly specified the -d option.
This option is only available for cvs update commands.

Submitted-by: Michael Neumann <mneumann@ntecs.de>
15 years agoMake m_mclfree() MP safe by fixing a N->0 dereferencing race. The spinlock
Matthew Dillon [Sun, 12 Aug 2007 01:46:26 +0000 (01:46 +0000)]
Make m_mclfree() MP safe by fixing a N->0 dereferencing race.  The spinlock
wasn't safe because the structure is dynamically allocated and freed.
Instead just use atomic_cmpset_int() to detect the 1->0 transition.

15 years agoMake mbuf allocator statistics SMP safe.
Joe Talbott [Sat, 11 Aug 2007 23:11:23 +0000 (23:11 +0000)]
Make mbuf allocator statistics SMP safe.

Make mbtypes[] and mbstat per-cpu.  Use atomic_*_*_nonlocked() to adjust
their values.  Convert sysctls (kern.ipc.mbstat and kern.ipc.mbtypes) into
procedures that sum the statistics for each CPU.

Reviewed-By: Matt Dillon <dillon@backplane.com>
15 years agoSync the vinum manpages with the recent disklabel work.
Sascha Wildner [Sat, 11 Aug 2007 22:57:42 +0000 (22:57 +0000)]
Sync the vinum manpages with the recent disklabel work.

Submitted-by: Thomas Nikolajsen <thomas.nikolajsen@mail.dk>
15 years agoAdd another fix to the 1's complement checksum. A second carry does not
Matthew Dillon [Sat, 11 Aug 2007 18:57:34 +0000 (18:57 +0000)]
Add another fix to the 1's complement checksum.  A second carry does not
occur when the individual packet csum's are set to 0xffff, which is normally
the case.  But if we ever use csum_data to accumulate partial fragment
checksums then a second carry can occur which must be handled.  Fix it now.

15 years agoOops. Correct attribution for the last commit - 1's complement csum_data
Matthew Dillon [Sat, 11 Aug 2007 18:53:31 +0000 (18:53 +0000)]
Oops.  Correct attribution for the last commit - 1's complement csum_data

Reported-by: Max Laier <max@love2party.net>
Obtained-from: FreeBSD

15 years agoPort FreeBSD/pf_norm.c 1.18 - fix 1's complement carry for csum_data when
Matthew Dillon [Sat, 11 Aug 2007 18:51:34 +0000 (18:51 +0000)]
Port FreeBSD/pf_norm.c 1.18 - fix 1's complement carry for csum_data when
pasting IP fragments together.   Use a slightly differnt calculation.
FreeBSD uses a while() loop which only ever iterates once, so you only
really need an if().

15 years agoIt is possible to catch a LWP while it is being created or destroyed,
Matthew Dillon [Sat, 11 Aug 2007 18:18:30 +0000 (18:18 +0000)]
It is possible to catch a LWP while it is being created or destroyed,
with lwp_thread == NULL.  Check for the case.

Reported-by: Stefan Krueger <space7@web.de>
15 years agoGC hostapd 0.4.9
Sepherosa Ziehau [Sat, 11 Aug 2007 06:18:01 +0000 (06:18 +0000)]
GC hostapd 0.4.9

15 years agoGC wpa_supplicant 0.4.9
Sepherosa Ziehau [Sat, 11 Aug 2007 06:12:32 +0000 (06:12 +0000)]
GC wpa_supplicant 0.4.9

15 years agoRe-enable hardware UDP/TCP checksum calculation with pseudo header on
Sepherosa Ziehau [Sat, 11 Aug 2007 05:27:35 +0000 (05:27 +0000)]
Re-enable hardware UDP/TCP checksum calculation with pseudo header on
RX path.  It turns out the original problem was caused by a hidden bug
fixed in netinet/ip_input.c rev 1.68

15 years agoSync this manpage some more with the recent disklabel changes.
Sascha Wildner [Sat, 11 Aug 2007 01:47:04 +0000 (01:47 +0000)]
Sync this manpage some more with the recent disklabel changes.

Submitted-by: Thomas Nikolajsen <thomas.nikolajsen@mail.dk>
With some minor modifications by me.

15 years agoUse .Dl, not .D1.
Sascha Wildner [Sat, 11 Aug 2007 01:13:31 +0000 (01:13 +0000)]
Use .Dl, not .D1.

15 years agoFix typo.
Sascha Wildner [Fri, 10 Aug 2007 21:15:31 +0000 (21:15 +0000)]
Fix typo.

Reported-by: corecode
15 years agoBring some changes from FreeBSD into the jail rc script.
Sascha Wildner [Fri, 10 Aug 2007 21:01:05 +0000 (21:01 +0000)]
Bring some changes from FreeBSD into the jail rc script.

Submitted-by: Pawel Biernacki <kaktus@acn.pl>
With some adjustments by me.

15 years agoAdd a taskqueue(9) manual page. Taken from FreeBSD with some
Sascha Wildner [Fri, 10 Aug 2007 18:53:19 +0000 (18:53 +0000)]
Add a taskqueue(9) manual page. Taken from FreeBSD with some
modifications of my own.

Reminded-by: hasso
15 years agoSync etc/rc.d/addswap and various manpages with the recent disklabel
Sascha Wildner [Fri, 10 Aug 2007 18:28:27 +0000 (18:28 +0000)]
Sync etc/rc.d/addswap and various manpages with the recent disklabel
related changes.

Submitted-by: Thomas Nikolajsen <thomas.nikolajsen@mail.dk>
Some additional changes done by me.

15 years agoThe 1's complement checksum in m->m_pkthdr.csum_data was not being properly
Matthew Dillon [Fri, 10 Aug 2007 18:23:07 +0000 (18:23 +0000)]
The 1's complement checksum in m->m_pkthdr.csum_data was not being properly
calculated.  With 1's complement you have to take the carry past 16 bits
and fold it back into the checksum.

15 years agoHardware seems to have trouble to handle fragmented IP datagrams'
Sepherosa Ziehau [Fri, 10 Aug 2007 15:29:25 +0000 (15:29 +0000)]
Hardware seems to have trouble to handle fragmented IP datagrams'
checksum, so if hardware doesn't think the IP checksum is valid,
we fall back to software based IP checksum.

15 years agoFix txcsum/rxcsum ioctl support, so that txcsum and rxcsum can be
Sepherosa Ziehau [Fri, 10 Aug 2007 15:21:05 +0000 (15:21 +0000)]
Fix txcsum/rxcsum ioctl support, so that txcsum and rxcsum can be
turned on/off individually.

Tested-by: dillon@ and "Rumko" <rumcic@gmail.com>
15 years agoAdd support for a new revision of the RealTek 8168B/8111B called SPIN3.
Matthew Dillon [Fri, 10 Aug 2007 03:48:02 +0000 (03:48 +0000)]
Add support for a new revision of the RealTek 8168B/8111B called SPIN3.

Requested-by: d.den.brok@uni-bonn.de (Dennis den Brok)
15 years agoRemove NO_GCC41 make option.
Simon Schubert [Thu, 9 Aug 2007 22:50:37 +0000 (22:50 +0000)]
Remove NO_GCC41 make option.

15 years agoDrop binutils215.
Simon Schubert [Thu, 9 Aug 2007 22:39:26 +0000 (22:39 +0000)]
Drop binutils215.

15 years agoFix automatic vinum probing to include the compat slice and extended slices.
Simon Schubert [Thu, 9 Aug 2007 22:32:39 +0000 (22:32 +0000)]
Fix automatic vinum probing to include the compat slice and extended slices.

Reported-by: Rumkic
15 years agoSwitch to gcc41 as default compiler.
Simon Schubert [Thu, 9 Aug 2007 22:15:22 +0000 (22:15 +0000)]
Switch to gcc41 as default compiler.

15 years agoFix typo.
Sascha Wildner [Thu, 9 Aug 2007 21:53:02 +0000 (21:53 +0000)]
Fix typo.

Reported by: Michael Neumann <mneumann@ntecs.de>

15 years agoPass address of mbuf pointer to bge_encap(), so the caller could know
Sepherosa Ziehau [Thu, 9 Aug 2007 14:17:51 +0000 (14:17 +0000)]
Pass address of mbuf pointer to bge_encap(), so the caller could know
mbuf is changed due to the defragmentation or error in bge_encap().

Reported-by: km b <kmb810@gmail.com>
15 years agoIntroduce two delays in nfe_stop().
Matthew Dillon [Thu, 9 Aug 2007 07:24:50 +0000 (07:24 +0000)]
Introduce two delays in nfe_stop().

The first seems to fix or greatly reduce instances of watchdog failures.
I theorize that a TX KICK occuring just prior to a nfe_stop() is confusing
the microcontroller due to the polled nature of the rest of the tx/rx control
registers and the (almost certain) hardware aided TX KICK bit.  This
confusion survives the nfe_stop() and nfe_init().  I'll again theorize that
the KICK, which is probably a microcontroller interrupt, is not being reset
and is being handled at some inappropriate point in time in the middle of
nfe_stop() or nfe_init().

The second delay gives the device time to actually stop the DMA engine
before we destroy the ring buffers.  Even if those registers were under
direct hardware control (and I really doubt they are), DMA just doesn't
instantly stop when you tell it to.

15 years agonfe_init() can be called as a side effect of certain ioctl operations with
Matthew Dillon [Thu, 9 Aug 2007 04:24:14 +0000 (04:24 +0000)]
nfe_init() can be called as a side effect of certain ioctl operations with
packet data still queued.  The queue must be restarted since the reinit
will clean out the rings and clear any pending interrupts.

This fixes watchdog timeouts which can occur while dhclient is probing
the network.

15 years ago* Repocopy sys/dev/misc/syscons/daemon -> sys/dev/misc/syscons/fred.
Sascha Wildner [Thu, 9 Aug 2007 02:27:51 +0000 (02:27 +0000)]
* Repocopy sys/dev/misc/syscons/daemon -> sys/dev/misc/syscons/fred.

* Change to display the DragonFly mascot instead of Beastie.

* Remove the old saver and adjust stuff.

15 years agoExplicitly set a large receive buffer for datagram sockets to give syslog
Matthew Dillon [Thu, 9 Aug 2007 02:17:46 +0000 (02:17 +0000)]
Explicitly set a large receive buffer for datagram sockets to give syslog
a better chance at catching large message bursts from today's high-volume

15 years agoAdd the MBUF_DEBUG option. This is a fairly invasive option that should
Matthew Dillon [Thu, 9 Aug 2007 01:10:06 +0000 (01:10 +0000)]
Add the MBUF_DEBUG option.  This is a fairly invasive option that should
not be used on production boxes.  All active mbufs are tracked with a separate
tracking structure and arranged in a RB tree.  A kernel built with this
option can dump all active mbufs with 'sysctl kern.ipc.showmbufs'.

A person debugging the kernel can sprinkle mbuftrackid() calls in the code
to associate an integer id with an mbuf to make the sysctl output more

The size of the mbuf structure is NOT changed through the use of this option,
but mbuf management overhead will be increased.

15 years agoFix a mbuf leak that was introduced in April. In April I made a change
Matthew Dillon [Thu, 9 Aug 2007 00:55:48 +0000 (00:55 +0000)]
Fix a mbuf leak that was introduced in April.  In April I made a change
that allows sends with control or address information to be discarded
when the target socket buffer is full, but the two macros returned the
wrong error code and prevented the mbuf from being freed.

15 years agoAdjust the shape of the right wings and make the apostrophes more
Sascha Wildner [Thu, 9 Aug 2007 00:28:09 +0000 (00:28 +0000)]
Adjust the shape of the right wings and make the apostrophes more
symmetric (100% symmetry can't be done because unfortunately there
is no comma counterpart).

15 years agoAdjust for Matt's recent changes.
Sascha Wildner [Wed, 8 Aug 2007 22:46:48 +0000 (22:46 +0000)]
Adjust for Matt's recent changes.

15 years agoRemove trailing whitespace.
Sascha Wildner [Wed, 8 Aug 2007 20:15:50 +0000 (20:15 +0000)]
Remove trailing whitespace.

15 years agoAdd hardware csum offload support.
Sepherosa Ziehau [Wed, 8 Aug 2007 11:38:51 +0000 (11:38 +0000)]
Add hardware csum offload support.

Tested-by: "Rumko" <rumcic@gmail.com>
Obtained-from: Peer Chen at nVIDIA via FreeBSD

15 years ago* Start each sentence on a new line.
Sascha Wildner [Wed, 8 Aug 2007 11:21:08 +0000 (11:21 +0000)]
* Start each sentence on a new line.

* Add reference.

* Use .Dv for defined values.

15 years agoImprove indentation.
Sascha Wildner [Wed, 8 Aug 2007 03:11:00 +0000 (03:11 +0000)]
Improve indentation.

15 years agoClean up synopses.
Sascha Wildner [Wed, 8 Aug 2007 01:43:37 +0000 (01:43 +0000)]
Clean up synopses.

15 years agoFix some remaining issues with MSDOSFS_DEBUG and add it as a
Sascha Wildner [Wed, 8 Aug 2007 00:23:40 +0000 (00:23 +0000)]
Fix some remaining issues with MSDOSFS_DEBUG and add it as a
kernel option.

15 years agoAdjust some comments with reality.
Sascha Wildner [Wed, 8 Aug 2007 00:12:52 +0000 (00:12 +0000)]
Adjust some comments with reality.

15 years agoSync with FreeBSD.
Sascha Wildner [Tue, 7 Aug 2007 23:19:14 +0000 (23:19 +0000)]
Sync with FreeBSD.

15 years agoRephrase comments.
Sascha Wildner [Tue, 7 Aug 2007 22:15:53 +0000 (22:15 +0000)]
Rephrase comments.

15 years agoFix build errors when MSDOSFS_DEBUG is defined.
Matthew Dillon [Tue, 7 Aug 2007 20:05:30 +0000 (20:05 +0000)]
Fix build errors when MSDOSFS_DEBUG is defined.

Submitted-by: "Nicolas Thery" <nthery@gmail.com>
15 years agoApply the patch for tcpdump.1 even in the NOINET6 case.
Peter Avalos [Tue, 7 Aug 2007 18:41:18 +0000 (18:41 +0000)]
Apply the patch for tcpdump.1 even in the NOINET6 case.

15 years agoUpgrade to libpcap-0.9.7 and tcpdump-3.9.7.
Peter Avalos [Tue, 7 Aug 2007 18:12:02 +0000 (18:12 +0000)]
Upgrade to libpcap-0.9.7 and tcpdump-3.9.7.

15 years agoMerge from vendor branch TCPDUMP:
Peter Avalos [Tue, 7 Aug 2007 17:58:03 +0000 (17:58 +0000)]
Merge from vendor branch TCPDUMP:
Import tcpdump-3.9.7

15 years agoImport tcpdump-3.9.7
Peter Avalos [Tue, 7 Aug 2007 17:58:03 +0000 (17:58 +0000)]
Import tcpdump-3.9.7

15 years agoMerge from vendor branch LIBPCAP:
Peter Avalos [Tue, 7 Aug 2007 17:55:22 +0000 (17:55 +0000)]
Merge from vendor branch LIBPCAP:
Import libpcap-0.9.7

15 years agoImport libpcap-0.9.7
Peter Avalos [Tue, 7 Aug 2007 17:55:22 +0000 (17:55 +0000)]
Import libpcap-0.9.7