]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
13 years agosh: Add test for shell script without '#!'.
Jilles Tjoelker [Wed, 2 Feb 2011 22:03:18 +0000 (22:03 +0000)]
sh: Add test for shell script without '#!'.

13 years agosh: Remove comment mentioning herefd, which is gone.
Jilles Tjoelker [Wed, 2 Feb 2011 21:48:53 +0000 (21:48 +0000)]
sh: Remove comment mentioning herefd, which is gone.

13 years agoAdd some obsolete manpages.
Ulrich Spörlein [Wed, 2 Feb 2011 21:09:30 +0000 (21:09 +0000)]
Add some obsolete manpages.

13 years agoAdd missing argument after r218192.
Bjoern A. Zeeb [Wed, 2 Feb 2011 20:00:35 +0000 (20:00 +0000)]
Add missing argument after r218192.

13 years agolibkvm: fix logic inversion introduced with last commit
Ulrich Spörlein [Wed, 2 Feb 2011 17:01:26 +0000 (17:01 +0000)]
libkvm: fix logic inversion introduced with last commit

Reported by: Brandon Gooch <jamesbrandongooch@gmail.com>
Pointy hat to: uqs

13 years agoPut the general logic for being a CPU hog into a new function
Matthew D Fleming [Wed, 2 Feb 2011 16:35:10 +0000 (16:35 +0000)]
Put the general logic for being a CPU hog into a new function
should_yield().  Use this in various places.  Encapsulate the common
case of check-and-yield into a new function maybe_yield().

Change several checks for a magic number of iterations to use
should_yield() instead.

MFC after: 1 week

13 years ago- Rename proto_descriptor_{send,recv}() functions to
Pawel Jakub Dawidek [Wed, 2 Feb 2011 15:53:09 +0000 (15:53 +0000)]
- Rename proto_descriptor_{send,recv}() functions to
  proto_connection_{send,recv} and change them to return proto_conn
  structure. We don't operate directly on descriptors, but on
  proto_conns.
- Add wrap method to wrap descriptor with proto_conn.
- Remove methods to send and receive descriptors and implement this
  functionality as additional argument to send and receive methods.

MFC after: 1 week

13 years agoAdd proto_connect_wait() to wait for connection to finish.
Pawel Jakub Dawidek [Wed, 2 Feb 2011 15:46:28 +0000 (15:46 +0000)]
Add proto_connect_wait() to wait for connection to finish.
If timeout argument to proto_connect() is -1, then the caller needs to use
this new function to wait for connection.

This change is in preparation for capsicum, where sandboxed worker wants
to ask main process to connect in worker's behalf and pass descriptor
to the worker. Because we don't want the main process to wait for the
connection, it will start async connection and pass descriptor to the
worker who will be responsible for waiting for the connection to finish.

MFC after: 1 week

13 years agoAllow to specify connection timeout by the caller.
Pawel Jakub Dawidek [Wed, 2 Feb 2011 15:42:00 +0000 (15:42 +0000)]
Allow to specify connection timeout by the caller.

MFC after: 1 week

13 years agoMove protocol allocation and deallocation to separate functions.
Pawel Jakub Dawidek [Wed, 2 Feb 2011 15:23:07 +0000 (15:23 +0000)]
Move protocol allocation and deallocation to separate functions.

MFC after: 1 week

13 years agoFix build with DIAGNOSTIC enabled.
John Baldwin [Wed, 2 Feb 2011 14:59:05 +0000 (14:59 +0000)]
Fix build with DIAGNOSTIC enabled.

Pointy hat to: jhb

13 years agoRemove OpenSolaris include path referring to a non-existing directory
Sergey Kandaurov [Wed, 2 Feb 2011 14:41:32 +0000 (14:41 +0000)]
Remove OpenSolaris include path referring to a non-existing directory
never committed from p4 dtrace branch.
[The correct include path is referenced from every opensolaris compat
consumer's module Makefile, so it doesn't serve any purpose anyway.]

Reported by: arundel on freebsd-hackers@ via clang
Approved by: kib (mentor)
MFC after: 1 week

13 years ago1) Allow a chunk to track the cwnd it was at when sent.
Randall Stewart [Wed, 2 Feb 2011 11:13:23 +0000 (11:13 +0000)]
1) Allow a chunk to track the cwnd it was at when sent.
2) Add separate max-bursts for retransmit and hb. These
   are set to sysctlable values but not settable via the
   socket api. This makes sure we don't blast out HB's or
   fast-retransmits.
3) Determine on the first data transmission on a net if
   its local-lan (by being under or over a RTT). This
   can later be used to think about different algorithms
   based on locallan vs big-i (experimental)
4) The cwnd should NOT be allowed to grow when an ECNEcho
   is seen (TCP has this same bug). We fix this in SCTP
   so an ECNe being seen prevents an advance of cwnd.
5) CWR's should not be sent multiple times to the
   same network, instead just updating the TSN being
   transmitted if needed.

MFC after: 1 Month

13 years agoBe prepared that hp_client or hp_server might be NULL now.
Pawel Jakub Dawidek [Wed, 2 Feb 2011 08:24:26 +0000 (08:24 +0000)]
Be prepared that hp_client or hp_server might be NULL now.

MFC after: 1 week

13 years agoRename INTR_VEC to MAP_IRQ. From the OFW or FDT we obtain a
Marcel Moolenaar [Wed, 2 Feb 2011 05:58:51 +0000 (05:58 +0000)]
Rename INTR_VEC to MAP_IRQ. From the OFW or FDT we obtain a
PIC handle with interrupt pin. This we map to the resource
called SYS_RES_IRQ.

13 years agoCall the correct ANI Attach routine.
Adrian Chadd [Wed, 2 Feb 2011 03:55:34 +0000 (03:55 +0000)]
Call the correct ANI Attach routine.

13 years agoMake the generated files depend on the Makefile so new platforms are easier
Warner Losh [Wed, 2 Feb 2011 03:27:31 +0000 (03:27 +0000)]
Make the generated files depend on the Makefile so new platforms are easier
to add than mipsn32 was when I was working on it...

13 years agoRevert last change now that the reason for it is no more...
Warner Losh [Wed, 2 Feb 2011 03:24:52 +0000 (03:24 +0000)]
Revert last change now that the reason for it is no more...
MACHINE_ARCH is now always mipsel when building mips/mips.

13 years agoRecommit r218169, enclosing with #ifdef _KERNEL
Martin Matuska [Tue, 1 Feb 2011 23:12:13 +0000 (23:12 +0000)]
Recommit r218169, enclosing with #ifdef _KERNEL
This change is sufficient for the ZFS kernel module.

Discussed with: pjd
MFC after: 1 week

13 years agoWhitespace nit
Warner Losh [Tue, 1 Feb 2011 22:50:23 +0000 (22:50 +0000)]
Whitespace nit

13 years agoNew ID for the Novatel MC547
Nick Hibma [Tue, 1 Feb 2011 22:26:06 +0000 (22:26 +0000)]
New ID for the Novatel MC547

PR: 154127
Submitted by: Mike Tancsa
MFC after: 1 day

13 years agoRevert r218169 until it can be tested and fixed properly.
Alexander Kabaev [Tue, 1 Feb 2011 21:15:35 +0000 (21:15 +0000)]
Revert r218169 until it can be tested and fixed properly.

13 years agoSome cosmetic fixes and remove a duplicate constant.
John Baldwin [Tue, 1 Feb 2011 18:30:52 +0000 (18:30 +0000)]
Some cosmetic fixes and remove a duplicate constant.

Submitted by: Pedro F. Giffuni  giffunip at yahoo

13 years ago- Set the next_alloc fields for an i-node after allocating a new block
John Baldwin [Tue, 1 Feb 2011 18:21:45 +0000 (18:21 +0000)]
- Set the next_alloc fields for an i-node after allocating a new block
  so that future allocations start with most recently allocated block
  rather than the beginning of the filesystem.
- Fix ext2_alloccg() to properly scan for 8 block chunks that are not
  aligned on 8-bit boundaries.  Previously this was causing new blocks
  to be allocated in a highly fragmented fashion (block 0 of a file at
  lbn N, block 1 at lbn N + 8, block 2 at lbn N + 16, etc.).
- Cosmetic tweaks to the currently-disabled fancy realloc sysctls.

PR: kern/153584
Discussed with: bde
Tested by: Pedro F. Giffuni  giffunip at yahoo, Zheng Liu (lz)

13 years agoOutput an appropriate amount of padding to line up per-CPU state columns
John Baldwin [Tue, 1 Feb 2011 15:48:27 +0000 (15:48 +0000)]
Output an appropriate amount of padding to line up per-CPU state columns
rather than using a terminal sequence to move the cursor when drawing the
initial screen.

Requested by: arundel
MFC after: 3 days

13 years agoJust to be sure, make sure the MCS rates are allowed for TX.
Adrian Chadd [Tue, 1 Feb 2011 15:26:30 +0000 (15:26 +0000)]
Just to be sure, make sure the MCS rates are allowed for TX.

Approved by: rpaulo@

13 years agoFor ZFS, change the type of clock_t to int64_t.
Martin Matuska [Tue, 1 Feb 2011 14:28:50 +0000 (14:28 +0000)]
For ZFS, change the type of clock_t to int64_t.

The clock_t type in OpenSolaris is long (int64_t on amd64).
On FreeBSD clock_t is int32_t. The clock_t type is used in several places
in the ZFS code to store system uptime in milliseconds ("seconds * hz").

With hz=1000 we have a 32-bit integer overflow in 24 days, 20 hours,
31 minutes and 23.648 seconds. This has a user reported negative impact
on l2arc_feed_thread() and may cause unexpected results from other functions
using clock_t.

Reported by: Artem Belevich <fbsdlist@src.cx> on freebsd-fs@
MFC after: 1 week

13 years agoThe unp_gc() function drops and reaquires lock between scan and
Konstantin Belousov [Tue, 1 Feb 2011 13:33:49 +0000 (13:33 +0000)]
The unp_gc() function drops and reaquires lock between scan and
collect phases.  The unp_discard() function executes
unp_externalize_fp(), which might make the socket eligible for gc-ing,
and then, later, taskqueue will close the socket.  Since unp_gc()
dropped the list lock to do the malloc, close might happen after the
mark step but before the collection step, causing collection to not
find the socket and miss one array element.

I believe that the race was there before r216158, but the stated
revision made the window much wider by postponing the close to
taskqueue sometimes.

Only process as much array elements as we find the sockets during
second phase of gc [1].  Take linkage lock and recheck the eligibility
of the socket for gc, as well as call fhold() under the linkage lock.

Reported and tested by: jmallett
Submitted by:   jmallett [1]
Reviewed by: rwatson, jeff (possibly)
MFC after: 1 week

13 years agoAlgorithm modules can define their own private congestion signal types in the
Lawrence Stewart [Tue, 1 Feb 2011 13:32:27 +0000 (13:32 +0000)]
Algorithm modules can define their own private congestion signal types in the
top 8 bits of the 32 bit signal bit field space for internal use. These private
signals should not be leaked outside of a module.

Given that many algorithm modules use the NewReno hook functions to simplify
their implementation, the obvious place such a leak would show up is in the
NewReno cong_signal hook function.

- Show the full number of significant bits in the signal type definitions in
  <netinet/cc.h>.

- Add a bitmask to simplify figuring out if a given signal is in the private or
  public bit range.

- Add a sanity check in newreno_cong_signal() to ensure private signals are not
  being leaked into the hook function.

Sponsored by: FreeBSD Foundation
Discussed with: David Hayes <dahayes at swin edu au>
MFC after: 1 week
X-MFC with: r215166

13 years agoReintroduce bugfix from r210103 and fix xz on strong-aligned architectures.
Martin Matuska [Tue, 1 Feb 2011 10:28:05 +0000 (10:28 +0000)]
Reintroduce bugfix from r210103 and fix xz on strong-aligned architectures.
This fix was accidentially reverted with the 5.0.0 update in r215187.

PR: bin/154310
Submitted by: Michael Moll <kvedulv@kvedulv.de>
MFC after: 3 days

13 years agoUse correct kernel types for all fields in USB PF code and headers.
Hans Petter Selasky [Tue, 1 Feb 2011 10:25:48 +0000 (10:25 +0000)]
Use correct kernel types for all fields in USB PF code and headers.

Approved by: thompsa (mentor)

13 years agoAdd a new method to the rate control modules which extract out the
Adrian Chadd [Tue, 1 Feb 2011 08:10:18 +0000 (08:10 +0000)]
Add a new method to the rate control modules which extract out the
three other rates and try counts.

The 11n rate scenario path wants to take a list of rate and tries,
rather than calling setupxtxdesc().

13 years agoInclude some preliminary TX HT rate scenario setup code.
Adrian Chadd [Tue, 1 Feb 2011 08:03:01 +0000 (08:03 +0000)]
Include some preliminary TX HT rate scenario setup code.

The AR5416 and later TX descriptors have new fields for supporting
11n bits (eg 20/40mhz mode, short/long GI) and enabling/disabling
RTS/CTS protection per rate.

These functions will be responsible for initialising the TX descriptors
for the AR5416 and later chips for both HT and legacy frames.

Beacon frames will remain using the non-11n TX descriptor setup for now;
Linux ath9k does much the same.

Note that these functions aren't yet used anywhere; a few more framework
changes are needed before all of the right rate information is available
for TX.

13 years agoDo not set socket send and receive buffer. It will be auto-tuned.
Pawel Jakub Dawidek [Tue, 1 Feb 2011 07:58:43 +0000 (07:58 +0000)]
Do not set socket send and receive buffer. It will be auto-tuned.

Confirmed by: rwatson
MFC after: 1 week

13 years agoRefator the common code which calculates the 802.11g protection duration.
Adrian Chadd [Tue, 1 Feb 2011 07:50:26 +0000 (07:50 +0000)]
Refator the common code which calculates the 802.11g protection duration.

13 years agoFix typo in comment: "course" -> "coarse"
Lawrence Stewart [Tue, 1 Feb 2011 07:10:13 +0000 (07:10 +0000)]
Fix typo in comment: "course" -> "coarse"

Sponsored by: FreeBSD Foundation
Submitted by: jmallett
MFC after: 3 months
X-MFC with: r218152

13 years agoImport an implementation of the CAIA-Hamilton-Delay (CHD) congestion control
Lawrence Stewart [Tue, 1 Feb 2011 07:05:14 +0000 (07:05 +0000)]
Import an implementation of the CAIA-Hamilton-Delay (CHD) congestion control
algorithm described in the paper "Improved coexistence and loss tolerance for
delay based TCP congestion control" by Hayes and Armitage. It is implemented as
a kernel module compatible with the recently committed modular congestion
control framework.

CHD enhances the approach taken by the Hamilton-Delay (HD) algorithm to provide
tolerance to non-congestion related packet loss and improvements to coexistence
with loss-based congestion control algorithms. A key idea in improving
coexistence with loss-based congestion control algorithms is the use of a shadow
window, which attempts to track how NewReno's congestion window (cwnd) would
evolve. At the next packet loss congestion event, CHD uses the shadow window to
correct cwnd in a way that reduces the amount of unfairness CHD experiences when
competing with loss-based algorithms.

In collaboration with: David Hayes <dahayes at swin edu au> and
Grenville Armitage <garmitage at swin edu au>
Sponsored by: FreeBSD Foundation
Reviewed by: bz and others along the way
MFC after: 3 months

13 years ago* Add a rather hacky "does this speak the 11n TX descriptor format"
Adrian Chadd [Tue, 1 Feb 2011 06:59:44 +0000 (06:59 +0000)]
* Add a rather hacky "does this speak the 11n TX descriptor format"
  function; which will be later used by the TX path to determine
  whether to use the extended features or not.

* Break out the descriptor chaining logic into a separate function;
  again so it can be switched out later on for the 11n version when
  needed.

* Refactor out the encryption-swizzling code that's common in the
  raw and normal TX path.

13 years agoImport a clean-room implementation of the Hamilton-Delay (HD) congestion control
Lawrence Stewart [Tue, 1 Feb 2011 06:42:46 +0000 (06:42 +0000)]
Import a clean-room implementation of the Hamilton-Delay (HD) congestion control
algorithm based on the paper "A strategy for fair coexistence of loss and
delay-based congestion control algorithms" by Budzisz, Stanojevic, Shorten and
Baker. It is implemented as a kernel module compatible with the recently
committed modular congestion control framework.

HD uses a probabilistic approach to reacting to delay-based congestion. The
probability of reducing cwnd is zero when the queuing delay is very small,
increasing to a maximum at a set threshold, then back down to zero again when
the queuing delay is high. Normal operation keeps the queuing delay below the
set threshold. However, since loss-based congestion control algorithms push the
queuing delay high when probing for bandwidth, having the probability of
reducing cwnd drop back to zero for high delays allows HD to compete with
loss-based algorithms.

In collaboration with: David Hayes <dahayes at swin edu au> and
Grenville Armitage <garmitage at swin edu au>
Sponsored by: FreeBSD Foundation
Reviewed by: bz and others along the way
MFC after: 3 months

13 years agoImport a clean-room implementation of the VEGAS congestion control algorithm
Lawrence Stewart [Tue, 1 Feb 2011 06:17:00 +0000 (06:17 +0000)]
Import a clean-room implementation of the VEGAS congestion control algorithm
based on the paper "TCP Vegas: end to end congestion avoidance on a global
internet" by Brakmo and Peterson. It is implemented as a kernel module
compatible with the recently committed modular congestion control framework.

VEGAS uses network delay as a congestion indicator and unlike regular loss-based
algorithms, attempts to keep the network operating with stable queuing delays
and no congestion losses. By keeping network buffers used along the path within
a set range, queuing delays are kept low while maintaining high throughput.

In collaboration with: David Hayes <dahayes at swin edu au> and
Grenville Armitage <garmitage at swin edu au>
Sponsored by: FreeBSD Foundation
Reviewed by: bz and others along the way
MFC after: 3 months

13 years agoAdd TX/RX chainmask info to if_ath - this is needed for the 11n TX rate series.
Adrian Chadd [Tue, 1 Feb 2011 04:39:15 +0000 (04:39 +0000)]
Add TX/RX chainmask info to if_ath - this is needed for the 11n TX rate series.

13 years agoAdd a new capability which reports the number of spatial streams a device supports.
Adrian Chadd [Tue, 1 Feb 2011 03:51:35 +0000 (03:51 +0000)]
Add a new capability which reports the number of spatial streams a device supports.

The higher levels (net80211, if_ath, ath_rate) need this to make correct
choices about what MCS capabilities to advertise and what MCS rates are
able to be TXed.

In summary:

* AR5416 - 2/3 antennas, 2x2 streams
* AR9160 - 2/3 antennas, 2x2 streams
* AR9220 - 2 antennas, 2x2 sstraems
* AR9280 - 2 antennas, 2x2 streams
* AR9285 - 2 antennas but with antenna diversity, 1x1 stream

13 years agoSupport for the new Patsburg PCH chipset:
Jack F Vogel [Tue, 1 Feb 2011 01:05:11 +0000 (01:05 +0000)]
Support for the new Patsburg PCH chipset:
     - SMBus Controller
     - SATA Controller
     - HD Audio Controller
     - Watchdog Controller

Thanks to Seth Heasley (seth.heasley@intel.com) for providing us code.

MFC after 3 days

13 years agoFix build on ia64.
Pawel Jakub Dawidek [Mon, 31 Jan 2011 23:46:36 +0000 (23:46 +0000)]
Fix build on ia64.

I found no way how to use CMSG_NXTHDR() macro on ia64 without alignment
warnings.

MFC after: 1 week

13 years agoUntil I fix the build on ia64 comment out problematic lines.
Pawel Jakub Dawidek [Mon, 31 Jan 2011 23:08:26 +0000 (23:08 +0000)]
Until I fix the build on ia64 comment out problematic lines.
Those lines are part of the (for now) unused functions.

13 years agoRemove the now unneeded XXX.
Adrian Chadd [Mon, 31 Jan 2011 22:45:14 +0000 (22:45 +0000)]
Remove the now unneeded XXX.

13 years agoEnable AMPDU reorder processing and receiving BAR frames when doing 802.11n.
Adrian Chadd [Mon, 31 Jan 2011 22:44:28 +0000 (22:44 +0000)]
Enable AMPDU reorder processing and receiving BAR frames when doing 802.11n.

Obtained from: rpaulo@

13 years agoLet rpcbind clean up after itself
Doug Barton [Mon, 31 Jan 2011 21:03:08 +0000 (21:03 +0000)]
Let rpcbind clean up after itself

13 years agoalc_rev was used without initialization such that it failed to
Pyun YongHyeon [Mon, 31 Jan 2011 20:00:43 +0000 (20:00 +0000)]
alc_rev was used without initialization such that it failed to
apply AR8152 v1.0 specific initialization code. Fix this bug by
explicitly reading PCI device revision id via PCI accessor.

Reported by: Gabriel Linder ( linder.gabriel <> gmail dot com )

13 years agoSupport for the new DH89xxCC PCH chipset including:
Jack F Vogel [Mon, 31 Jan 2011 18:41:52 +0000 (18:41 +0000)]
Support for the new DH89xxCC PCH chipset including:
      - SATA controller
      - Watchdog timer
      - SMBus controller

13 years agoImplement two new functions for sending descriptor and receving descriptor
Pawel Jakub Dawidek [Mon, 31 Jan 2011 18:35:17 +0000 (18:35 +0000)]
Implement two new functions for sending descriptor and receving descriptor
over UNIX domain sockets and socket pairs.
This is in preparation for capsicum.

MFC after: 1 week

13 years ago- Use pjdlog for assertions and aborts as this will log assert/abort message
Pawel Jakub Dawidek [Mon, 31 Jan 2011 18:32:17 +0000 (18:32 +0000)]
- Use pjdlog for assertions and aborts as this will log assert/abort message
  to syslog if we run in background.
- Asserts in proto.c that method we want to call is implemented and remove
  dummy methods from protocols implementation that are only there to abort
  the program with nice message.

MFC after: 1 week

13 years agoRename pjdlog_verify() to pjdlog_abort() as it better describes what the
Pawel Jakub Dawidek [Mon, 31 Jan 2011 15:52:00 +0000 (15:52 +0000)]
Rename pjdlog_verify() to pjdlog_abort() as it better describes what the
the function does and mark it with __dead2.

MFC after: 1 week

13 years agoDon't incorrectly set the burst duration setting in the TX descriptor.
Adrian Chadd [Mon, 31 Jan 2011 15:42:42 +0000 (15:42 +0000)]
Don't incorrectly set the burst duration setting in the TX descriptor.

After inspecting the ath9k source, it seems the AR5416 and later MACs
don't take an explicit RTS/CTS duration. A per-scenario (ie, what multi-
rate retry became) rts/cts control flag and packet duration is provided;
the hardware then apparently fills in whatever details are required.
The per-rate sp/lpack duration calculation just isn't used anywhere
in the ath9k TX packet length calculations.

The burst duration register controls something different; it seems to
be involved with RTS/CTS protection of 11n aggregate frames and is set
via a call to ar5416Set11nBurstDuration().

I've done some light testing with rts/cts protected frames and nothing
seems to break; but this may break said RTS/CTS and CTS-to-self protection.

13 years agoMove the architecture guessing from Makefile.inc1 to Makefile. We
Warner Losh [Mon, 31 Jan 2011 15:17:47 +0000 (15:17 +0000)]
Move the architecture guessing from Makefile.inc1 to Makefile.  We
need to do this because variables specified on the command line
override those specified in the Makefile.  This is why we also moved
from TARGET to _TARGET in Makefile, and then set TARGET on the command
line when we fork a submake with Makefile.inc1.

This makes mips/mips work again, even without the workaround committed to
lib/libc/Makefile.

13 years agoMore ECN fixes:
Randall Stewart [Mon, 31 Jan 2011 11:50:11 +0000 (11:50 +0000)]
More ECN fixes:
1) We now remove ECN-Nonce since it will no longer continue as a I-D
2) Eliminate last_tsn_echo, this tied us to an assoc not the net
   and thus we were not doing m-homing on the ECN-Echo senders side right.
3) Increment the count going out even if the TSN in lower in the pending
   ECN-Echo, this way the receiver knows exactly how many packets were
   marked even with network re-ordering
4) Fix so we DO NOT stop doing delayed sack if a ECN Echo is in queue
MFC after: 1 month

13 years agoUse correct alphabetical order for xz(1) in SEE ALSO section
Martin Matuska [Mon, 31 Jan 2011 11:30:26 +0000 (11:30 +0000)]
Use correct alphabetical order for xz(1) in SEE ALSO section
of newsyslog manpages.

Reported by: maxim
MFC after: 3 weeks

13 years agoAdd xz(1) support to newsyslog.
Martin Matuska [Mon, 31 Jan 2011 10:57:54 +0000 (10:57 +0000)]
Add xz(1) support to newsyslog.
Rewrite and simplify logfile compression code.

Approved by: gad
MFC after: 3 weeks

13 years agoMFV of tzdata2011a, r218120
Edwin Groothuis [Mon, 31 Jan 2011 09:22:49 +0000 (09:22 +0000)]
MFV of tzdata2011a, r218120

- Cleanup rules for Australia/South_Australia (nothing changed)
- Add historical information for Honolulu.

13 years agoVendor import of tzdata2011a:
Edwin Groothuis [Mon, 31 Jan 2011 09:17:30 +0000 (09:17 +0000)]
Vendor import of tzdata2011a:

- Cleanup rules for Australia/South_Australia (nothing changed)
- Add historical information for Honolulu.

Obtained from:  ftp://elsie.nci.nih.gov/pub/

13 years agoo Add user 'hast'.
Maxim Konovalov [Mon, 31 Jan 2011 07:47:28 +0000 (07:47 +0000)]
o Add user 'hast'.

13 years agoYet another unimplemented futex operation, print out about.
Dmitry Chagin [Mon, 31 Jan 2011 06:06:23 +0000 (06:06 +0000)]
Yet another unimplemented futex operation, print out about.

Submitted by: arundel
MFC after: 1 month.

13 years agoImplement a futex BITSET op.
Dmitry Chagin [Mon, 31 Jan 2011 05:59:05 +0000 (05:59 +0000)]
Implement a futex BITSET op.

Submitted by: arundel
MFC after: 1 month.

13 years agoUpdate interface stats counters to match the current format in linux and
Bjoern A. Zeeb [Mon, 31 Jan 2011 00:09:52 +0000 (00:09 +0000)]
Update interface stats counters to match the current format in linux and
try to export as much information as we can match.

Requested on: Debian GNU/kFreeBSD list (debian-bsd lists.debian.org) 2010-12
Tested by: Mats Erik Andersson (mats.andersson gisladisker.se)
MFC after: 10 days

13 years agoRelease the free page queues lock earlier in vm_page_alloc().
Alan Cox [Sun, 30 Jan 2011 23:55:48 +0000 (23:55 +0000)]
Release the free page queues lock earlier in vm_page_alloc().

Discussed with: kib@

13 years agosh: Send messages about signals to stderr.
Jilles Tjoelker [Sun, 30 Jan 2011 22:57:52 +0000 (22:57 +0000)]
sh: Send messages about signals to stderr.

This is required by POSIX and seems to make more sense.

See also r217557.

13 years agoRegen for r218101.
Dmitry Chagin [Sun, 30 Jan 2011 20:38:26 +0000 (20:38 +0000)]
Regen for r218101.

MFC after: 1 Month.

13 years agoChange linux futex syscall definition to match actual linux one.
Dmitry Chagin [Sun, 30 Jan 2011 20:31:43 +0000 (20:31 +0000)]
Change linux futex syscall definition to match actual linux one.

MFC after: 1 Month.

13 years agoThe kern_wait() code already removes the SIGCHLD signal for the waited
Dmitry Chagin [Sun, 30 Jan 2011 18:17:38 +0000 (18:17 +0000)]
The kern_wait() code already removes the SIGCHLD signal for the waited
process. Removing other SIGCHLD signals is not needed and may cause
problems.

Pointed out by: jilles

MFC after: 1 Month.

13 years agoFix grammar in comment.
Konstantin Belousov [Sun, 30 Jan 2011 16:21:25 +0000 (16:21 +0000)]
Fix grammar in comment.

Pointy hat to: kib
MFC after: 1 week

13 years agoMake ldd(1) work when versioned dependency file is cannot be loaded.
Konstantin Belousov [Sun, 30 Jan 2011 16:14:09 +0000 (16:14 +0000)]
Make ldd(1) work when versioned dependency file is cannot be loaded.
Instead of aborting in locate_dependency(), propagate the error to
caller. The rtld startup function does the right thing with an error
from rtld_verify_versions(), depending on the mode of operation.

Reported by: maho
In collaboration with: kan
MFC after: 1 week

13 years agoFix the 'scan hang' issue.
Bernhard Schmidt [Sun, 30 Jan 2011 14:22:45 +0000 (14:22 +0000)]
Fix the 'scan hang' issue.

When requesting a scan and one is already in progess, e.g. while in scan
state, we happily wait for a scan done notification. Though, this
notification might never be sent, e.g. if we are trying to find a network
to associate to and there is none. Instead of always waiting for a
notification just do so if a new scan has been started. For both cases the
scan cache is used to report available networks even if the content might
not be fresh.

MFC after: 1 month

13 years agoInstead of always returning 0 to a scan request, indicate if there is
Bernhard Schmidt [Sun, 30 Jan 2011 14:05:21 +0000 (14:05 +0000)]
Instead of always returning 0 to a scan request, indicate if there is
one running already.

MFC after: 1 month

13 years agoChange return code semantics of start_scan_locked(). Instead of reporting
Bernhard Schmidt [Sun, 30 Jan 2011 14:00:50 +0000 (14:00 +0000)]
Change return code semantics of start_scan_locked(). Instead of reporting
if a scan is running, report if a scan has been started. The return value
itself is not (yet) used anywhere in the tree and it is also not exported
to userspace.

MFC after: 1 month

13 years agoWhen doing a scan while being associated it is possible that the scan
Bernhard Schmidt [Sun, 30 Jan 2011 13:17:45 +0000 (13:17 +0000)]
When doing a scan while being associated it is possible that the scan
is deferred for the time it takes to flush the TX queue. This work being
done the scan then is continued, but only if it is marked to do so. As
the 'ifconfig scan' request is meant to be used after the interface is
brought up, request a background scan by default. This behaviour is
already documented in manual page.

This fixes on possible case where 'ifconfig scan' hangs infinitely.

MFC after: 1 month

13 years agosyscons: install all available kbdmaps
Ulrich Spörlein [Sun, 30 Jan 2011 12:57:10 +0000 (12:57 +0000)]
syscons: install all available kbdmaps

eee_nordic.kbd, us.dvorakl.kbd, and us.dvorakr.kbd were not installed.

Found by: Neil Short <neshort@yahoo.com>
MFC after: 3 weeks

13 years agoAdd support for the m25p64; lifted straight from Linux.
Adrian Chadd [Sun, 30 Jan 2011 12:14:06 +0000 (12:14 +0000)]
Add support for the m25p64; lifted straight from Linux.

This flash chip is found on the Ubiquiti LS-SR71 board.
I've successfully tested reading; I've not tried writing to it yet.

13 years agoHonor the IEEE80211_SCAN_BGSCAN flag, which makes it possible to actually
Bernhard Schmidt [Sun, 30 Jan 2011 11:23:59 +0000 (11:23 +0000)]
Honor the IEEE80211_SCAN_BGSCAN flag, which makes it possible to actually
request a background scan using IEEE80211_IOC_SCAN_BGSCAN.

MFC after: 1 month

13 years agoFix boot on SMP systems after r218075 by delaying CPU binding until a
Nathan Whitehorn [Sat, 29 Jan 2011 23:26:28 +0000 (23:26 +0000)]
Fix boot on SMP systems after r218075 by delaying CPU binding until a
SYSINIT.

Reviewed by: marcel

13 years agoRemove duplicate printing of TF_NOPUSH in db_print_tflags().
Bjoern A. Zeeb [Sat, 29 Jan 2011 22:11:13 +0000 (22:11 +0000)]
Remove duplicate printing of TF_NOPUSH in db_print_tflags().

MFC after: 10 days

13 years agoDon't operate on the parent of the PCI node. It's the PCI node itself
Marcel Moolenaar [Sat, 29 Jan 2011 21:14:29 +0000 (21:14 +0000)]
Don't operate on the parent of the PCI node. It's the PCI node itself
that represents the host controller. This makes the FDT PCI support
working an a bare-bones manner. This needs a lot more work, of which
the beginning are at the end of the file, compiled-out with #if 0.

The intend being that both the Marvell PCIE and Freescale PCI/PCIX/PCIE
duplicate the same platform-independent domain initialization, that
should be moved into an unified implementation in the FDT code. Handling
of resources requires help from the platform. A unified implementation
allows us to properly support PCI devices listed in the device tree and
configured according to the device tree specification.

Sponsored by: Juniper Networks

13 years agoCall newbus_device_create() for PCI devices. Call pci_from_fdt_node()
Marcel Moolenaar [Sat, 29 Jan 2011 21:08:03 +0000 (21:08 +0000)]
Call newbus_device_create() for PCI devices. Call pci_from_fdt_node()
for the newly created device_t, rather than the parent.

13 years agoFix the interrupt code, broken 7 months ago. The interrupt framework
Marcel Moolenaar [Sat, 29 Jan 2011 20:58:38 +0000 (20:58 +0000)]
Fix the interrupt code, broken 7 months ago. The interrupt framework
already supported nested PICs, but was limited to having a nested
AT-PIC only. With G5 support the need for nested OpenPIC controllers
needed to be added. This was done the wrong way and broke the MPC8555
eval system in the process.

OFW, as well as FDT, describe the interrupt routing in terms of a
controller and an interrupt pin on it. This needs to be mapped to a
flat and global resource: the IRQ. The IRQ is the same as the PCI
intline and as such needs to be representable in 8 bits. Secondly,
ISA support pretty much dictates that IRQ 0-15 should be reserved
for ISA interrupts, because of the internal workins of south bridges.
Both were broken.

This change reverts revision 209298 for a big part and re-implements
it simpler. In particular:
o   The id() method of the PIC I/F is removed again. It's not needed.
o   The openpic_attach() function has been changed to take the OFW
    or FDT phandle of the controller as a second argument. All bus
    attachments that previously used openpic_attach() as the attach
    method of the device I/F now implement as bus-specific method
    and pass the phandle_t to the renamed openpic_attach().
o   Change powerpc_register_pic() to take a few more arguments. In
    particular:
    -   Pass the number of IPIs specificly. The number of IRQs carved
out for a PIC is the sum of the number of int. pins and IPIs.
    -   Pass a flag indicating whether the PIC is an AT-PIC or not.
This tells the interrupt framework whether to assign IRQ 0-15
or some other range.
o   Until we implement proper multi-pass bus enumeration, we have to
    handle the case where we need to map from PIC+pin to IRQ *before*
    the PIC gets registered. This is done in a similar way as before,
    but rather than carving out 256 IRQs per PIC, we carve out 128
    IRQs (124 pins + 4 IPIs). This is supposed to handle the G5 case,
    but should really be fixed properly using multiple passes.
o   Have the interrupt framework set root_pic in most cases and not
    put that burden in PIC drivers (for the most part).
o   Remove powerpc_ign_lookup() and replace it with powerpc_get_irq().
    Remove IGN_SHIFT, INTR_INTLINE and INTR_IGN.

Related to the above, fix the Freescale PCI controller driver, broken
by the FDT code. Besides not attaching properly, bus numbers were
assigned improperly and enumeration was broken in general. This
prevented the AT PIC from being discovered and interrupt routing to
work properly. Consequently, the ata(4) controller stopped functioning.

Fix the driver, and FDT PCI support, enough to get the MPC8555CDS
going again. The FDT PCI code needs a whole lot more work.

No breakages are expected, but lackiong G5 hardware, it's possible
that there are unpleasant side-effects. At least MPC85xx support is
back to where it was 7 months ago -- it's amazing how badly support
can be broken in just 7 months...

Sponsored by: Juniper Networks

13 years agoHave nexus behave the same as the one on ARM (marvell SoCs), so as to
Marcel Moolenaar [Sat, 29 Jan 2011 20:28:17 +0000 (20:28 +0000)]
Have nexus behave the same as the one on ARM (marvell SoCs), so as to
prevent warnings during boot WRT to the fdtbus attachment.

13 years agoIntroduce macro FDT_MAP_IRQ to map from an interrupt controller and
Marcel Moolenaar [Sat, 29 Jan 2011 20:25:20 +0000 (20:25 +0000)]
Introduce macro FDT_MAP_IRQ to map from an interrupt controller and
interrupt pin pair to a global IRQ number. When multiple PICs exist
on a board, the interrupt pin alone is not unique.

13 years agoFixes to ECN in SCTP.
Randall Stewart [Sat, 29 Jan 2011 19:55:29 +0000 (19:55 +0000)]
Fixes to ECN in SCTP.
1) ECN was on an association basis, this is incorrect and
   will not work with CMT or for that matter if the user
   is sending to multiple addresses. This commit makes
   ECN on a per path basis.
2) Adopt the new format for the ECN internet draft. This also
   maintains compatability with old format chunks as well.
3) Keep track of the real time of a RTT down to micro seconds.
   For some future conditional features (for like a data center
   this is good information to have).
MFC after: 1 month

13 years agoReenable the call to vm_map_simplify_entry() from vm_map_insert() for non-
Alan Cox [Sat, 29 Jan 2011 15:23:02 +0000 (15:23 +0000)]
Reenable the call to vm_map_simplify_entry() from vm_map_insert() for non-
MAP_STACK_* entries.  (See r71983 and r74235.)

In some cases, performing this call to vm_map_simplify_entry() halves the
number of vm map entries used by the Sun JDK.

13 years agoAvoid writing CCA threshold values for the EXT radios for non-HT40 channels.
Adrian Chadd [Sat, 29 Jan 2011 14:36:31 +0000 (14:36 +0000)]
Avoid writing CCA threshold values for the EXT radios for non-HT40 channels.

13 years agoBring over some NF calibration changes from ath9k.
Adrian Chadd [Sat, 29 Jan 2011 14:27:20 +0000 (14:27 +0000)]
Bring over some NF calibration changes from ath9k.

Each different radio chipset has a different "good" range of CCA
(clear channel access) parameters where, if you write something
out of range, it's possible the radio will go deaf.

Also, since apparently occasionally reading the NF calibration
returns "wrong" values, so enforce those limits on what is being
written into the CCA register.

Write a default value if there's no history available.

This isn't the case right now but it may be later on when "off-channel"
scanning occurs without init'ing or changing the NF history buffer.
(As each channel may have a different noise floor; so scanning or
other off-channel activity shouldn't affect the NF history of
the current channel.)

13 years agoFix some errors introduced w/ the last commit; fix setting RTS/CTS in the 11n rate...
Adrian Chadd [Sat, 29 Jan 2011 12:30:13 +0000 (12:30 +0000)]
Fix some errors introduced w/ the last commit; fix setting RTS/CTS in the 11n rate scenario.

* I messed up a couple of things in if_athvar.h; so fix that.
* Undo some guesswork done in ar5416Set11nRateScenario() and introduce a
  flags parameter which lets the caller set a few things. To begin with,
  this includes whether to do RTS or CTS protection.
* If both RTS and CTS is set, only do RTS. Both RTS and CTS shouldn't be
  set on a frame.

13 years agoLink in the 11n specific TX methods into the HAL.
Adrian Chadd [Sat, 29 Jan 2011 12:16:26 +0000 (12:16 +0000)]
Link in the 11n specific TX methods into the HAL.

13 years agoMigrate the TX path code out of if_ath and into a separate source file.
Adrian Chadd [Sat, 29 Jan 2011 11:35:23 +0000 (11:35 +0000)]
Migrate the TX path code out of if_ath and into a separate source file.

There's two reasons for this:

* the raw and non-raw TX path shares a lot of duplicate code which should be
  refactored;
* the 11n-ready chip TX path needs a little reworking.

13 years agoRewrite the ARCH check another way for backward compatibility.
Jayachandran C. [Sat, 29 Jan 2011 10:32:00 +0000 (10:32 +0000)]
Rewrite the ARCH check another way for backward compatibility.

Compilation fails now, if TARGET_ARCH=mips instead of mipsel/mipseb.

13 years agoAdd a check for the AR9285E; I have no idea what this is.
Adrian Chadd [Sat, 29 Jan 2011 08:52:06 +0000 (08:52 +0000)]
Add a check for the AR9285E; I have no idea what this is.

The only other changes in ath9k for the AR9285E revolve around sleep modes
which are not fully implemented here yet.

13 years agoMy style(9) bug.
Dmitry Chagin [Sat, 29 Jan 2011 07:22:33 +0000 (07:22 +0000)]
My style(9) bug.

Pointed out by: kib

MFC after: 1 Month.

13 years agoBreak out the debug macros from if_ath.c into if_ath_debug.[ch] .
Adrian Chadd [Sat, 29 Jan 2011 05:08:21 +0000 (05:08 +0000)]
Break out the debug macros from if_ath.c into if_ath_debug.[ch] .

This is prep work for breaking out the TX path into a separate
set of source files.

13 years agoKeep this in sync with the ar5212 power rate table size.
Adrian Chadd [Sat, 29 Jan 2011 04:34:30 +0000 (04:34 +0000)]
Keep this in sync with the ar5212 power rate table size.
This doesn't yet know about the 802.11n radios or rates.

13 years agoFix bug in the netfront driver that caused excessive packet drops during
Justin T. Gibbs [Sat, 29 Jan 2011 02:36:45 +0000 (02:36 +0000)]
Fix bug in the netfront driver that caused excessive packet drops during
receive processing.

Remove unnecessary restrictions on the mbuf chain length built during an
LRO receive.  This restriction was copied from the Linux netfront driver
where the LRO implementation cannot handle more than 18 discontinuities.
The FreeBSD implementation has no such restriction.

MFC after: 1 week

13 years agoUse bus space functions rather than inw/outw
Andrew Turner [Sat, 29 Jan 2011 00:53:58 +0000 (00:53 +0000)]
Use bus space functions rather than inw/outw
to help a future port of the driver to ARM.

Approved by: imp (mentor)

13 years agoMove the load address of the kernel to the start of KVA as the
Andrew Turner [Sat, 29 Jan 2011 00:46:11 +0000 (00:46 +0000)]
Move the load address of the kernel to the start of KVA as the
s3c24x0 copy of initarm expects the kernel to be loaded there.

Approved by: imp (mentor)