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 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 r249252:
  Remove reference to the nonexistent sysctl node net.inet6.mld.stats.
  Also add cross reference to the icmp6(4).

  PR:	177696
MFC r251187:

Explicitly use a pair of parentheses to ensure correct evaluation
ordering for bitwise operation.

Submitted by:	swildner (DragonFly)
MFC r251349:

Fix a typo: XPORT_SPI should be tested against transport, nor protocol.

Submitted by:	Sascha Wildner <swildner dragonflybsd org>
Reviewed by:	mjacob
MFC r248720:
Remove extra bio_data and bio_length copying to child request after calling
g_clone_bio(), that already copied them.
MFC r251616:
Don't update provider properties and don't set DISKFLAG_OPEN if d_open()
disk method call returned error.  GEOM considers devices in such case as
still closed, and won't call symmetric d_close() for them.
MFC r251485:

Revert r238399.

The "failok" option doesn't have any effect at all unless specified in
fstab(5) and combined with the -a flag. The "failok" option is already
documented in fstab(5).

PR:		177630
MFC: r249406

- Do not bail out if stat(2) fails with ENOENT in the spool directory. This
  happens if another atrm process removes a job while we're scanning through
  the directory.
- While at it, optimize a bit the directory scanning, so that we quit
  looping as soon as all jobs specified in argv have been dealt with.

Approved by:	cognet
MFC 250333: Don't pad disk partition sizes with leading zeros.
MFC 251637:
Borrow the algorithm from kvm_getprocs() to fix procstat(1) to handle the
case where the process tables grows in between the calls to fetch the size
and fetch the table.

Note that this is not a true MFC as the libprocstat library doesn't exist
in 8.x and the relevant code is in the procstat binary instead.
MFS9->8 r249822:
Update error messages when processing the INDEX file to display the given
path rather than a static string. This makes the error messages consistent
with the rest of the functions which already do the same thing (assumed to
be an oversight of r47055, 13+ years ago). A direct commit to stable/9.

This is a direct commit to stable/8.

Reviewed by:	eadler
share/mk: merge: r241298,243393,249057,251506 from head for bmake support.
	  merge: r252048 from stable/9

Makefile: merge: r252048 from stable/9 for bmake support.

Reviewed by: obrien
MFC r251723:
The functions are called pci_{msi,msix}_count(), not pci_count_{msi,msix}().
MFC r251166:
Add macros which allow one to define SDT probes with six or seven arguments;
they are needed when porting some of the Solaris providers (ip, iscsi, and
tcp in particular).

dtrace_probe() only takes five arguments from the probe site, so we need to
add the appropriate cast to allow for more than five arguments. The extra
arguments are later copied out of dtrace_probe()'s stack frame by
dtrace_getarg() (or the provider-specific getarg method) as needed.
MFC r246951:
Mark the coretemp(4) sysctls as MPSAFE, ensuring that Giant won't be held
unnecessarily by a user thread waiting to run on a specific CPU after
calling sched_bind().
MFC r250599:
Add a remark to the effect that a manually started relearn will always
result in the battery being completely drained, even in transparent learning
mode.
MFi386: revision 245847

  Add special loader environment variables 'comconsole_port' and
  'comconsole_pcidev'.
MFi386: revision 251332

  Use slightly more idiomatic expression to get the address of array.