dragonfly.git
13 years agoAdd MLINKS for log2 and log2f.
Peter Avalos [Sat, 16 Jun 2007 23:04:43 +0000 (23:04 +0000)]
Add MLINKS for log2 and log2f.

Reminded-by: swildner
13 years agoBring the gpt labeling program in from FreeBSD.
Matthew Dillon [Sat, 16 Jun 2007 22:29:27 +0000 (22:29 +0000)]
Bring the gpt labeling program in from FreeBSD.

Obtained-from: FreeBSD / Marcel Moolenaar

13 years agoAdd log2 and log2f.
Peter Avalos [Sat, 16 Jun 2007 22:26:53 +0000 (22:26 +0000)]
Add log2 and log2f.

Dragonfly-bug:  <http://bugs.dragonflybsd.org/issue632>
Obtained-from:  NetBSD

13 years agoCreate the USB task queues before creating the event thread to avoid
Matthew Dillon [Sat, 16 Jun 2007 20:57:59 +0000 (20:57 +0000)]
Create the USB task queues before creating the event thread to avoid
possible races with the discovery.  Clean up the event thread termination
code.

13 years agoTurn VINUM_LABEL into a noop (fixing LINT).
Sascha Wildner [Sat, 16 Jun 2007 20:48:34 +0000 (20:48 +0000)]
Turn VINUM_LABEL into a noop (fixing LINT).

According to corecode vinum is still kinda broken but that's a
separate story.

Submitted-by: Thomas Nikolajsen <thomas.nikolajsen@mail.dk>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue704>

13 years agoCorrect mistake in last commit.
Matthew Dillon [Sat, 16 Jun 2007 20:43:47 +0000 (20:43 +0000)]
Correct mistake in last commit.

13 years agoUpdate all sound code to use the snd_*() locking abstraction and sndlock_t.
Matthew Dillon [Sat, 16 Jun 2007 20:07:22 +0000 (20:07 +0000)]
Update all sound code to use the snd_*() locking abstraction and sndlock_t.

Fix issues with spinlocks being held through blocking conditions (because
DragonFly spinlocks aren't FreeBSD mutexes) by replacing the spinlocks
with lockmgr locks.

13 years agoRegenerate system callsa (add uuidgen()).
Matthew Dillon [Sat, 16 Jun 2007 20:00:37 +0000 (20:00 +0000)]
Regenerate system callsa (add uuidgen()).

13 years agoImplement an opaque function, if_getanyethermac(), which retrieves MAC
Matthew Dillon [Sat, 16 Jun 2007 19:59:30 +0000 (19:59 +0000)]
Implement an opaque function, if_getanyethermac(), which retrieves MAC
information from the first real hardware interface for use by the uuidgen
code.

13 years agoBring uuidgen(3) into libc and implement the uuidgen() system call.
Matthew Dillon [Sat, 16 Jun 2007 19:57:14 +0000 (19:57 +0000)]
Bring uuidgen(3) into libc and implement the uuidgen() system call.

Obtained-from: FreeBSD / Marcel Moolenaar

13 years agoBring in the latest sound changes from RELENG_6.
Hasso Tepper [Sat, 16 Jun 2007 19:48:05 +0000 (19:48 +0000)]
Bring in the latest sound changes from RELENG_6.

Obtained-from: FreeBSD

13 years agoImport the kernel GPT and UUID header files from FreeBSD, and bring in
Matthew Dillon [Sat, 16 Jun 2007 18:55:28 +0000 (18:55 +0000)]
Import the kernel GPT and UUID header files from FreeBSD, and bring in
kern_uuid.c from FreeBSD.

13 years agosnd_emu10kx.4 was removed today.
Sascha Wildner [Sat, 16 Jun 2007 18:48:18 +0000 (18:48 +0000)]
snd_emu10kx.4 was removed today.

13 years agoBring in manpages from RELENG_6. Manpages related to sound imported in
Hasso Tepper [Sat, 16 Jun 2007 17:44:34 +0000 (17:44 +0000)]
Bring in manpages from RELENG_6. Manpages related to sound imported in
January from FreeBSD were from HEAD, but the code from RELENG_6.

Obtained-from: FreeBSD

13 years ago- In bridge_enqueue(), dispatch the mbuf to the current cpu's netisr, instead
Sepherosa Ziehau [Sat, 16 Jun 2007 15:27:27 +0000 (15:27 +0000)]
- In bridge_enqueue(), dispatch the mbuf to the current cpu's netisr, instead
  of calling member iface's handoff directly, so we don't need to release
  bridge's serializer to avoid possible bridge/member iface serializer dead
  lock.  Add bridge_handoff(), which calls member iface's handoff directly.
- Add bridge_pfil_enqueue(), which dispatches the mbuf to the current cpu's
  netisr.  Its netisr handler runs pfil on destination before calling member
  iface's handoff.  With the help of this fucntion, bridge's serializer no
  longer needs to be released during bridge_broadcast()'s member iface
  iteration.  Originally the serializer was released mainly to:
  o  Avoid possible bridge/member iface serializer dead lock
  o  Avoid possible recursion introduced by pfil
  These are no longer applicable to the new code.
- Factor out bridge_enqueue_internal(), which dispatches the mbuf to the
  current cpu's netisr and strips MT_TAG mbufs before the dispatching.  It
  is used by bridge_{enqueue,pfil_enqueue}()
- In bridge_forward(), reorganize pfil code to minimize bridge's temporary
  serializer releasing period:
  o  For broadcast or multicast packets, push bridge_pfil(bifp, src_if) down
     into bridge_broadcast().
  o  For unicast packets, delay bridge_pfil(bifp, src_if) until we have made
     sure that the destination interface is in working state.
- In bridge_input(), if the input iface is not changed, don't go through
  the upper half of ether_input() again.
- Declare netisr_apanic_port in netisr.h, since netmsg is embedded in mbuf,
  this declaration probably will become more useful than netisr_afree_port.

Reviewed-by: dillon@
Tested-by: dillon@
13 years agoAdd a wlan_ratectl(4) manual page and reference it from drivers that support
Sascha Wildner [Sat, 16 Jun 2007 13:47:44 +0000 (13:47 +0000)]
Add a wlan_ratectl(4) manual page and reference it from drivers that support
rate control.

Loosely-based-on: wlan_amrr(4) from FreeBSD
Helped-by: sephe
13 years ago * testing
Joe Talbott [Sat, 16 Jun 2007 03:10:06 +0000 (03:10 +0000)]
 * testing

13 years agoFix typo.
Sascha Wildner [Fri, 15 Jun 2007 22:58:25 +0000 (22:58 +0000)]
Fix typo.

Spotted-by: TGEN
13 years agoAdjust Makefile like those of other drivers which support polling
Sascha Wildner [Fri, 15 Jun 2007 22:52:47 +0000 (22:52 +0000)]
Adjust Makefile like those of other drivers which support polling
(fixes 'make -DMODULES_WITH_WORLD buildworld').

Submitted-by: Thomas Nikolajsen
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue703>

13 years agoAdd some words about _Exit() and create an MLINK.
Sascha Wildner [Fri, 15 Jun 2007 19:36:33 +0000 (19:36 +0000)]
Add some words about _Exit() and create an MLINK.

Reported-by: Robin Carey <robin_carey5@yahoo.co.uk>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue702>

13 years agoAdd vfs.nfs.pos_cache_timeout to complement vfs.nfs.neg_cache_timeout.
Matthew Dillon [Fri, 15 Jun 2007 17:25:05 +0000 (17:25 +0000)]
Add vfs.nfs.pos_cache_timeout to complement vfs.nfs.neg_cache_timeout.
Because NFSv3 is stateless, the client normally relies on the server
returning ESTALE (Stale NFS handle) to determine whether a relookup is
needed.  However, this does not cover namespace issues such as rename()s
and it is possible to get into a situation where a NFS client winds up
getting permanently out of sync with a server, requiring remounting to
fix.

The positive cache timeout will force open/stat and other namespace
operations to re-lookup the name, even if the file handle is still
valid.  The performance impact tested via a buildworld with a read-only
NFS mounted /usr/src appears to be minimal.

The positive cache timeout defaults to 3 second, same as the negative cache
timeout.  The timeout can be adjusted on the fly for any new namespace
lookups but changing the sysctl will not change any namespace lookups already
cached until they timeout.

Reported-by: Joerg Sonnenberger <joerg@britannica.bec.de>
13 years agoSome non-802.11e non-standard conforming APs use seperate TX sequences
Sepherosa Ziehau [Fri, 15 Jun 2007 12:04:45 +0000 (12:04 +0000)]
Some non-802.11e non-standard conforming APs use seperate TX sequences
for non-beacon frames and beacons.  If local cache of <addr2,seq,fragno>
tuple is updated when beacons from such kind of AP are received, 802.11
duplication detection mechanism may decide to discard non-beacon retry
frames if its sequence is less than or equal to just received beacon's.
Together with the poor TX rate control algorithm chosen by these kinds
of APs, i.e. a lot of retry data frames, a TCP connection can be choked
by STA's duplication detection mechanism.

To handle these kinds of APs (yep, we are in the world of compat):
Don't update cache of <addr2,seq,fragno> tuple for multicast or broadcast
802.11 MAC frames.  This does not violate IEEE Std 802.11, 1999 Edition
subclause 9.2.9, which actually allows us to "omit tuples obtained from
broadcast/multicast ...".

Thank Petr Janda <elekktretterr@exemail.com.au> for providing all
necessary 802.11 tcpdumps to track down the problem.

Thank dillon@ for analyzing some tcpdumps which leads me to think that
the reported problem may be caused by the duplication detection in
802.11 layer.

Reported-by: Petr Janda <elekktretterr@exemail.com.au>
Tested-by: Petr Janda <elekktretterr@exemail.com.au>
13 years agodisklabel(8) and newfs(8) now act on the compatibility slice (s0)
Sascha Wildner [Fri, 15 Jun 2007 10:45:33 +0000 (10:45 +0000)]
disklabel(8) and newfs(8) now act on the compatibility slice (s0)
instead of the raw disk device.

Submitted-by: Nuno Antunes <nuno.antunes@gmail.com>
13 years agoThe text states that the CSPRNG is seeded from /dev/urandom, so add a
Sascha Wildner [Fri, 15 Jun 2007 10:10:13 +0000 (10:10 +0000)]
The text states that the CSPRNG is seeded from /dev/urandom, so add a
reference to urandom(4).

Reported-by: Robin Carey <robin_carey5@yahoo.co.uk>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue701>

13 years agoFix conditionals to prevent endless loop.
Simon Schubert [Fri, 15 Jun 2007 07:02:51 +0000 (07:02 +0000)]
Fix conditionals to prevent endless loop.

Reported-by: swildner
Duh-to:  corecode

13 years agoRemove obsolete names (MLINKS have been switched to nata(4)).
Sascha Wildner [Fri, 15 Jun 2007 05:53:06 +0000 (05:53 +0000)]
Remove obsolete names (MLINKS have been switched to nata(4)).

13 years agoDocument that nata(4) is now our default ATA driver:
Sascha Wildner [Thu, 14 Jun 2007 23:00:36 +0000 (23:00 +0000)]
Document that nata(4) is now our default ATA driver:

* Bring in a modified version of FreeBSD's ata(4) manual page as nata(4).

* Adjust related manual pages.

* Remove sata(4) MLINK.

13 years agoAllow vchans to have their own volume control.
Simon Schubert [Thu, 14 Jun 2007 21:48:36 +0000 (21:48 +0000)]
Allow vchans to have their own volume control.

This means you can use two processes producing audio and change their volume
independently (if they implement mixer controls themselves).

13 years agoCDRom -> CD-ROM
Sascha Wildner [Thu, 14 Jun 2007 21:16:13 +0000 (21:16 +0000)]
CDRom -> CD-ROM

13 years ago* Fix the example for configuring /etc/ttys according to the original
Sascha Wildner [Thu, 14 Jun 2007 21:11:29 +0000 (21:11 +0000)]
* Fix the example for configuring /etc/ttys according to the original
  instructions Matt posted on the lists.

* CDRom -> CD-ROM

* Start sentence with a capital letter.

13 years agoTo create a disklabel, the vn0s0 device is now used instead of the raw
Sascha Wildner [Thu, 14 Jun 2007 21:02:57 +0000 (21:02 +0000)]
To create a disklabel, the vn0s0 device is now used instead of the raw
device vn0.

Submitted-by: Nuno Antunes <nuno.antunes@gmail.com>
13 years agoWhen getnewvnode() is called the vnode's v_type defaults to VNON. Syncer
Matthew Dillon [Thu, 14 Jun 2007 02:55:27 +0000 (02:55 +0000)]
When getnewvnode() is called the vnode's v_type defaults to VNON.  Syncer
vnodes are also set to VNON and any vnode that is accessed without locking
whos v_type is VNON is probably in the middle of being initialized.  For
this reason the mountlist scan and vflush code typically ignores such
vnodes.

If a read error occurs while initializing a vnode, in particular if a hash
collision occurs or an I/O error occurs reading the inode, the vnode's
v_type was being left set to VNON.  Explicitly set it to VBAD for msdosfs
and ufs (other FS's probably need the same treatment) so the flush and
reclaim code can reuse the vnode.

This fixes 'dangling vnode' panics on unmount for filesystems which incur
I/O errors, such as when one pulls a USB memory stick out while it is
still mounted.

13 years agoxpt_bus_deregister() never returns 0, don't test for it.
Matthew Dillon [Thu, 14 Jun 2007 01:10:25 +0000 (01:10 +0000)]
xpt_bus_deregister() never returns 0, don't test for it.

Assert that the sim is attached if a backend sim function is called,
because cam_sim_free() now replaces the functions when the sim is
detached.

13 years agoDo not destroy the device queue, it is needed by the peripheral code
Matthew Dillon [Thu, 14 Jun 2007 01:09:30 +0000 (01:09 +0000)]
Do not destroy the device queue, it is needed by the peripheral code
(e.g. scsi/scsi_da.c, etc) even if the backend hardware has disappeared.
When cam_sim_free() is called, set up a dummy poll and action callback
and make the action callback generate an I/O error.

This allows things like filesystem mounts of USB memory sticks to start
returning I/O errors instead of blocking forever if the stick is pulled.

13 years agoExpand the diskslice->ds_openmask from 8 bits to 256 bits to cover all
Matthew Dillon [Wed, 13 Jun 2007 20:58:38 +0000 (20:58 +0000)]
Expand the diskslice->ds_openmask from 8 bits to 256 bits to cover all
possible partitions.  Partitions from 'i' on, and the whole-disk partition,
were not being properly tracked, resulting in multiple device opens and
device closes to the underlying device.

In particular, this caused USB memory sticks to connect to the CAM driver
with ever-increasing DA#n unit numbers because CAMs reference counting got
seriously corrupted.

Reported-by: "Simon 'corecode' Schubert" <corecode@fs.ei.tum.de>
13 years agodev_dopen() can be called multiple times with only one dev_dclose() when
Matthew Dillon [Wed, 13 Jun 2007 20:53:39 +0000 (20:53 +0000)]
dev_dopen() can be called multiple times with only one dev_dclose() when
D_TRACKCLOSE is not specified.  Make sure multiple opens only reference
the CAM peripheral once and complain if dev_dclose() is called more then
once.

This also prevents bugs in higher layers from propogating to lower ones.

13 years agoRefuse to poll a detached sim.
Matthew Dillon [Wed, 13 Jun 2007 20:45:24 +0000 (20:45 +0000)]
Refuse to poll a detached sim.

13 years agoDont poll PS/2 mouse interrupts, it can cause the mouse to get jumpy.
Matthew Dillon [Wed, 13 Jun 2007 17:15:25 +0000 (17:15 +0000)]
Dont poll PS/2 mouse interrupts, it can cause the mouse to get jumpy.
Also, the keyboard/mouse code is full of DELAY()s and pretty nasty
in general.

13 years agoFix typo.
Sascha Wildner [Wed, 13 Jun 2007 14:27:41 +0000 (14:27 +0000)]
Fix typo.

Reported-by: Robin Carey <robin_carey5@yahoo.co.uk>
13 years agoUse correct variable types when copying files.
Simon Schubert [Tue, 12 Jun 2007 20:56:16 +0000 (20:56 +0000)]
Use correct variable types when copying files.

Reported/Reviewed-by:  Trevor Kendall

13 years agoFix rewrite error which appeared in rev 1.3.
Hasso Tepper [Tue, 12 Jun 2007 12:50:22 +0000 (12:50 +0000)]
Fix rewrite error which appeared in rev 1.3.

13 years agoRemove some non-existant variables and clean up the manpage a bit.
Sascha Wildner [Sun, 10 Jun 2007 18:57:59 +0000 (18:57 +0000)]
Remove some non-existant variables and clean up the manpage a bit.

13 years agoSwitch xorg to modular, so that it fits with the prebuilt packages.
Simon Schubert [Sun, 10 Jun 2007 09:32:36 +0000 (09:32 +0000)]
Switch xorg to modular, so that it fits with the prebuilt packages.

13 years agoMove initialization of a vnode's various red-black trees to the CTOR function
Matthew Dillon [Sat, 9 Jun 2007 19:46:02 +0000 (19:46 +0000)]
Move initialization of a vnode's various red-black trees to the CTOR function
rather then reinitializing the trees on reuse.

Add assertions that the trees are empty on reuse and that the vnode is not
on the syncer work list.

13 years agoThis patch allows umct (USB<->RS232 adapter) to write to devices that do
Matthew Dillon [Sat, 9 Jun 2007 18:56:23 +0000 (18:56 +0000)]
This patch allows umct (USB<->RS232 adapter) to write to devices that do
not assert CTS.  The code in linux which this patch was adapted from
was taken from what we believe was a reverse engineered windows driver which
always added two additional requests whenever changing the baud rate.  The
function of the requests is unknown, other then the effect of making such
devices work.

Submitted-by: Joe Talbott <josepht@cstone.net>
Obtained-from: Linux (roughly)

13 years agoSwitch LINT to building NATA.
Sascha Wildner [Sat, 9 Jun 2007 18:21:18 +0000 (18:21 +0000)]
Switch LINT to building NATA.

13 years agoAdd 'nataraid' and 'natausb'.
Sascha Wildner [Sat, 9 Jun 2007 17:56:27 +0000 (17:56 +0000)]
Add 'nataraid' and 'natausb'.

13 years agoRemove the temporary NATA kernel build config file. Change GENERIC to
Matthew Dillon [Sat, 9 Jun 2007 03:13:02 +0000 (03:13 +0000)]
Remove the temporary NATA kernel build config file.  Change GENERIC to
compile NATA by default.  Remove the NATA kernel build from nrelease (so
its just back to GENERIC).

13 years agoCreate an upgrade target for MAKEDEV. This target will attempt to
Matthew Dillon [Sat, 9 Jun 2007 03:09:38 +0000 (03:09 +0000)]
Create an upgrade target for MAKEDEV.  This target will attempt to
update existing mass storage character devices in /dev, but generally
is meant to do any adjustments required when upgrading from an earlier
version of DragonFly to a later version.

Adjust 'make upgrade' to use 'MAKEDEV upgrade' instead of 'MAKEDEV all'.

13 years ago* Perform some minor cleanup in the manual page and bump the date for
Sascha Wildner [Fri, 8 Jun 2007 18:46:32 +0000 (18:46 +0000)]
* Perform some minor cleanup in the manual page and bump the date for
  the new option.

* Add -l to usage().

13 years agoComment out line about UDF specific mount options -- none were listed
Jeremy C. Reed [Fri, 8 Jun 2007 18:45:46 +0000 (18:45 +0000)]
Comment out line about UDF specific mount options -- none were listed
and none available.

Also add line about being readonly (as seen in source).

This is for my bug Issue688.

13 years agoChange the -a option to be a bit friendlier. Have it print sorted,
Matthew Dillon [Fri, 8 Jun 2007 18:33:15 +0000 (18:33 +0000)]
Change the -a option to be a bit friendlier.  Have it print sorted,
human-readable output with relative time stamps.  All print options will
be used except -f (file & line).

13 years agoAdd a new option to ktrdump (-l) which causes it to loop awaiting new data
Matthew Dillon [Fri, 8 Jun 2007 18:24:22 +0000 (18:24 +0000)]
Add a new option to ktrdump (-l) which causes it to loop awaiting new data
and then display it as it comes in.  Cleanup ktrdump considerably.  By
Aggelos Economopoulos.

Additional work by Matt:  Clean it up even more, document the code, and make
the new looping feature work with -s.

Submitted-by: Aggelos Economopoulos <aoiko@cc.ece.ntua.gr>
With-additional-work-by: dillon
13 years agoIf PCI_MAP_FIXUP is defined, following fixes will be applied:
Sepherosa Ziehau [Fri, 8 Jun 2007 13:52:09 +0000 (13:52 +0000)]
If PCI_MAP_FIXUP is defined, following fixes will be applied:
- For PCI/PCI bridge, adjust requested IO port/memory's start/range according
  to bridge's base/limit register value.
- For Host/PCI bridge, if requested IO port/memory's starts from 0 and range
  is ~0,
  o  If the request is for IO port, the start address is set to 0x1000.
  o  If the request is for IO memory, the start address is set to tunable
     hw.pci.host_mem_start, which is 0x80000000 by default.

This unbreaks cardbus bridge support, if PCI_MAP_FIXUP is defined.

My laptop's cardbus bridge is on the PCI bus mastered by a PCI/PCI bridge,
while swildner@'s laptop's cardbus bridge is on the PCI bus mastered by
Host/PCI bridge.

Tested-by: swildner@ and me
Obtained-from: FreeBSD (imp@freebsd.org)

#
# It seems BIOS does not set cardbus bridge's BAR for most of the system,
# so in the original code, the resource_list_alloc() in pci_alloc_resource()
# will return NULL for cardbus bridge's IO memory allocation request; cardbus
# bridge's code actually depends on that to reallocate IO memory using
# hw.cbb.start_memory as start address.
#
# Before this commit, if PCI_MAP_FIXUP is defined, cardbus bridge's invalid
# IO memory request will be delivered to various PCI bridge code, which does
# not validate/fixup the request and returns "successful" result bindly.
#

13 years agoDocument that bge(4) supports polling now.
Sascha Wildner [Fri, 8 Jun 2007 07:39:20 +0000 (07:39 +0000)]
Document that bge(4) supports polling now.

13 years agoIncrease the tsleep/wakeup hash table size and augment the KTR logging a bit.
Matthew Dillon [Fri, 8 Jun 2007 02:02:27 +0000 (02:02 +0000)]
Increase the tsleep/wakeup hash table size and augment the KTR logging a bit.

13 years agoFormalize the object sleep/wakeup code when waiting on a dead VM object and
Matthew Dillon [Fri, 8 Jun 2007 02:00:47 +0000 (02:00 +0000)]
Formalize the object sleep/wakeup code when waiting on a dead VM object and
remove spurious calls to wakeup().

13 years agoRemove the last source of SMP TLB invalidations in the critical code path
Matthew Dillon [Fri, 8 Jun 2007 00:57:04 +0000 (00:57 +0000)]
Remove the last source of SMP TLB invalidations in the critical code path
for fork/exec/exit/wait sequences.  The pmap page directory is now left
cached in kernel memory until the pmap is destroyed via the objcache
dtor function for VM spaces (vmspace_dtor() -> pmap_puninit()).

This improves fork/exec performance and significantly reduces the IPI
messaging load and other cross-cpu interactions.

13 years agoRemove unused variables after last commit.
Matthew Dillon [Thu, 7 Jun 2007 23:45:52 +0000 (23:45 +0000)]
Remove unused variables after last commit.

13 years agoGet rid of some broken _KERNEL_VIRTUAL hacks.
Matthew Dillon [Thu, 7 Jun 2007 23:45:02 +0000 (23:45 +0000)]
Get rid of some broken _KERNEL_VIRTUAL hacks.

13 years agoEntirely remove exec_map from the kernel. Use the new vm_fault_object_page()
Matthew Dillon [Thu, 7 Jun 2007 23:14:29 +0000 (23:14 +0000)]
Entirely remove exec_map from the kernel.  Use the new vm_fault_object_page()
for the data/bss special case in the elf loader, and use the objcache to
cache arguments for exec.

This in turn removes nearly all of the SMP page invalidation IPIs that
occur during fork/exec/exit/wait sequences by virtue of not needing to
map and unmap so much KVM.

13 years agoImplement vm_fault_object_page(). This function returns a held VM page
Matthew Dillon [Thu, 7 Jun 2007 23:00:39 +0000 (23:00 +0000)]
Implement vm_fault_object_page().  This function returns a held VM page
for the specified offset in the specified object and does all I/O necessary
to validate the page (as if it had been faulted in).

This function allows us to bypass the vm_map*() code when all we want is
the VM page.

13 years agoGet rid of disklabel faking/processing.
Simon Schubert [Thu, 7 Jun 2007 22:58:38 +0000 (22:58 +0000)]
Get rid of disklabel faking/processing.

13 years agoTry hard to restore the termios state on exit/reboot.
Simon Schubert [Thu, 7 Jun 2007 22:58:22 +0000 (22:58 +0000)]
Try hard to restore the termios state on exit/reboot.

tcsetattr() can be interrupted by spurious SIGIO from the kqueue, so
try setting the state until it succeeds.  Add an EVENTHANDLER so that
the tty state will be restored for a possible kernel reboot.

13 years agoFix module loading for vkernel.
Simon Schubert [Thu, 7 Jun 2007 22:58:11 +0000 (22:58 +0000)]
Fix module loading for vkernel.

Some symbols in the vkernel are actually provided by libs the
kernel binary is linked to, which can not be resolved by the
internal kernel linker.  Fall back on using dlsym() if no
symbol could be found by the kernel linker.  This actually means
that the kernel needs to be linked dynamically.

13 years agoDon't loose count when adding too many plexes to a volume.
Simon Schubert [Thu, 7 Jun 2007 22:58:00 +0000 (22:58 +0000)]
Don't loose count when adding too many plexes to a volume.

13 years agoUse MAXPARTITIONS instead of hardcoded value.
Simon Schubert [Thu, 7 Jun 2007 22:57:49 +0000 (22:57 +0000)]
Use MAXPARTITIONS instead of hardcoded value.

13 years agoAdd KTR logging for SMP page table syncing ops.
Matthew Dillon [Thu, 7 Jun 2007 20:35:54 +0000 (20:35 +0000)]
Add KTR logging for SMP page table syncing ops.

13 years agoUse the slab cache for PAGE_SIZE and PAGE_SIZE*2 sized allocations. This
Matthew Dillon [Thu, 7 Jun 2007 20:34:14 +0000 (20:34 +0000)]
Use the slab cache for PAGE_SIZE and PAGE_SIZE*2 sized allocations.  This
reduces the number of SMP page invals the ELF loader and mmio have to do
for operations that occur on a single cpu.

13 years agoAdd polling support to BGE.
Matthew Dillon [Thu, 7 Jun 2007 20:30:20 +0000 (20:30 +0000)]
Add polling support to BGE.

13 years agoWhen compiling a kernel with all ktr logging (KTR_ALL), do not auto-enable
Matthew Dillon [Thu, 7 Jun 2007 18:03:15 +0000 (18:03 +0000)]
When compiling a kernel with all ktr logging (KTR_ALL), do not auto-enable
the KTRs on boot because logging everything is counter productive.  Instead,
let userland enable particular KTRs via sysctl.

13 years agoAdd a field to the keyboard abstraction structure that allows the USB
Matthew Dillon [Wed, 6 Jun 2007 18:49:28 +0000 (18:49 +0000)]
Add a field to the keyboard abstraction structure that allows the USB
keyboard controller to save and restore the translation state.  This
allows you to disconnect and reconnect a USB keyboard and not get
gibberish when you type.

Reported-by: Petr Janda <elekktretterr@exemail.com.au>
13 years agobridge_enqueue() does not use bridge(4)'s softc, so don't pretend that the
Sepherosa Ziehau [Wed, 6 Jun 2007 13:10:39 +0000 (13:10 +0000)]
bridge_enqueue() does not use bridge(4)'s softc, so don't pretend that the
parameter is needed.

13 years agoUpdate FreeBSD ID tags.
Sascha Wildner [Tue, 5 Jun 2007 18:30:40 +0000 (18:30 +0000)]
Update FreeBSD ID tags.

13 years agoDon't let ether_input() to do the bridging work, i.e. change input iface,
Sepherosa Ziehau [Tue, 5 Jun 2007 13:41:39 +0000 (13:41 +0000)]
Don't let ether_input() to do the bridging work, i.e. change input iface,
since it breaks following things:
o  IFF_MONITOR support.
o  Assumption that ether_input() is called with input iface's serializer
   held.
o  Per interface input packets and bytes statistics.

Let the bridge(4) handle the input iface change, which is centralized
at the end of bridge_input() after leaving bridge(4) iface's serializer.
We call ifnet.if_input() when handling iface change, instead of skipping
the "upper" half of ifnet.if_input() as we did originally; the assumption
that "upper" half of ifnet.if_input() does nothing according to input iface
does not sounds good.  M_PROTO1 mbuf flag is used to prevent infinite loop;
we may need to create a meaningful alias macro for it.

Other changes:
- Delay bridge_lookup_member_if() call until it is really necessary.
- Update ipackets for bridge(4) iface, if mcast/bcast packet is received
  and is going to be delivered to bridge(4) iface.
- Use IF_LLADDR() macro to get bridge(4) iface's MAC address.
- Nuke never reached code.
- Minor style changes.

13 years agoAdd some words about -v.
Sascha Wildner [Mon, 4 Jun 2007 21:04:27 +0000 (21:04 +0000)]
Add some words about -v.

Submitted-by: y0netan1
13 years agoDo any crash dump operation before the shutdown_post_sync event handler
Matthew Dillon [Mon, 4 Jun 2007 17:22:02 +0000 (17:22 +0000)]
Do any crash dump operation before the shutdown_post_sync event handler
is invoked.  Move numerous legacy device shutdown event handlers from
shutdown_final to shutdown_post_sync.  Note that newer devices uses
the device_shutdown DEVMETHOD.

13 years agoAdd the cvsup manpage to the ISO, dammit.
Sascha Wildner [Mon, 4 Jun 2007 01:47:41 +0000 (01:47 +0000)]
Add the cvsup manpage to the ISO, dammit.

13 years agoReadjust some comments.
Sascha Wildner [Mon, 4 Jun 2007 01:08:02 +0000 (01:08 +0000)]
Readjust some comments.

13 years agoReplace the remaining NG_*LEN constants with NG_*SIZ constants for real.
Sascha Wildner [Mon, 4 Jun 2007 00:40:32 +0000 (00:40 +0000)]
Replace the remaining NG_*LEN constants with NG_*SIZ constants for real.

Submitted-by: Nuno Antunes <nuno.antunes@gmail.com>
13 years agoReplace the remaining *LEN constants with *SIZ constants.
Sascha Wildner [Sun, 3 Jun 2007 23:41:25 +0000 (23:41 +0000)]
Replace the remaining *LEN constants with *SIZ constants.

Reported-by: walt <wa1ter@myrealbox.com>
Submitted-by: Nuno Antunes <nuno.antunes@gmail.com>
13 years agoUpdate for libarchive 2.2.3.
Peter Avalos [Sun, 3 Jun 2007 21:29:07 +0000 (21:29 +0000)]
Update for libarchive 2.2.3.

13 years agoMerge from vendor branch LIBARCHIVE:
Peter Avalos [Sun, 3 Jun 2007 21:26:40 +0000 (21:26 +0000)]
Merge from vendor branch LIBARCHIVE:
Import libarchive 2.2.3 fixing a few memory leaks and other fixes.

13 years agoImport libarchive 2.2.3 fixing a few memory leaks and other fixes.
Peter Avalos [Sun, 3 Jun 2007 21:26:40 +0000 (21:26 +0000)]
Import libarchive 2.2.3 fixing a few memory leaks and other fixes.

13 years agoCatch up a bit with FreeBSD netgraph by replacing *LEN constants with
Matthew Dillon [Sun, 3 Jun 2007 20:51:13 +0000 (20:51 +0000)]
Catch up a bit with FreeBSD netgraph by replacing *LEN constants with
*SIZ constants which already account space for trailing '\0's.

Submitted-by: "Nuno Antunes" <nuno.antunes@gmail.com>
Obtained from: FreeBSD (sorta).

13 years agoGC old sendmail version.
Peter Avalos [Sun, 3 Jun 2007 17:22:57 +0000 (17:22 +0000)]
GC old sendmail version.

13 years agoCorrect conditional to correctly treat segments which end on a boundary.
Simon Schubert [Sun, 3 Jun 2007 13:02:24 +0000 (13:02 +0000)]
Correct conditional to correctly treat segments which end on a boundary.

13 years agoGo to bed before the sun comes up.
Matthew Dillon [Sun, 3 Jun 2007 11:52:45 +0000 (11:52 +0000)]
Go to bed before the sun comes up.

13 years agoPart 1/2: Add a sanity check to the NATA interrupt code to assert that
Matthew Dillon [Sun, 3 Jun 2007 11:52:09 +0000 (11:52 +0000)]
Part 1/2: Add a sanity check to the NATA interrupt code to assert that
the command has actually been issued.

13 years agoSet the IDE DMA start bit as a separate I/O write from the DMA port
Matthew Dillon [Sun, 3 Jun 2007 11:49:54 +0000 (11:49 +0000)]
Set the IDE DMA start bit as a separate I/O write from the DMA port
direction setting.  It's just a whole lot safer not to mix the two in
a single write.

13 years agovmstat -iv: include IRQ number before the interrupt name, unless
YONETANI Tomokazu [Sun, 3 Jun 2007 11:49:30 +0000 (11:49 +0000)]
vmstat -iv: include IRQ number before the interrupt name, unless
it begins with "irq", in which case the name contains the number.

13 years agoImplement boundary and maximum segment size handling in bus_dmamap_load().
Matthew Dillon [Sun, 3 Jun 2007 11:47:10 +0000 (11:47 +0000)]
Implement boundary and maximum segment size handling in bus_dmamap_load().
This fixes NATA's UDMA device support.  The UDMA dma controller is limited
to a transfer size of 65536 bytes and address incrementation might not
carry over to bit 16.

13 years agobridge_{input,output_serialized}() only need to be static; they are actually
Sepherosa Ziehau [Sun, 3 Jun 2007 11:25:58 +0000 (11:25 +0000)]
bridge_{input,output_serialized}() only need to be static; they are actually
declared as static functions.

13 years agoM_NOWAIT can only be used in a driver where a failed memory allocation is
Matthew Dillon [Sun, 3 Jun 2007 04:48:29 +0000 (04:48 +0000)]
M_NOWAIT can only be used in a driver where a failed memory allocation is
recoverable, such as in a network driver.  FreeBSD seems to have a looser
definition but in DragonFly M_NOWAIT really means M_NOWAIT ... any blocking
at all, including waiting on the BGL or getting the kernel_map lock,
will result in a failure NULL.

Change all M_NOWAIT's to either M_WAITOK or M_INTWAIT.

13 years agoAdd a timings line for UDMA6 in two places. The drivers in question may or
Matthew Dillon [Sun, 3 Jun 2007 04:27:56 +0000 (04:27 +0000)]
Add a timings line for UDMA6 in two places.  The drivers in question may or
may not support it, but the array still needs to be large enough for all
possible elements.

Revamp the programming of register 0x48, 0x54, and 0x40 for the Intel
chipset support, and document the hell out of the whole thing.

Register 0x54 covers both primary and secondary controllers and master and
slave devices and was being fully programmed for each sub-device, causing
some sub devices to become misprogrammed.  Change it so only the elements
related to the sub-device are programmed.  It is unclear how much of a
difference this makes for the parts in question but at least it's documented
now.

Fix logic that was causing UDMA66 devices on intel controllers to operate
at UDMA33 speeds (does anyone even have UDMA66 devices any more?).

Add support for the SB600 - from "Thomas E. Spanjaard"

13 years agoGC old less version.
Peter Avalos [Sun, 3 Jun 2007 04:24:35 +0000 (04:24 +0000)]
GC old less version.

13 years agoUpgrade to less version 403.
Peter Avalos [Sun, 3 Jun 2007 04:23:45 +0000 (04:23 +0000)]
Upgrade to less version 403.

These are the differences between version 394 and version 403:

-Allow decimal point in number for % (percent) command.
-Allow decimal point in number for -j option (fraction of screen height).
-Make n command fetch previous pattern from history file on first search.
-Don't rewrite history file if it has not changed.
-Don't move to bottom of screen on first page.
-Don't output extraneous newlines, so copy & pasting lines from the output
works better.
-The -c option has been made identical with the -C option.
-Allow "/dev/null" as synomym for "-" in LESSHISTFILE to indicate that no
history file should be used.
-Better compatibility with POSIX more specification.
-Make -f work for directories.
-Make "t" cmd traverse tags in the correct order.
-Allow a few binary characters in the input file before warning that the
file is binary.
-Don't warn that file is binary if it merely contains ANSI color sequences
and -R is in effect.
-Update Unicode character tables.
-Fix bug when filename contains certain shell metacharacters such as "$".
-Fix bug when resizing the window while waiting for input from a pipe.

13 years agoAdd our READMEs.
Peter Avalos [Sun, 3 Jun 2007 04:20:21 +0000 (04:20 +0000)]
Add our READMEs.

13 years agoMerge from vendor branch LESS:
Peter Avalos [Sun, 3 Jun 2007 04:18:02 +0000 (04:18 +0000)]
Merge from vendor branch LESS:
Import of less-403.

13 years agoImport of less-403.
Peter Avalos [Sun, 3 Jun 2007 04:18:02 +0000 (04:18 +0000)]
Import of less-403.