MFC r251600:
  Avoid unnecessary controller reinitialization by checking driver
  running state.  fxp(4) requires controller reinitialization for the
  following cases.
   o RX lockup condition on i82557
   o promiscuous mode change
   o multicast filter change
   o WOL configuration
   o TSO/VLAN hardware tagging/checksum offloading configuration
   o MAC reprogramming after speed/duplex/flow-control resolution
   o Any events that result in MAC reprogramming(link UP/DOWN,
     remote link partner's restart of auto-negotiation etc)
   o Microcode loading/unloading
  Apart from above cases which come from hardware limitation, upper
  stack also blindly reinitializes controller whenever an IP address
  is assigned. After r194573, fxp(4) no longer needs to reinitialize
  the controller to program multicast filter after upping the
  interface. So keeping track of driver running state should remove
  all unnecessary controller reinitializations.

  This change will also address endless controller reinitialization
  triggered by dhclient(8).
MFC r251322:
Instead of yielding, pause for 1 tick when donating the current thread
time to the owner of the vnode lock while iterating over the free vnode
list.
MFC r250013 (by davidxu):
Remove extra code for SA_RESETHAND, it is not needed because kernel has
already done this.

Approved by:	davidxu
MFC r251284:
Unify the code of check_deferred_signal() for all architectures.
MFC r251563:
 Add freebsd-update.conf(5) to OptionalObsoleteFiles.inc

PR:		179437
Approved by:	kib (mentor)
MFC r249205:
Replicate r245306 from SCSI to ATA.  The problem didn't appear so far,
covered by multilevel freeze mechanism, but it is better to be safe.
MFC r250298, r250301:
Fix byte order of ATA WWN when converting it to SCSI LUN ID.
MFC r251654, r251664:
Make CAM return and GEOM DISK pass through new GEOM::lunid attribute.

SPC-4 specification states that serial number may be property of device,
but not a specific logical unit.  People reported about FC storages using
serial number in that way, making it unusable for purposes of LUN multipath
detection.  SPC-4 states that designators associated with logical unit from
the VPD page 83h "Device Identification" should be used for that purpose.
Report first of them in the new attribute in such preference order: NAA,
EUI-64, T10 and SCSI name string.

While there, make GEOM DISK properly report GEOM::ident in XML output also
using d_getattr() method, if available.  This fixes serial numbers reporting
for SCSI disks in `geom disk list` output and confxml.
MFC r251661:
Replicate r242422 from ata(4) to mvs(4):
Only four specific ATA PIO commands transfer several sectors per DRQ block
(interrupt).  All other ATA PIO commands transfer one sector or 512 bytes
at one time.  Hardcode these exceptions in mvs(4).
This fixes timeout of READ LOG EXT command used by `smartctl -x /dev/adaX`.
Also it fixes timeout of DOWNLOAD_MICROCODE on `camcontrol fwdownload`.
MFC r251659:
Use CAM_DIR_NONE for requests without data.
Wrong values there confuse some drivers.
MFC: 248848

Commit a patch that fixes a problem in the #pragma statement when searching
for and loading dependent modules.  This addresses a bug seen with
io.d where it was being doubly included.

PR:		171678
Submitted by:	 Mark Johnston
MFC r242465:
Free the dma map -after- it's checked, not before. Or you'll be
potentially referencing already-freed memory.

MFC r242466:
Drop this from 500 to 128, to save a little space on memory constrained
platforms.

Submitted by:	adrian
Obtained from:	Netflix
MFC r251689

Be more agressive about bootstrapping ctfmerge and ctfconvert so
builds from existing releases have a chance of working properly when
WITH_CLANG_IS_CC is enabled.
MFC r249252:
  Remove reference to the nonexistent sysctl node net.inet6.mld.stats.
  Also add cross reference to the icmp6(4).

  PR:	177696
MFC r236991:

Final whitespace trim.

Submitted by:	imp
Approved by:	marius
Obtained from:	Netflix
MFC r240177:

Dynamically allocate the S/G lists passed to callback routines rather than
allocating them on the stack of various bus_dmamap_load*() functions.  The
S/G lists are stored in the DMA tags.  This matches the implementation on
all other platforms.

Submitted by:	jhb
Approved by:	marius, adrian
Obtained from:	Netflix
MFC r244414:
Properly implement pmap_[get|set]_memattr

MFC r244466:
Create an architecture-agnostic buffer pool manager that uses uma(9) to
manage a set of power-of-2 sized buffers for bus_dmamem_alloc().

MFC r244471:
Busdma enhancements, especially for managing small uncacheable buffers.

MFC r244743:
Use C comments instead of C++ comments.

MFC r244474:
We want to build subr_busdma_bufalloc.c on arm.

Submitted by:	cognet
Approved by:	marius
Obtained from:	Netflix
MFC r244575:
The manpage states that bus_dmamap_create(9) returns ENOMEM if it can't
allocate a map or mapping resources.  That seems to imply that any memory
allocations it does must use M_NOWAIT and check for NULL.

MFC 246158:
Use pmap_kextract() instead of inlining the page table walk.
Remove the comment referencing non-existing code.

Submitted by:	kib, cognet
Approved by:	marius
Obtained from:	Netflix
Big MFC of the physbio changes necessary for unmapped I/O.  These changes
have been in production at Netflix for several months with significant
success.

MFC r246713:

Reform the busdma API so that new types may be added without modifying
every architecture's busdma_machdep.c.  It is done by unifying the
bus_dmamap_load_buffer() routines so that they may be called from MI
code.  The MD busdma is then given a chance to do any final processing
in the complete() callback.

MFC r249538:
Some compilers issue a warning when wider integer is casted to narrow
pointer.  Supposedly shut down the warning by casting through
uintptr_t.

MFC r251479:
Simplify the checking of flags for cam_periph_mapmem().  This gets rid of
a lot of code redundancy and grossness at very minor expense.

MFC r251837:
MFC r251842:
Add infrastructure for doing compatibility shims, as has been sorely
needed for the last 10 years.  Far too much of the internal API is
exposed, and every small adjustment causes applications to stop working.
To kick this off, bump the API version to 0x17 as should have been done
with r246713, but add shims to compensate.  Thanks to the shims, there
should be no visible change in application behavior.

Submitted by:	kib, jeffr
Approved by:	kib
Obtained from:	Netflix
Catch up to the changes from r251874.  This isn't an MFC because the
amd(4) driver no longer exists in FreeBSD 10.

Obtained from:	Netflix