dragonfly.git
11 years agoMerge from vendor branch LIBEVENT:
Hasso Tepper [Wed, 30 Jan 2008 12:35:18 +0000 (12:35 +0000)]
Merge from vendor branch LIBEVENT:
Import libevent-1.3e.

11 years agoImport libevent-1.3e. vendor/LIBEVENT
Hasso Tepper [Wed, 30 Jan 2008 12:35:18 +0000 (12:35 +0000)]
Import libevent-1.3e.

11 years agoBump date for -l.
Sascha Wildner [Wed, 30 Jan 2008 12:35:07 +0000 (12:35 +0000)]
Bump date for -l.

11 years agoFix building with CPU_DISABLE_SSE (this fixes LINT building).
Sascha Wildner [Wed, 30 Jan 2008 11:57:09 +0000 (11:57 +0000)]
Fix building with CPU_DISABLE_SSE (this fixes LINT building).

11 years agoAdd '-l' support to vnconfig(8) and supporting VNGET ioctl to vn(4).
Chris Turner [Wed, 30 Jan 2008 11:46:33 +0000 (11:46 +0000)]
Add '-l' support to vnconfig(8) and supporting VNGET ioctl to vn(4).

Inspired-by: OpenBSD (with updates to vnconfig -l UI & swap support)
11 years agoConditionalize the illegal MXCSR tests on SSE support. Machines that did
Matthew Dillon [Tue, 29 Jan 2008 19:55:00 +0000 (19:55 +0000)]
Conditionalize the illegal MXCSR tests on SSE support.  Machines that did
not support SSE were improperly reporting MXCSR violations.

Finish implementing SSE support in the vkernel (not well tested).

Reported-by: ejc <eric.j.christeson@gmail.com>
11 years agoo Update dd(1) to accept capital letters (B, K, M, G) as size modifiers.
Matthias Schmidt [Mon, 28 Jan 2008 16:08:02 +0000 (16:08 +0000)]
o Update dd(1) to accept capital letters (B, K, M, G) as size modifiers.
o Remove the 3rd clause of the Berkeley license while here.

11 years agoMinor cosmetic change to the USB devices lists.
Matthias Schmidt [Mon, 28 Jan 2008 14:57:52 +0000 (14:57 +0000)]
Minor cosmetic change to the USB devices lists.

Reviewed-by: hasso@, swildner@
11 years agoFix spurious "softdep_deallocate_dependencies: dangling deps" panic occuring
Nicolas Thery [Mon, 28 Jan 2008 07:19:06 +0000 (07:19 +0000)]
Fix spurious "softdep_deallocate_dependencies: dangling deps" panic occuring
on low memory condition.

Add assertion to catch similar bugs automagically.

Reported-by: Peter Avalos <pavalos@theshell.com>
Reviewed-by: Matthew Dillon <dillon@backplane.com>
11 years agoRemove objcache from allobjcaches when cache destroyed.
Nicolas Thery [Sun, 27 Jan 2008 22:32:57 +0000 (22:32 +0000)]
Remove objcache from allobjcaches when cache destroyed.

Turn allobjcaches into double-linked list for fast removal.

11 years agoReference wiki version of handbook to be in line with similar change done to
Nicolas Thery [Sun, 27 Jan 2008 09:08:39 +0000 (09:08 +0000)]
Reference wiki version of handbook to be in line with similar change done to
web site recently.

11 years agoSort alphabetically.
Sascha Wildner [Sun, 27 Jan 2008 06:24:57 +0000 (06:24 +0000)]
Sort alphabetically.

11 years agoList all USB drivers along with a short description.
Sascha Wildner [Sun, 27 Jan 2008 05:19:13 +0000 (05:19 +0000)]
List all USB drivers along with a short description.

Suggested-by: hasso
11 years agoAdd dot (.) forgotten in last commit.
Matthias Schmidt [Sat, 26 Jan 2008 17:20:56 +0000 (17:20 +0000)]
Add dot (.) forgotten in last commit.

Noticed-by: swildner@
11 years agoMention wpa_supplicant(8) and wpa_supplicant.conf(5) if a user adds WPA
Matthias Schmidt [Sat, 26 Jan 2008 17:12:36 +0000 (17:12 +0000)]
Mention wpa_supplicant(8) and wpa_supplicant.conf(5) if a user adds WPA
keyword to an ifconfig_$foo line.

11 years agoOops, wrong year.
Sascha Wildner [Sat, 26 Jan 2008 16:33:18 +0000 (16:33 +0000)]
Oops, wrong year.

11 years agoIn SEE ALSO, mark references to pkgsrc manual pages as such.
Sascha Wildner [Sat, 26 Jan 2008 15:14:41 +0000 (15:14 +0000)]
In SEE ALSO, mark references to pkgsrc manual pages as such.

11 years agoBring in some fixes from FreeBSD.
Sascha Wildner [Sat, 26 Jan 2008 14:33:16 +0000 (14:33 +0000)]
Bring in some fixes from FreeBSD.

11 years agopbm(5) is part of pkgsrc/graphics/netpbm.
Sascha Wildner [Sat, 26 Jan 2008 14:17:27 +0000 (14:17 +0000)]
pbm(5) is part of pkgsrc/graphics/netpbm.

11 years agoAdd lldiv_t and a prototype for lldiv().
Sascha Wildner [Fri, 25 Jan 2008 23:32:41 +0000 (23:32 +0000)]
Add lldiv_t and a prototype for lldiv().

Submitted-by: Rumko <rumcic@gmail.com>
Taken-from:   FreeBSD

11 years agoAdd lldiv() and imaxdiv() to libc.
Sascha Wildner [Fri, 25 Jan 2008 23:24:31 +0000 (23:24 +0000)]
Add lldiv() and imaxdiv() to libc.

Submitted-by: Rumko <rumcic@gmail.com>
Taken-from:   FreeBSD

11 years agoHAMMER utilities: synchronize newfs_hammer.
Matthew Dillon [Fri, 25 Jan 2008 21:52:10 +0000 (21:52 +0000)]
HAMMER utilities: synchronize newfs_hammer.

* Assign the proper left boundary for the root cluster

* Sync up with an API change made in the hammer utilities sources.

11 years agoHAMMER 24B/many: Edge cases, cleanups
Matthew Dillon [Fri, 25 Jan 2008 21:50:56 +0000 (21:50 +0000)]
HAMMER 24B/many: Edge cases, cleanups

* Use create_tid instead of delete_tid in B-Tree key comparisons.  I
  actually used create_tid's originally, then switched to delete_tid's
  because historical searches could iterate forwards to locate
  matching records whereas using create_tid required a backwards
  iteration.

  However, because delete_tid's can be modified in-place (0 -> delete stamp),
  this introduced some rare edges cases that I had not considered.

  So go back to using create_tid's.  The iteration code actually just does
  a re-search now with a slightly different key, so no new code had
  to be written for the reverse-direction.  Create TIDs do not change once
  they are laid down so there are no additional cases to consider.

* Fix a missing create_tid initialization in hammer_object.c.

11 years ago- It does not make sense to use "for (;cond;)", use "while (cond)" instead
Sepherosa Ziehau [Fri, 25 Jan 2008 15:44:49 +0000 (15:44 +0000)]
- It does not make sense to use "for (;cond;)", use "while (cond)" instead
- Bark out loud, if hardware gives us wrong encryption done index

11 years agoSet 2560 part default txpower to 24dBm. This value works _much_ better then
Sepherosa Ziehau [Fri, 25 Jan 2008 15:09:42 +0000 (15:09 +0000)]
Set 2560 part default txpower to 24dBm.  This value works _much_ better then
30dBm (default channel TX power stored in EEPROM) under most cases.

11 years agoral(4) for 2560 part does not support hardware WEP (yet)
Sepherosa Ziehau [Fri, 25 Jan 2008 14:47:52 +0000 (14:47 +0000)]
ral(4) for 2560 part does not support hardware WEP (yet)

11 years agoThere are actually two TX queues for 2560 parts, so add two softc private
Sepherosa Ziehau [Fri, 25 Jan 2008 14:43:10 +0000 (14:43 +0000)]
There are actually two TX queues for 2560 parts, so add two softc private
flags which are used to mark that the TX queues are "over active".  Clear
IFF_OACTIVE iff all of the private OACT flags are off.

11 years agoDon't reset watchdog timeout value, if there are still TX descs pending
Sepherosa Ziehau [Fri, 25 Jan 2008 14:26:14 +0000 (14:26 +0000)]
Don't reset watchdog timeout value, if there are still TX descs pending
on either data queue or prio(management) queue.

11 years agoHAMMER 25/many: get fsx (filesystem test) working, cleanup pass
Matthew Dillon [Fri, 25 Jan 2008 10:36:04 +0000 (10:36 +0000)]
HAMMER 25/many: get fsx (filesystem test) working, cleanup pass

* Fix buffer alignment in the write strategy code.  Assert buffer alignment
  in hammer_ip_sync_data().

* Finish implementing file truncation.  There's probably still an edge case
  or two related to B_CACHE on terminal filesystem buffers when expanding
  a file.

* Pass VCHR vnodes through to fsync so the inode data syncs properly.  It
  was previously only syncing on umount or OS flushes.

* Change a bunch of debugging kprintf's to only print if a debug variable is
  set.  Reduce the debugging output considerably.

* Test FSX using both a full historical mount and a nohistory mount.

11 years ago- Correct false CCA based RX sensitivity tuning.
Sepherosa Ziehau [Fri, 25 Jan 2008 09:39:52 +0000 (09:39 +0000)]
- Correct false CCA based RX sensitivity tuning.
- Add comment about relationship between bbp17 and RX sensitivity.
- Add comment about RX sensitivity dynamic tuning mechanism.

11 years agoAdd sysctl node to set RX sensitivity, useful when operating in non-STA mode,
Sepherosa Ziehau [Fri, 25 Jan 2008 08:57:36 +0000 (08:57 +0000)]
Add sysctl node to set RX sensitivity, useful when operating in non-STA mode,
i.e. RX sensitivity calibration can't be used.

11 years agoSpeed up uhub attachment considerably. Rather than powering up each port
Hasso Tepper [Fri, 25 Jan 2008 08:49:47 +0000 (08:49 +0000)]
Speed up uhub attachment considerably. Rather than powering up each port
individually then waiting for it to become stable, power them up all
at once and then delay. Don't even bother delaying if we are a root hub,
as this is handled separately in the event thread.

My laptop boot time is cut down from 30 sec to 25 sec with this change.

Obtained-from: OpenBSD via NetBSD

11 years agoHAMMER utilities: Add a verbose (-v) option.
Matthew Dillon [Fri, 25 Jan 2008 05:53:41 +0000 (05:53 +0000)]
HAMMER utilities: Add a verbose (-v) option.

11 years agoHAMMER 24/many: Clean up edge cases
Matthew Dillon [Fri, 25 Jan 2008 05:49:08 +0000 (05:49 +0000)]
HAMMER 24/many: Clean up edge cases

Hammer now survives many cpdup/rm-rf loops with recovery forced on.

* Fix an edge case with historical lookups.  When pushing down through a
  spike an exact match on a SPIKE_END element is no guarantee of success,
  so check for and flag the delete boundary in that case.

* Delay physical cluster deletions (marking the cluster as free in the
  Volume's A-list) until the last ref on the cluster goes away.

* Fix a race between cluster deletion, filesystem sync, and recovery.
  Do not attempt to recover a cluster marked as undergoing deletion.

* Enable cluster recovery by default.  It is still fairly primitive but
  it should work well enough to put the filesystem in a working state
  once the remaining debug shims are removed.

* Clean up sequencing of io->modified to ensure that clusters are properly
  closed during normal operation.  Recovery operations should only occur
  when encountering an open cluster after a crash.

* Do not open a cluster or create a cluster->buffer dependancy when only
  updating the mtime or atime of an inode.

* In the hammer_sync_*() procedures, ref the volume/cluster prior to
  scanning its RB tree, use hammer_ref() instead of hammer_ref_*() to
  avoid unnecessary loads.  This also fixes a stale pointer bug in the
  same code.

* Remove the stack recursion in btree_remove().  btree_remove() is now able
  to clean up empty nodes going all the way up the tree (at least until it
  hits a deadlock, which is not yet handled).

* Fix primary filesystem statistics (they were getting off because
  whole clusters were being deleted without bothering to free up internal
  on-disk structures).

* Fix a minor bug in the cluster's stat_records tracking field.  'df' no
  longer shows a bleeding capacity.  Statistics will still get off due
  to crashes and such (the balancer will probably have to deal with that).

* Add more assertions.  How do you debug complex code?  You assert that
  everything is in its proper state, everywhere you can.

11 years agoIn __cursignb, always return FALSE if there is no signal pending for the
Nuno Antunes [Thu, 24 Jan 2008 22:35:14 +0000 (22:35 +0000)]
In __cursignb, always return FALSE if there is no signal pending for the
lwp, regardless if the lwp is being traced or not.

Dragonfly-bug: 926
Submitted-by: corecode@
Approved-by: dillon@
11 years agotesting.
Nuno Antunes [Thu, 24 Jan 2008 22:26:17 +0000 (22:26 +0000)]
testing.

11 years agoRemove references to non-existant opiechallenge(3).
Sascha Wildner [Thu, 24 Jan 2008 17:14:19 +0000 (17:14 +0000)]
Remove references to non-existant opiechallenge(3).

11 years agoHAMMER utilities: Features and sync with VFS.
Matthew Dillon [Thu, 24 Jan 2008 02:16:47 +0000 (02:16 +0000)]
HAMMER utilities: Features and sync with VFS.

* Add 'namekey' and 'namekey32' directives.  These generate a directory
  hash key from a path component.

* Adjust for minor API changes.

11 years agoHAMMER 23/many: Recovery, B-Tree, spike, I/O work.
Matthew Dillon [Thu, 24 Jan 2008 02:14:45 +0000 (02:14 +0000)]
HAMMER 23/many: Recovery, B-Tree, spike, I/O work.

Warning: filesystem structures have changed, recompile newfs_hammer too.

* Correct a couple more edge cases with historical lookups.  We have to
  flag the need for an iteration anywhere the edge case is hit as we
  recurse down, not just on the terminal B-Tree node.

* Get rid of the kludge record buffer bitmap in the cluster header.  Augment
  the A-List recovery and scanning code to locate record buffers.   This
  required adding some unfortunate complexity to the A-list search and
  recovery routines due to the fact that we ran out of bit codes and
  couldn't represent an all-free/initialized AND an all-free/uninitialized
  case.

* Go back to making the SPIKE_END elements range-inclusive instead of
  range-exclusive.  It turns out that making them range-exclusive caused
  a few too many collisions with adjacent records in the B-Tree.

* Excellent progress on the recovery code.  It still has numerous issues
  (there are lots of recovery cases I still have to implement), but
  it survives much longer now.  Add a sysctl to disable/enable/force
  cluster recovery (default disabled, since its still buggy).

* When creating a spike be sure to properly assign the cluster record's
  rec_offset.

* When removing a spike be sure to also free the related cluster record.

* Spike code progress.  Implement the last case it couldn't handle (spiking
  a spike) and add a very simple starter heuristic which generates a
  better spike topology (doesn't create long chains of end-range spikes).

* Add a huge number of new assertions to ease the tracking down of bugs.

* Address some IO sequencing issues that could result in io.modified
  getting prematurely cleared.  io.modified can only be cleared on write
  initiation on the last ref to a HAMMER structure.

* Add a hack to pre-reserve enough B-Tree buffers to guarantee the recovery
  code can regenerate the B-Tree without having to pack it.  This ultimately
  needs to be fixed (the recovery code really needs to pack the tree).

11 years agoFix build breakage occuring when INVARIANTS not defined and introduced
Nicolas Thery [Wed, 23 Jan 2008 17:35:48 +0000 (17:35 +0000)]
Fix build breakage occuring when INVARIANTS not defined and introduced
when adding zdestroy().

Reported-by: Matthias Schmidt <matthias@dragonflybsd.org>
11 years agoAdd quirk for an USB Flash Disk Media Player.
Matthias Schmidt [Wed, 23 Jan 2008 09:21:34 +0000 (09:21 +0000)]
Add quirk for an USB Flash Disk Media Player.

Submitted-by: Steve O'Hara-Smith <steve@sohara.org>
11 years agoTurn on VALID bit in TX desc only after the TX desc is fully setup.
Sepherosa Ziehau [Wed, 23 Jan 2008 02:37:40 +0000 (02:37 +0000)]
Turn on VALID bit in TX desc only after the TX desc is fully setup.

11 years agoStart sentences on new lines, sort links in Makefile, remove trailing space.
Sascha Wildner [Tue, 22 Jan 2008 19:17:38 +0000 (19:17 +0000)]
Start sentences on new lines, sort links in Makefile, remove trailing space.

11 years agoCall zdestroy() on module unload to avoid panic on subsequent call to sysctl
Nicolas Thery [Mon, 21 Jan 2008 21:16:59 +0000 (21:16 +0000)]
Call zdestroy() on module unload to avoid panic on subsequent call to sysctl
vm.zone.

Reported-by: Matthias Schmidt <matthias@dragonflybsd.org> (issue 910)
Debugged-by: Sepherosa Ziehau <sepherosa@gmail.com>, Matthew Dillon <dillon@apollo.backplane.com>
11 years agoDon't panic if normal zone destroyed before any call to zalloc().
Nicolas Thery [Mon, 21 Jan 2008 20:59:28 +0000 (20:59 +0000)]
Don't panic if normal zone destroyed before any call to zalloc().

11 years agoAdd zdestroy() function to release all resources owned by zone previously
Nicolas Thery [Mon, 21 Jan 2008 20:21:19 +0000 (20:21 +0000)]
Add zdestroy() function to release all resources owned by zone previously
created with zinit().

Reviewed-by: Matthew Dillon <dillon@apollo.backplane.com>
11 years agoDocument that zones are deprecated and not MP-safe.
Nicolas Thery [Mon, 21 Jan 2008 20:00:42 +0000 (20:00 +0000)]
Document that zones are deprecated and not MP-safe.

11 years agoDon't panic when invalidating a fictitious page.
Simon Schubert [Mon, 21 Jan 2008 10:28:04 +0000 (10:28 +0000)]
Don't panic when invalidating a fictitious page.

This aligns pmap_remove_all with pmap_clearbit.

11 years agoSet valid bits when updating a fake page.
Simon Schubert [Mon, 21 Jan 2008 10:25:18 +0000 (10:25 +0000)]
Set valid bits when updating a fake page.

Obtained-from:  FreeBSD (rev 1.75)

11 years agoAdd CAM_NEW_TRAN_CODE option to LINT.
Peter Avalos [Mon, 21 Jan 2008 07:25:22 +0000 (07:25 +0000)]
Add CAM_NEW_TRAN_CODE option to LINT.

11 years agoCAM_NEW_TRAN_CODE fixes.
Peter Avalos [Mon, 21 Jan 2008 07:21:28 +0000 (07:21 +0000)]
CAM_NEW_TRAN_CODE fixes.

Obtained-from: FreeBSD

11 years agoCAM_NEW_TRAN_CODE fixes.
Peter Avalos [Mon, 21 Jan 2008 04:51:41 +0000 (04:51 +0000)]
CAM_NEW_TRAN_CODE fixes.

Obtained-from: FreeBSD

11 years agoCAM_NEW_TRAN_CODE fixes.
Peter Avalos [Mon, 21 Jan 2008 04:30:04 +0000 (04:30 +0000)]
CAM_NEW_TRAN_CODE fixes.

Obtained-from: FreeBSD

11 years agoSync mly.4 manual page with FreeBSD.
Peter Avalos [Mon, 21 Jan 2008 02:40:30 +0000 (02:40 +0000)]
Sync mly.4 manual page with FreeBSD.

Obtained-from: FreeBSD

11 years agoSync mly(4) with FreeBSD.
Peter Avalos [Mon, 21 Jan 2008 02:27:37 +0000 (02:27 +0000)]
Sync mly(4) with FreeBSD.

Obtained-from: FreeBSD

11 years agoHAMMER utilities:
Matthew Dillon [Mon, 21 Jan 2008 00:03:31 +0000 (00:03 +0000)]
HAMMER utilities:

* Update for structural changes

* Enhance the 'hammer show' command to validate key ranges and output
  a good/bad indication for each listed element.

11 years agoHAMMER 22/many: Recovery and B-Tree work.
Matthew Dillon [Mon, 21 Jan 2008 00:00:19 +0000 (00:00 +0000)]
HAMMER 22/many: Recovery and B-Tree work.

* More work on the recovery code.  Interlock cluster header loading with
  the recovery operation and fix numerous bugs.

* Move some of the complexity of an AS-OF B-Tree lookup out of btree_search()
  and into btree_lookup().  Now btree_search() can just fail normally and
  btree_lookup() checks for the edge case.  The situation that occurs is
  this:
  10     15       20
      |       |
    LEAF1    LEAF2
   (12)          (18)

  If the boundary only differs by the delete_tid element, and we are doing
  a lookup AS-OF timestamp 14, we will traverse into LEAF1 which contains
  no visible nodes (element @ timestamp 12 has been deleted as-of 14).
  btree_lookup() now checks for the edge case and iterates the search
  to locate the visible element (18) in LEAF2.

  It's a bit more complex then that, but that's the basic issue.

* Fix a leaf-splitting case due to the new spike topology.

* Change the spike's ending element to be range-exclusive instead of range-
  inclusive, matching all other end-range keys in HAMMER.  Adjust the B-Tree
  code to handle the case.

* Normalize debugging output into the volume:cluster:node_offset form
  that the 'hammer show' utility uses.

11 years agoRemove some unused variables.
Sascha Wildner [Sun, 20 Jan 2008 19:38:27 +0000 (19:38 +0000)]
Remove some unused variables.

11 years agoDon't link to any threading lib as libc already exports weak symbols.
Simon Schubert [Sun, 20 Jan 2008 19:14:09 +0000 (19:14 +0000)]
Don't link to any threading lib as libc already exports weak symbols.

Linking to any threading lib could lead to overly intelligent build
scripts to pick up this particular threading lib and to link to it
directly instead of linking just to libpthread.

DragonFly-bug:  <https://bugs.dragonflybsd.org/issue921>

11 years agoAdd etc/rc.d/newsyslog to the build (seems to have been forgotten).
Sascha Wildner [Sun, 20 Jan 2008 11:23:35 +0000 (11:23 +0000)]
Add etc/rc.d/newsyslog to the build (seems to have been forgotten).

11 years agoUse set_rcvar and fix path.
Sascha Wildner [Sun, 20 Jan 2008 11:16:47 +0000 (11:16 +0000)]
Use set_rcvar and fix path.

11 years agoGC old tcsh version.
Matthias Schmidt [Sun, 20 Jan 2008 10:22:21 +0000 (10:22 +0000)]
GC old tcsh version.

11 years agoAfter the channel TX power bug fixing in rt2560_read_config(), it is impossble
Sepherosa Ziehau [Sun, 20 Jan 2008 04:42:25 +0000 (04:42 +0000)]
After the channel TX power bug fixing in rt2560_read_config(), it is impossble
that txpow[chan] is bigger than 31.

11 years agoMassive sync with FreeBSD.
Peter Avalos [Sun, 20 Jan 2008 03:40:35 +0000 (03:40 +0000)]
Massive sync with FreeBSD.

This brings support for newer hardware and bug fixes/enhancements.

Obtained-from: FreeBSD

11 years agoUpdate for file-4.23 import:
Peter Avalos [Sat, 19 Jan 2008 23:44:59 +0000 (23:44 +0000)]
Update for file-4.23 import:

This release generally fixes bugs. A list of changes can be found in the
ChangeLog.

11 years agoMerge from vendor branch FILE:
Peter Avalos [Sat, 19 Jan 2008 23:36:48 +0000 (23:36 +0000)]
Merge from vendor branch FILE:
Import file-4.23.

11 years agoImport file-4.23.
Peter Avalos [Sat, 19 Jan 2008 23:36:48 +0000 (23:36 +0000)]
Import file-4.23.

11 years agoStart sentences on a new line, fix typo and use .An.
Sascha Wildner [Sat, 19 Jan 2008 19:41:33 +0000 (19:41 +0000)]
Start sentences on a new line, fix typo and use .An.

11 years agoSort sections as per mdoc(7) and bump date for r1.16.
Sascha Wildner [Sat, 19 Jan 2008 19:11:53 +0000 (19:11 +0000)]
Sort sections as per mdoc(7) and bump date for r1.16.

11 years agoAdd HISTORY entry for dntpd(8)
Matthias Schmidt [Sat, 19 Jan 2008 18:56:46 +0000 (18:56 +0000)]
Add HISTORY entry for dntpd(8)

11 years agoFreeBSD released 6.3
Matthias Schmidt [Sat, 19 Jan 2008 18:27:11 +0000 (18:27 +0000)]
FreeBSD released 6.3

11 years agoFor 2560 parts:
Sepherosa Ziehau [Sat, 19 Jan 2008 16:10:36 +0000 (16:10 +0000)]
For 2560 parts:
ifconfig ral0 txpower POWER
now sets ral(4)'s TX power to POWER dBm

11 years agoBump the date for the -S change.
Matthias Schmidt [Sat, 19 Jan 2008 15:35:18 +0000 (15:35 +0000)]
Bump the date for the -S change.

11 years agoIntroduce a new option -S to use the size of a file for sorting (-t). This
Matthias Schmidt [Sat, 19 Jan 2008 15:33:42 +0000 (15:33 +0000)]
Introduce a new option -S to use the size of a file for sorting (-t).  This
is handy to find fat files and brings us in line with all the other BSDs.

11 years agoAdd shim for pthread_set_name_np. Not functional.
Simon Schubert [Sat, 19 Jan 2008 14:05:29 +0000 (14:05 +0000)]
Add shim for pthread_set_name_np.  Not functional.

Obtained-from:  FreeBSD

11 years ago- Setup BBP according to the values stored in BBP
Sepherosa Ziehau [Sat, 19 Jan 2008 13:36:31 +0000 (13:36 +0000)]
- Setup BBP according to the values stored in BBP
- If EEPROM channel TX power is above 31 set it to 24, since there is only
  5bits in the RF register for channel TX power
- Add RX sensitivity calibration support (STA operation mode).  Add sysctl
  node for it.  It is on by default.  Various limit values are obtained from
  Ralink RT2500

11 years agoDon't write errno to the GOT, but properly follow the indirection
Simon Schubert [Sat, 19 Jan 2008 13:30:51 +0000 (13:30 +0000)]
Don't write errno to the GOT, but properly follow the indirection

This only applies to PIC objects without TLS support, i.e. rtld.
This was broken since long but didn't get caught, because rtld is the
only consumer of this configuration and doesn't deal with errno a lot.

Noticed-by: godlkwrth on IRC while porting WINE
11 years agoUse correct register
Simon Schubert [Sat, 19 Jan 2008 13:27:02 +0000 (13:27 +0000)]
Use correct register

11 years ago- Don't set hardware slot time according to "short slot time" capability
Sepherosa Ziehau [Sat, 19 Jan 2008 10:08:52 +0000 (10:08 +0000)]
- Don't set hardware slot time according to "short slot time" capability
  in various management frames from AP.  2560 part seems to have trouble
  to acknowledge frames sent at CCK/DS rates by certain APs (e.g. Linksys)
  Add comment about it.
- 54/48/36/24Mb should use 24Mb as acknowledge rate.  18/12Mb should use
  12Mb as acknowledge rate.  9/6Mb should use 6Mb as acknowledge rate.
  Adjust register values accordingly (infered from Ralink RT2500 comment).

# With this commit (properly ack frames sent at CCK/DS rates) and by setting
# txpower to 70 (avoid excessive retry at 48Mb and 54Mb), ASUS WL-107g now
# works quite well with the Linksys AP (WRT54G, with the default firmware).

11 years agoRemove some unnecessary initialization.
Sascha Wildner [Sat, 19 Jan 2008 08:50:12 +0000 (08:50 +0000)]
Remove some unnecessary initialization.

11 years agoAdd a manual page for contigmalloc() and contigfree().
Sascha Wildner [Sat, 19 Jan 2008 08:23:17 +0000 (08:23 +0000)]
Add a manual page for contigmalloc() and contigfree().

Taken from FreeBSD with some adjustments and a few lines about
M_WAITOK behavior.

Reviewed-by: sephe
11 years ago- Capabilities information field is 2bytes long. Mark old sta info
Sepherosa Ziehau [Sat, 19 Jan 2008 07:34:13 +0000 (07:34 +0000)]
- Capabilities information field is 2bytes long.  Mark old sta info
  structure's capinfo as deprecated.  Add new field in sta info to
  deliver capabilities information to userland applications.
- Update ifconfig(8)

11 years ago- Capabilities information field is 2bytes long. Mark old scan result
Sepherosa Ziehau [Sat, 19 Jan 2008 07:03:55 +0000 (07:03 +0000)]
- Capabilities information field is 2bytes long.  Mark old scan result
  structure's capinfo as deprecated.  Use padding field in scan result
  to deliver capabilities information.
- Update ifconfig(8) and wpa_supplicant(8) accordingly

11 years agogbk.5 was added by mistake.
Sascha Wildner [Fri, 18 Jan 2008 20:49:59 +0000 (20:49 +0000)]
gbk.5 was added by mistake.

11 years agoFix time conversion bugs in the stamp command.
Matthew Dillon [Fri, 18 Jan 2008 19:38:29 +0000 (19:38 +0000)]
Fix time conversion bugs in the stamp command.

Submitted-by: YONETANI Tomokazu <qhwt+dfly@les.ath.cx>
11 years agoFix an issue with cache_rename(). This procedure previously copied a
Matthew Dillon [Fri, 18 Jan 2008 19:13:16 +0000 (19:13 +0000)]
Fix an issue with cache_rename().  This procedure previously copied a
namecache entry to a new one and then invalidated the old one, operating
under the idea that the namespace structures should remain consistent.
However, the curret, root, and jail directories for a process are stored as
pointers to namecache structures and renaming a directory resulted in
the current, root, or jail directory for related processes becoming invalid.

Changes to the namecache structure over the years (separately allocated
nc_name, rehash support, etc) now make it possible to implement the
cache_rename() by physically renaming the namecache structure instead
of copying it, allowing process references to be retained.

NOTE: There may still be a race against nlookup's.

Reported-by: Vincent Stemen <vs1@crel.us>
Testing-by: Vincent Stemen <vs1@crel.us>
11 years agoAdd hammer_recover.c for kernel builds w/ HAMMER.
Matthew Dillon [Fri, 18 Jan 2008 19:06:29 +0000 (19:06 +0000)]
Add hammer_recover.c for kernel builds w/ HAMMER.

11 years agoFix a bug preventing burncd(8) from dispaying the progress of CD-RW (maybe
Matthias Schmidt [Fri, 18 Jan 2008 13:53:46 +0000 (13:53 +0000)]
Fix a bug preventing burncd(8) from dispaying the progress of CD-RW (maybe
more operations) blanking/erasing.  Originally from FreeBSD.

Before:
# burncd -f /dev/acd0 erase
erasing CD (stalls here and you can't see any progress)

After:
# burncd -f /dev/acd0 erase
erasing CD - xx % done

11 years agoHAMMER 21/many: B-Tree node locking finalization.
Matthew Dillon [Fri, 18 Jan 2008 07:02:41 +0000 (07:02 +0000)]
HAMMER 21/many: B-Tree node locking finalization.

* Implement the final locking scheme for B-Tree nodes.  Use shared locks
  for all searches, upgrade to exclusive locks for modifications.  If
  unable to upgrade fall through with an EDEADLK error code and retry the
  operation after releasing all other locks and blocking on the lock that
  could not be obtained.

  Simple iterations never fail and do not need to handle an EDEADLK error
  code.

  Because EDEADLK can actually occur quite often the error paths for most
  code modules will begin to get some exercise, which is good for code
  stability.

  It is possible to cache cursor positions closer to the desired target
  to reduce re-lookup times but I don't try to do this yet.

* Finalize code for basic (unbalanced) deletions.   Neither leaf nor internal
  nodes are allowed to be empty any more (except at the root of a cluster),
  but recursive deletions may deadlock while going up the tree and leave
  an internal node with a zero'd out element.   The search and iteration
  code now properly detects such elements and finishes off the deletion,
  though a complete cleaning will be left up to the balancing module.

* Remove most instances of recursively instantiated cursors.  There is still
  one left in the directory deletion code.

* Remove all remaining unprotected cursor transitions (where locks had to be
  released to avoid deadlocks).

11 years agoNuke staled code
Sepherosa Ziehau [Fri, 18 Jan 2008 03:58:05 +0000 (03:58 +0000)]
Nuke staled code

11 years ago- Extract RX sensitivity calibration capability from EEPROM
Sepherosa Ziehau [Fri, 18 Jan 2008 03:52:02 +0000 (03:52 +0000)]
- Extract RX sensitivity calibration capability from EEPROM
- Skip invalid BBP register/value entries extracted from EEPROM
- More debug messages

11 years ago- If channel TX power from EEPROM is above 32, set it to 24
Sepherosa Ziehau [Fri, 18 Jan 2008 02:15:43 +0000 (02:15 +0000)]
- If channel TX power from EEPROM is above 32, set it to 24
- Rename rt2560_read_eeprom() to rt2560_read_config()

11 years agoFix EEPROM channel TX power parsing.
Sepherosa Ziehau [Fri, 18 Jan 2008 01:43:07 +0000 (01:43 +0000)]
Fix EEPROM channel TX power parsing.

Based-on: Ralink RT2500

11 years agoAdd some words about /usr/share/i18n and /usr/share/openssl/man.
Sascha Wildner [Thu, 17 Jan 2008 23:02:40 +0000 (23:02 +0000)]
Add some words about /usr/share/i18n and /usr/share/openssl/man.

11 years agoAdd TX power compensation support in TX power calibration.
Sepherosa Ziehau [Thu, 17 Jan 2008 13:33:11 +0000 (13:33 +0000)]
Add TX power compensation support in TX power calibration.
EEPROM layout for TSSI is obtained from Ralink RT61

11 years agoRemove tcsh emacs script which is obsolete due to the latest tcsh import.
Matthias Schmidt [Thu, 17 Jan 2008 12:51:22 +0000 (12:51 +0000)]
Remove tcsh emacs script which is obsolete due to the latest tcsh import.

Reminded-by: swildner@
11 years agoAdd RX sensitivity calibration according to false CCA at relative long distance.
Sepherosa Ziehau [Thu, 17 Jan 2008 08:56:14 +0000 (08:56 +0000)]
Add RX sensitivity calibration according to false CCA at relative long distance.

RX sensitivity adjustment step and two false CCA thresholds are according to
Ralink RT61, though they adjust RX sensitivity in the wrong direction.

# For my EW-7608PG
# without RX sensitivity calibration, false CCA is ~1200
# with RX sensitivity calibration, false CCA is 0 for most of the time

11 years agountabify
Sascha Wildner [Thu, 17 Jan 2008 07:39:00 +0000 (07:39 +0000)]
untabify

11 years ago- Add auto TX power and RX sensitivity calibration support. Add two sysctl
Sepherosa Ziehau [Thu, 17 Jan 2008 07:35:38 +0000 (07:35 +0000)]
- Add auto TX power and RX sensitivity calibration support.  Add two sysctl
  nodes to enable/disable them.  Calibration is only done when NIC operates
  as STA, since it does not make sense when the NIC operates in other mode.
  By default, they are all disabled.
- Add sysctl node for TX power correction.  TX power correction is disabled
  by default.  This could be used when TX power calibration should not be
  performed, e.g. when NIC operates as AP

Enable TX power and RX sensitivity calibration and set TX power correction
to 8 (-4db) makes my EW-7608PG work well @48Mb and @54Mb when it is near AP
(-44dbm ~ -58dbm), @54Mb ~50 retries for ~1080 packets.  Originally the NIC
requires at least one retry for every packets @48Mb.

TX power calibration needs further investigation.  Calibrating TX power
based on RSSI may not work weel; integrate it into TX rate control may work
better.

Various limits and correction values are obtained from Ralink RT61 driver.

# TX power stepping for Auto-AGC capable NICs is not in place yet.
# RX sensitivity calibration for long distance is not in place yet.

11 years agoHAMMER utilities:
Matthew Dillon [Thu, 17 Jan 2008 05:14:49 +0000 (05:14 +0000)]
HAMMER utilities:

* Fix missing releases, fix endless loop in cache flush.