Add a tunable for spa_slop_shift which controls how much space we
would reserve by default.  Tuning is not recommended.

MFC after:	2 weeks
Convert the refire_notify_ack timer from timeout(9) to callout(9).

Tested by:	no one
Add locking to mcd(4) and mark MPSAFE.
- Actually use existing per-softc mutex.
- Use mutex in cdev routines and remove D_NEEDGIANT.
- Use callout(9) instead of timeout(9).
- Don't check for impossible conditions (e.g. MCDINIT being clear).
- Remove critical_enter/exit when sending a PIO command.
- Use bus_*() instead of bus_space_*().

Tested by:	no one
Add locking to mly(4) and mark MPSAFE.
- Add a per-softc mutex.
- Use mutex as CAM sim lock.
- Use taskqueue_thread instead of taskqueue_swi_giant.
- Use callout(9) instead of timeout(9).
- Use bus_*() instead of bus_space_*().

Tested by:	no one
Cleanups to pst(4):
- Use callout(9) instead of timeout(9).
- Don't bother zero'ing the softc.
- Destroy mutex on detach.

Tested by:	no one
Add locking to scd(4) and mark MPSAFE.
- Actually use existing per-softc mutex.
- Use mutex in cdev routines and remove D_NEEDGIANT.
- Use callout(9) instead of timeout(9).
- Don't check for impossible conditions (e.g. SCDINIT being clear).
- Use bus_*() instead of bus_space_*().

Tested by:	no one
Add locking to wds(4) and mark MPSAFE.
- Add per-softc mutex.
- Use mutex for CAM SIM lock.
- Use bus_*() instead of inb() and outb().
- Use bus_alloc_resource_any() when reasonable.

Tested by:	no one
Make vfs.zfs.max_recordsize read-write at runtime.

MFC after:	2 weeks
Add Trendnet TEW-646UBH.

Submitted by:	bolshakov_1 at yahoo dot com
Fix the following -Werror warning from clang 3.5.0, while building cddl/lib/libctf:

In file included from cddl/contrib/opensolaris/common/ctf/ctf_create.c:31:
In file included from sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h:34:
sys/cddl/contrib/opensolaris/uts/common/sys/isa_defs.h:334:9: warning: '_ILP32' macro redefined [-Wmacro-redefined]
#define _ILP32
        ^
<built-in>:26:9: note: previous definition is here
#define _ILP32 1
        ^
1 warning generated.

This is because clang 3.5.0 started predefining _ILP32 and __ILP32__ for
the i386 arch.  (Earlier versions already predefined _LP64 and __LP64__
for the x86_64 arch.)

Reviewed by:	emaste, avg, smh, delphij, markj
Differential Revision: https://reviews.freebsd.org/D1187
Fix the following -Werror warning from clang 3.5.0, while building
lib/libngatm:

sys/contrib/ngatm/netnatm/saal/saal_sscop.c:4030:32: error: 'break' is bound to current loop, GCC binds it to the enclosing loop [-Werror,-Wgcc-compat]
                } while(sn < sscop->vr_h && !QFIND(&sscop->rbuf, sn));
                                             ^
sys/contrib/ngatm/netnatm/saal/saal_sscop.c:173:4: note: expanded from macro 'QFIND'
                        break;                                          \
                        ^
1 error generated.

The idea is to remove any ambiguity by replacing the macro with an
equivalent static inline function.

Reviewed by:	emaste, rpaulo
See also:	http://reviews.llvm.org/D2518
Differential Revision: https://reviews.freebsd.org/D1188
Fix typo.

MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Revert r274635 as it's completely wrong.
The parent of a pci dev device is a pciX device which do not
implement the PCIB_POWER_FOR_SLEEP method from pcib_if.m.
Fix build without INVARIANTS, broken by r274675.
pf(4) needs to have a correct checksum during its processing.
Calculate checksums for the IPv6 path when needed before
delving into pf(4) code as required.

PR:     172648, 179392
Reviewed by:    glebius@
Approved by:    gnn@
Obtained from:  pfSense
MFC after:      1 week
Sponsored by:   Netgate
Expose groups by default in ifconfig output. This was never hidden by
OpenBSD; unsure why we chose to do so. As groups are a requirement for
pf, exposing them by default will make our pf implementation less
confusing.

While here add a missing free() that OpenBSD fixed 7 years ago.

PR:		194925
Differential Revision:	https://reviews.freebsd.org/D1185
Approved by:	des
Obtained from:	OpenBSD
Stop using early_putc immediately after configuring console with cninit()

Early UART should be released right after system console initialization is
completed. Otherwise, after cninit() both early and system console coexist
what may lead to various issues (i.a. writing to unmapped early
UART address). This cannot be done in cninit_finish() since it can be
called late at the end of MI configuration.

Obtained from:   Semihalf
Reviewed by:     andrew
Sponsored by:    The FreeBSD Foundation
Do not allocate zero-length mbuf in sosend_generic().

Found by:	pho
Sponsored by:	Nginx, Inc.
Add BERI-specific virtio mmio "platform" device.
This device provides a connector to Altera PIO allowing us
to interrupt software-implemented virtio mmio backend.

Sponsored by:	DARPA, AFRL
In vnode_pager_generic_getpages() vp->v_mount is dereferenced in the
beginning, thus can't be NULL.

Sponsored by:	Nginx, Inc.