Fix playback for Focusrite Scarlett 2i2 USB recording interface.

Submitted by:	Ed Maste, emaste @


git-svn-id: svn://svn.freebsd.org/base/head@249830 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove unused variable.

MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@249837 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge updated "no such identity file" patch.

PR:		bin/178060


git-svn-id: svn://svn.freebsd.org/base/head@249839 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Base the calculation of maxmbufmem in part on kmem_map size
instead of kernel_map size to prevent kernel memory exhaustion
by mbufs and a subsequent panic on physical page allocation
failure.

On architectures without a direct map all mbuf memory (except
for jumbo mbufs larger than PAGE_SIZE) comes from kmem_map.
It is the limiting factor hence.

For architectures with a direct map using the size of kmem_map
is a good proxy of available kernel memory as well.  If it is
much smaller the mbuf limit may be sub-optimal but remains
reasonable, while avoiding panics under exhaustion.

The overall mbuf memory limit calculation may be reconsidered
again later, however due to the many different mbuf sizes and
different backing KVM maps it is a tricky subject.

Found by:	pho's new network stress test
Pointed out by:	alc (kmem_map instead of kernel_map)
Tested by:	pho


git-svn-id: svn://svn.freebsd.org/base/head@249843 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix the USB audio feedback endpoint algorithm. There should not
be any need to bias the returned value.

Reported by:	Craig Leres <leres@ee.lbl.gov>


git-svn-id: svn://svn.freebsd.org/base/head@249844 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix for duplicate sample rate detection after recent patches.


git-svn-id: svn://svn.freebsd.org/base/head@249845 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
When rebooting (exiting) from the BTX loader, make sure to restore the
GDT from the correct segment, otherwise a triple fault would be caused.
In some virtual environments (VMware, VirtualBox, etc) this could lead
to a unhandled error or hang in the guest emulation software.

Thanks to avg and jhb for a few hints in the right direction.

Noticed by:	Jeremy Chadwick <jdc@koitsu.org> (and many others)
MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@249846 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix N32/N64 ABIs to use proper registers after recent changes.

Pointy Hat to: imp


git-svn-id: svn://svn.freebsd.org/base/head@249847 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
This fixes the issue with the "randomly changing" default
route. What it was is there are two places in ip_output.c
where we do a goto again. One place was fine, it
copies out the new address and then resets dst = ro->rt_dst;
But the other place does *not* do that, which means earlier
when we found the gateway, we have dst pointing there
aka dst = ro->rt_gateway is done.. then we do a
goto again.. bam now we clobber the default route.

The fix is just to move the again so we are always
doing dst = &ro->rt_dst; in the again loop.

PR:	 174749,157796
MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@249848 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Move hptmv and mpt drivers shutdown a bit later to the SHUTDOWN_PRI_LAST
stage of shutdown_post_sync.  That should allow CAM to do final cache flush
at the SHUTDOWN_PRI_DEFAULT without using polling magic.

MFC after:	3 days


git-svn-id: svn://svn.freebsd.org/base/head@249849 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFV r249857:

Merge vendor bugfix for a possible deadlock related to async destroy
and improve write performance by introducing a new lock protecting
tx_open_txg.

Illumos ZFS issues:
  3642 dsl_scan_active() should not issue I/O to determine if async
       destroying is active
  3643 txg_delay should not hold the tc_lock

MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@249858 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
getdtablesize(2): Describe what this function actually does.

getdtablesize() returns the limit on new file descriptors; this says nothing
about existing descriptors.

MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@249859 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix the Dvorak Programmer Keymap

PR:		conf/177572
Submitted by:	Sean DuBois <sean@siobud.com>


git-svn-id: svn://svn.freebsd.org/base/head@249860 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add myself to the committers list.


git-svn-id: svn://svn.freebsd.org/base/head@249862 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add myself as a src committer

Approved by:	ken (mentor)


git-svn-id: svn://svn.freebsd.org/base/head@249863 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Introduce kernel coredumps to ppc32 AIM.  Leeched from the booke code.

MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@249864 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge remote-tracking branch 'upstream/master'