CFG_ERR, DATA_UNDERRUN and DELIM_UNDERRUN are all flags, rather than
part of ts_status. Thus:

* make sure we decode them from ts_flags, rather than ts_status;
* make sure we decode them regardless of whether there's an error or not.

This correctly exposes descriptor configuration errors, TX delimiter
underruns and TX data underruns.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247025 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Post interrupts in the ath alq trace.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247026 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
oops, tab!


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247027 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Enable TX FIFO underrun interrupts.  This allows the TX FIFO threshold
adjustment code to now run.

Tested:

* AR5416, STA

TODO:

* Much more thorough testing on the other chips, AR5210 -> AR9287


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247028 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
A couple of quick tidyups:

* Delete this debugging print - I used it when debugging the initial
  TX descriptor chaining code.  It now works, so let's toss it.
  It just confuses people if they enable TX descriptor debugging as they
  get two slightly different versions of the same descriptor.

* Indenting.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247029 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
If any of the TX queues have underrun reporting enabled, enable
HAL_INT_TXURN in the interrupt mask register.

This should now allow for TXURN interrupts to be posted.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247030 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Configure larger TX FIFO default and maximum level values.

This has reduced the number of TX delimiter and data underruns when
doing large UDP transfers (>100mbit).

This stops any HAL_INT_TXURN interrupts from occuring, which is a good
sign!

Obtained from:	Qualcomm Atheros


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247033 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Check if the -sec option is given without an argument.

PR:		bin/170413
Submitted by:	Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>
MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247034 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Reduce excessive nesting.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247035 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add interface name filtering via 'match' cmd.
Add 'pps' cmd for switching beetween interface packets/bytes statistics.

Submitted by:	vsevolod
MFC after:	2 weeks


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247036 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix several new & old style issues.

Pointed by:	ae, pluknet, zont
MFC with:	r247036


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247037 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add a -D flag that causes duplicate entries in an mtree manifest to be
treated as warnings rather than errors.

Reviewed by:	marcel
Sponsored by:	DARPA, AFRL


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247041 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix the -N option in manifest mode by using pwcache(3).  This also
speeds up image creation appreciably.

Reviewed by:	marcel
Sponsored by:	DARPA, AFRL


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247042 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Allow '.' components in manifest paths.  They are always the first
component of mtree -C and install -M output and are easily skipped.

Reviewed by:	marcel
Sponsored by:	DARPA, AFRL


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247043 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
ip_savecontrol() style fixes. No functional changes.
- fix indentation
- put the operator at the end of the line for long statements
- remove spaces between the type and the variable in a cast
- remove excessive parentheses

Tested by:	md5


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247044 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix "fdt addr" to accept literal addresses rather than va offsets.
When initializing the fdt, query U-Boot as well.

With this change, it is now feasible to have U-Boot load
the FDT, ubldr will pull it from U-Boot and hand it to the
kernel.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247045 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Initialize vm_max_kernel_address on non-FDT platforms.  (This should have
been included in r246926.)

The second parameter to pmap_bootstrap() is redundant.  Eliminate it.

Reviewed by:	andrew


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247046 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Convert machine/elf.h, machine/frame.h, machine/sigframe.h,
machine/signal.h and machine/ucontext.h into common x86 includes,
copying from amd64 and merging with i386.

Kernel-only compat definitions are kept in the i386/include/sigframe.h
and i386/include/signal.h, to reduce amd64 kernel namespace pollution.
The amd64 compat uses its own definitions so far.

The _MACHINE_ELF_WANT_32BIT definition is to allow the
sys/boot/userboot/userboot/elf32_freebsd.c to use i386 ELF definitions
on the amd64 compile host.  The same hack could be usefully abused by
other code too.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247047 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Orphaned processes that are being traced are killed by the
kernel.  Properly restore, continue, and detach from processes
being DTraced when DTrace exits with an error so the program
being inspected is not terminated.

cddl/contrib/opensolaris/cmd/dtrace/dtrace.c:
	In fatal(), the generic error handler, close the DTrace
	handle as is done in the "probe/script" error handler
	dfatal().  fatal() can be invoked after DTrace attaches
	to processes (e.g. a script specified by command line
	argument can't be found) and closing the handle will
	release them.

Submitted by:	Spectra Logic Corporation
Reviewed by:	rpaulo, gnn


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247048 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Avoid panic when tearing down the DTrace pid provider for a
process that has crashed.

sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c:
	In fasttrap_pid_disable(), we cannot PHOLD the proc
	structure for a process that no longer exists, but
	we still have other, fasttrap specific, state that
	must be cleaned up for probes that existed in the
	dead process.  Instead of returning early if the
	process related to our probes isn't found,
	conditionalize the locking and carry on with a NULL
	proc pointer.  The rest of the fasttrap code already
	understands that a NULL proc is possible and does
	the right things in this case.

Sponsored by:	Spectra Logic Corporation
Reviewed by:	rpaulo, gnn
MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247049 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f