dragonfly.git
12 years agoFix size types.
Simon Schubert [Tue, 21 Aug 2007 20:03:20 +0000 (20:03 +0000)]
Fix size types.

On-behalf-of:  Noah Yan <noah.yan@gmail.com>
Submitted-by: Noah Yan <noah.yan@gmail.com>
12 years agoDon't include the kernel target. This is handled in kgdb separately.
Simon Schubert [Tue, 21 Aug 2007 19:55:23 +0000 (19:55 +0000)]
Don't include the kernel target.  This is handled in kgdb separately.

On-behalf-of:  Noah Yan <noah.yan@gmail.com>
Submitted-by: Noah Yan <noah.yan@gmail.com>
12 years agoFix amd64 support of libc.
Simon Schubert [Tue, 21 Aug 2007 19:49:10 +0000 (19:49 +0000)]
Fix amd64 support of libc.

On-behalf-of:  Noah Yan <noah.yan@gmail.com>
Submitted-by: Noah Yan <noah.yan@gmail.com>
12 years agoResurrect headers for sys/platform/pc64/include from CVS Attic.
Simon Schubert [Tue, 21 Aug 2007 19:45:45 +0000 (19:45 +0000)]
Resurrect headers for sys/platform/pc64/include from CVS Attic.

Patch and mark them as platform specific.

On-behalf-of:  Noah Yan <noah.yan@gmail.com>
Submitted-by: Noah Yan <noah.yan@gmail.com>
12 years agoThe first commit of a series of 6 commits for the amd64 port.
Simon Schubert [Tue, 21 Aug 2007 19:40:24 +0000 (19:40 +0000)]
The first commit of a series of 6 commits for the amd64 port.

This commit includes header files for amd64 cpu that are in
sys/cpu/amd64/include.

The #1 task to port for amd64 is to get the world/kernel cross-compiled
for the 64-bit target. This involves creating a platform and cpu target
for the build.  The skeleton infrastructure for the cpu and platform is
the sys/cpu/amd64 directory and the sys/platform/pc64 directory.

The first stage of this #1 task is to have the world cross-build.  It
includes the building of cross toolchains, the libraries and the world.
This series of commits makes the world cross-build (buildworld) for the
amd64 port with these environment variables:
TARGET_CPU=amd64; TARGET_PLATFORM=pc64; NO_GCC41=1

This is the first commit: resurrect headers for sys/cpu/amd64/include from
CVS Attic; patch and mark them as CPU specific.

On-behalf-of:  Noah Yan <noah.yan@gmail.com>
Submitted-by: Noah Yan <noah.yan@gmail.com>
12 years agoWrite status output to stderr.
Simon Schubert [Tue, 21 Aug 2007 19:23:46 +0000 (19:23 +0000)]
Write status output to stderr.

12 years agoRemove stale prototype.
Simon Schubert [Tue, 21 Aug 2007 19:23:04 +0000 (19:23 +0000)]
Remove stale prototype.

12 years agoFix panic with ALTQ.
Simon Schubert [Tue, 21 Aug 2007 19:21:54 +0000 (19:21 +0000)]
Fix panic with ALTQ.

DragonFly-bug: <http://bugs.dragonflybsd.org/issue420>
Submitted-by: Matthias-Christian Ott
12 years agoAdd msleep(9) to the sleep(9) page.
Simon Schubert [Tue, 21 Aug 2007 19:16:19 +0000 (19:16 +0000)]
Add msleep(9) to the sleep(9) page.

12 years agoDo not try to dump UIO_NOCOPY writes to the journal. There's nothing
Matthew Dillon [Tue, 21 Aug 2007 17:43:52 +0000 (17:43 +0000)]
Do not try to dump UIO_NOCOPY writes to the journal.  There's nothing
to dump at the moment.

12 years agogetpages/putpages fixup part 1 - Add support for UIO_NOCOPY VOP_WRITEs to
Matthew Dillon [Tue, 21 Aug 2007 17:26:48 +0000 (17:26 +0000)]
getpages/putpages fixup part 1 - Add support for UIO_NOCOPY VOP_WRITEs to
filesystems which use the buffer cache and assert that UIO_NOCOPY is not
being used for filesystems which do not.

For filesystems using the buffer cache all we have to do is force a
read-before-write to fill in any missing pieces of the buffer.

UIO_NOCOPY writes are used for buffer-cache-backed filesystems which do
not implement their own vop_putpages code.  At the moment this is only
the msdosfs.

12 years agoSync zoneinfo database with tzdata2007g from elsie.
Sascha Wildner [Mon, 20 Aug 2007 21:08:19 +0000 (21:08 +0000)]
Sync zoneinfo database with tzdata2007g from elsie.

africa:         8.8  -> 8.9
antarctica:     8.3  -> 8.4
australasia:    8.7  -> 8.8
europe:         8.10 -> 8.11
leapseconds:    8.3  -> 8.4
northamerica:   8.17 -> 8.18
zone.tab:       8.10 -> 8.11

From Paul Eggert's comments:

* Egypt switches the September 7, not September 28.  Thanks to Dirk
  Losch for this.

* Daviess, Dubous, Knox, Martin, and Pike Counties, Indiana, switch
  from central to eastern time in November.  This results in a zone
  split, and a new entry America/Tell_City is created for Perry County,
  which does not switch zones in November.

* South Australia, Tasmania, Victoria, and New South Wales are changing
  their DST rules effective next year.  DST will end the first Sunday in
  April at 03:00 and start the first Sunday in October at 03:00.  Lord Howe
  Island has a similar change.

* Several Antarctic station's rules weren't properly updated to account
  for this year's change to the New Zealand daylight saving rules.

* In zone.tab (sorry, I don't recall who sent in these changes):
** Dumont-d'Urville is a station, not a base.
** Correct the coordinates for Aruba, Cambridge Bay, London, Johnston.
** Give alternate spellings for Zaporozhye.

* Add spelling notes for Kiev, Uzhgorod, Zaporozhye.
  (Sorry, I forgot who wrote this.)

* Identify American time zone boundaries more carefully.
  (Sorry, I forgot who sent this in.)

* Improve historical notes for Howland, Baker, and Jarvis.

Additionally, this commit updates the "leapseconds" file to incorporate the
most recent International Earth Rotation and Reference Systems Service (IERS)
bulletin.

12 years agoAdd a prototype and wrapper for lockuninit() to complement spin_uninit().
Matthew Dillon [Mon, 20 Aug 2007 05:44:59 +0000 (05:44 +0000)]
Add a prototype and wrapper for lockuninit() to complement spin_uninit().

Submitted-by: Aggelos Economopoulos <aoiko@cc.ece.ntua.gr>
12 years agoFix another ^T race related to catching a LWP just as it is being created,
Matthew Dillon [Mon, 20 Aug 2007 05:40:40 +0000 (05:40 +0000)]
Fix another ^T race related to catching a LWP just as it is being created,
before lwp_thread has been assigned.

Reported-by: Stefan Krueger
12 years agoFix the root device selection to match the manual page. Before it was always
Matthew Dillon [Mon, 20 Aug 2007 05:27:46 +0000 (05:27 +0000)]
Fix the root device selection to match the manual page.  Before it was always
choosing the CD.  Now it chooses the first disk (-r or -c) option specified.

Submitted-by: Clement Martin <cma@alunys.com>
12 years agoUpdate for the latest changes to nrelease/Makefile.
Sascha Wildner [Mon, 20 Aug 2007 02:02:02 +0000 (02:02 +0000)]
Update for the latest changes to nrelease/Makefile.

12 years agos/.Fx/.Dx/
Sascha Wildner [Mon, 20 Aug 2007 01:35:56 +0000 (01:35 +0000)]
s/.Fx/.Dx/

12 years agoBring in latest uftdi(4) driver from FreeBSD.
Hasso Tepper [Sun, 19 Aug 2007 19:45:39 +0000 (19:45 +0000)]
Bring in latest uftdi(4) driver from FreeBSD.

Obtained-from: FreeBSD

12 years agoThere is no reason to be so verbose.
Hasso Tepper [Sun, 19 Aug 2007 19:42:11 +0000 (19:42 +0000)]
There is no reason to be so verbose.

12 years agoAdd missing .Sh LIBRARY.
Sascha Wildner [Sun, 19 Aug 2007 18:47:47 +0000 (18:47 +0000)]
Add missing .Sh LIBRARY.

12 years agoUse device_printf() where it makes sense.
Hasso Tepper [Sun, 19 Aug 2007 17:16:43 +0000 (17:16 +0000)]
Use device_printf() where it makes sense.

12 years agoAllow up to 13 bits for mode numbers.
Sascha Wildner [Sun, 19 Aug 2007 12:16:10 +0000 (12:16 +0000)]
Allow up to 13 bits for mode numbers.

Some VESA implementations use more than 9 bits for mode numbers (in
violation of the specification which marks D9-D12 as reserved).

This doesn't cause problems on conforming cards and recognizes more
modes on cards which exhibit this behavior (my Rage 3D LT Pro AGP
for example).

12 years ago* Use one ioctl() (CONS_SET, analogous to CONS_GET) for switching video
Sascha Wildner [Sun, 19 Aug 2007 11:39:11 +0000 (11:39 +0000)]
* Use one ioctl() (CONS_SET, analogous to CONS_GET) for switching video
  modes instead of having one ioctl() per video mode.

* Adjust userspace (vidcontrol, libvgl) accordingly.

* Bump libvgl's version number, since this makes the VGLInit() function
  incompatible (previously it took an ioctl request as the first argument,
  now it's a mode number).

* Remove scvesactl.c, which no longer serves any purpose.

12 years agoAdd Smart Technologies USB to serial adapter.
Hasso Tepper [Sun, 19 Aug 2007 10:19:43 +0000 (10:19 +0000)]
Add Smart Technologies USB to serial adapter.

Obtained-from: NetBSD

12 years agoAdd Smart Technologies USB to serial adapter.
Hasso Tepper [Sun, 19 Aug 2007 10:03:45 +0000 (10:03 +0000)]
Add Smart Technologies USB to serial adapter.

Obtained-from: NetBSD

12 years agoAdd some missing LIBRARY sections.
Sascha Wildner [Sat, 18 Aug 2007 20:48:47 +0000 (20:48 +0000)]
Add some missing LIBRARY sections.

12 years agoAdd some words about the MBUF_STRESS_TEST kernel option and the sysctls
Sascha Wildner [Sat, 18 Aug 2007 18:58:20 +0000 (18:58 +0000)]
Add some words about the MBUF_STRESS_TEST kernel option and the sysctls
it creates.

Taken-from: FreeBSD

12 years agoAdd MBUF_DEBUG.
Sascha Wildner [Sat, 18 Aug 2007 18:16:24 +0000 (18:16 +0000)]
Add MBUF_DEBUG.

12 years agoUse upper case for section header and expand HISTORY a bit.
Sascha Wildner [Sat, 18 Aug 2007 18:04:59 +0000 (18:04 +0000)]
Use upper case for section header and expand HISTORY a bit.

12 years agoNote that the vke interface needs to be brought up for its IP address to
Sascha Wildner [Sat, 18 Aug 2007 16:09:57 +0000 (16:09 +0000)]
Note that the vke interface needs to be brought up for its IP address to
be assigned.

Submitted-by: Chris Turner <c.turner@199technologies.org>
12 years agoUpdate for libarchive-2.2.6 import.
Peter Avalos [Sat, 18 Aug 2007 15:23:33 +0000 (15:23 +0000)]
Update for libarchive-2.2.6 import.

12 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.

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

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

12 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.

12 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.

12 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>
12 years agoMake functions static.
Hasso Tepper [Fri, 17 Aug 2007 06:40:19 +0000 (06:40 +0000)]
Make functions static.

12 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

12 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.

12 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
offline.

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

12 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).

12 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@
12 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).

12 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.

12 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.

12 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
  active.

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

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

12 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

12 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.

12 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.

12 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

12 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
field.

Submitted-by: "Nicolas Thery" <nthery@gmail.com>
12 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
boards.

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

12 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>
12 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.

12 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>
12 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>
12 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@
12 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.

12 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.

12 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.

12 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
12 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

12 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

12 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.

12 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.

12 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.

12 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.

12 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.

12 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.

12 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.

12 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>
12 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.

12 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>
12 years agoAdd forgotten section number.
Sascha Wildner [Sun, 12 Aug 2007 17:14:26 +0000 (17:14 +0000)]
Add forgotten section number.

12 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>
12 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>
12 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>
12 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)

12 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>
12 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.

12 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>
12 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>
12 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.

12 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
fixes.

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

12 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().

12 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>
12 years agoGC hostapd 0.4.9
Sepherosa Ziehau [Sat, 11 Aug 2007 06:18:01 +0000 (06:18 +0000)]
GC hostapd 0.4.9

12 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

12 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

12 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.

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

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

Reported-by: corecode
12 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.

12 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
12 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.

12 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.

12 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.

12 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>