MFstable10 r259151:
  Add WITH_DVD to RELEASE_RMAKEFLAGS, otherwise it is not actually
  passed to 'make release'.

Approved by:	re (glebius)
Sponsored by:	The FreeBSD Foundation
Merge r259172 from stable/10 (head r257754 by adrian):

  Don't return ENOBUFS if the transmit path handles the frame but queues
  it (eg in power save.)

PR:		kern/183727
Approved by:	re (glebius)
Merge r259173 from stable/10 (head r258758 by adrian):

  Make sure any waiters on the scan results get notified if the scan task
  decides to do nothing.

  If this isn't done, then a scan request whilst a scan occurs in an
  active channel set or a completed channel set will hang.

Approved by:	re (glebius)
Merge r259174 from stable/10 (head r256294 by adrian):

  Fix the "am I a net80211 vap" check for bpf listeners.

  I changed it to use if_transmit a while ago but apparently with monitor
  mode the if_transmit method is overridden.

  This is (mostly) a workaround until a more permanent solution can be
  found.

Submitted by:	Patrick Kelsey <kelsey@ieee.org>
Approved by:	re (glebius)
Merge r259175 from stable/10 (head r257065 by adrian):

    Fix a use-after-free node reference issue when waiting for a return
    from a management frame transmission.

Approved by:	re (glebius)
Merge r259214 from stable/10 (head r259100):

Pull in r196658 from upstream clang trunk:

  CodeGen: Don't emit linkage on thunks that aren't emitted because they're
  vararg.

  This can happen when we're trying to emit a thunk with available_externally
  linkage with optimization enabled but bail because it doesn't make sense for
  vararg functions.

  [LLVM] PR18098.

This should fix clang "Broken module found, compilation aborted" errors when
building the qt4-based dvbcut port.

Reported by:	se
Approved by:	re (glebius)
Merge r259216 from stable/10 (head r259111):

Use correct casts in gcc's emmintrin.h for the first arguments of the
following builtin functions:

* __builtin_ia32_pslldi128() takes __v4si instead of __v8hi
* __builtin_ia32_psllqi128() takes __v2di instead of __v8hi
* __builtin_ia32_psradi128() takes __v4si instead of __v8hi

This should fix the following errors when building the LINT kernel with
gcc:

sys/crypto/aesni/aesni_wrap.c:191: error: incompatible type for argument 1 of
'__builtin_ia32_psradi128'
sys/crypto/aesni/aesni_wrap.c:195: error: incompatible type for argument 1 of
'__builtin_ia32_pslldi128'

Approved by:	re (glebius)
MFC r258871:

Properly report an error instead of panicing when user tries to create
LUN backed by non-disk device, e.g. /dev/null.

Approved by:	re (glebius)
Sponsored by:	The FreeBSD Foundation
MFC r259182:

Fix handling for empty auth-groups.  Without it, ctld child process
would either exit on assertion, or, if assertions are not enabled,
fail to authenticate the target.

Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation
MFC r259183:

Properly refuse handoff requests on already connected sessions.  Previously
this would result in dropping the session.

Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation
MFC r259234:

drm/radeon: agp_info->ai_aperture_size is in bytes, not Mbytes

This fixes radeon_agp_init() and gtt_size is now correct. However, this
is not enough to make Radeon AGP cards work: ttm_agp_backend.c isn't
implemented yet.

Submitted by:	tijl@
Approved by:	re (gjb)
MFC r259236:

drm/radeon: radeon_dp_i2c_aux_ch() must return 0 on FreeBSD

The code was unmodified compared to Linux and returned the amount of
received bytes from the i2c bus. This led to non-working i2c bus and
failure to eg. read monitor's EDID, if connected to DisplayPort.

Tested by:	Mikaël Urankar <mikael.urankar@gmail.com>
Approved by:	re (gjb)
MFC r259237:

drm: Read PCIER_LINK_CAP/PCIER_LINK_CAP2 from the PCI bridge

Before this fix, capabilities were read from vgapci and were incorrect.

Approved by:	re (gjb)
MFC r259003:
Initialize modesetting sysctls in radeonkms.

Approved by:	re (gjb)
MFC r259113, r259115, r259144, r259148:

r259113 (dteske):
  Fix failed attempt to send pkg(8) stderr to /dev/null

r259115 (dteske):
  Prevent truncating /tmp/bsdinstall_log each time we
  exec a module.

r259144 (dteske):
  Fix a regression after successfully installing to encrypted
  ZFS root, the passphrase is not accepted and a message about
  "incorrect key" is displayed.

r259148 (dteske):
  Fix a regression resulting in mountroot prompt after attempting
  to install to encrypted ZFS root (caused by a typo in a
  variable name -- ZFSBOOT_BOOT_FSNAME -> ZFSBOOT_BOOTFS_NAME).

Approved by:	re (glebius)
Sponsored by:	The FreeBSD Foundation
MFC r256430, r259400:

r256430:
  Reduce disc1.iso image size by installing the userland with
  the WITHOUT_PROFILE=1 option set, trimming 56MB from the image.

r259400:
  Reduce disc1.iso size by 74MB by removing lib32 libraries, sendmail,
  and atf.

Approved by:	re (glebius)
Sponsored by:	The FreeBSD Foundation
Update releng/10.0 to -RC2 as part of the 10.0-RELEASE cycle.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
MFStable-10 r259301

  MFC r256657,r257018,r257347,r257423,r257729,r257767,
      r257933,r258609,r258614,r258668,r258673,r258855

  Pull in some minor bugfixes and functionality enhancements
  from CURRENT. These are candidates to be moved to 10.0-release.

  r258855
  mdoc: quote string properly.

  r258673
  Don't create an initial value for the host filesystem of "/".

  r258668
  Allow bhyve and bhyveload to attach to tty devices.

  r258614
  The 22-bit Data Byte Count (DBC) field of a Physical Region Descriptor was
  being read as a 32-bit quantity by the bhyve AHCI driver.

  r258609
  Fix discrepancy between the IOAPIC ID advertised by firmware tables and the
  actual value read by the guest.

  r257933
  Route the legacy timer interrupt (IRQ0) to pin 2 of the IOAPIC.

  r257767
  Fix an off-by-one error when iterating over the emulated PCI BARs.

  r257729
  Add the VM name to the process name with setproctitle().

  r257423
  Make the virtual ioapic available unconditionally in a bhyve virtual machine.

  r257347
  Update copyright to include the author of the LPC bridge emulation code.

  hand-merge r257018
  Tidy usage messages for bhyve and bhyveload.

  r256657
  Add an option to bhyveload(8) that allows setting a loader environment variable
  from the command line.

Approved by:	re@ (gjb)
MF10 259465:
Add new sysctl, kern.supported_archs, containing the list of FreeBSD
MACHINE_ARCH values whose binaries this kernel can run. This patch provides
a feature requested for implementing pkgng ABI identifiers in a robust
way.

The list is designed to indicate whether, say, an i386 package can be run on
the current system. If kern.supported_abis contains "i386", then the answer
is yes. Otherwise, the answer is no.

At the moment, this only supports MACHINE_ARCH and MACHINE_ARCH32. As we
gain support for more interesting combinations, this needs to become more
flexible, possibily through the sysent framework, along with the
hw.machine_arch emulation immediately preceding this code in kern_mib.c.

Reviewed by:	imp
Approved by:	re (glebius)
MFC r259426, r259427:

r259426:
  Add a pkg(8) repository configuration file for cdrom-based package
  installation.

  As part of the 'pkg-stage' target, copy the configuration file
  to the 'packages/repos/' directory on the DVD filesystem.

r259427:
  Export 'REPOS_DIR' when the selected source medium for package
  installation is cdrom.  This enables bsdconfig(8) to make use
  of the on-disc pkg(8) repository configuration, which fixes
  package selection and installation from the dvd installer.

Approved by:	re (delphij, glebius)
Sponsored by:	The FreeBSD Foundation