MFC 260796

Fix various places where we don't properly release a lock

PR:		185043
Submitted by:	Michael Bentkofsky


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@261425 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC: 260791

Add a command line argument to turn off blocking waiting for the user
to press Ctrl-C (-b).  This allows tests with tight loops of mcgrabs
that can stress the multicast tables.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@261426 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r256499:

Add support for Mercurial repositories.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@261430 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r260996:
Fix memory and references leak due to unfreed path in case we can't
allocate bus scan CCB.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@261450 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r258779,r258780,r258787,r258822:

Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this
shifts into the sign bit.  Instead use (1U << 31) which gets the
expected result.

Similar to the (1 << 31) case it is not defined to do (2 << 30).

This fix is not ideal as it assumes a 32 bit int, but does fix the issue
for most cases.

A similar change was made in OpenBSD.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@261455 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r261003:
Add new quirk.

PR:		usb/185968


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@261463 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r261004, r261005 and r261033:
Adjust the DMA delay logic so that the DMA delay does not become too small.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@261465 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r261123:
Reduce dmesg verbosity.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@261468 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r261134:
Add more USB quirks.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@261471 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r261224:
Comply to the official LibUSB v1.0 API:
"It is legal to attempt to claim an already-claimed interface."


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@261475 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r261228:
When detaching a [USB] keyboard, keys might still be pressed. Ensure
that all pressed keys are released before completing the USB keyboard
detach. This will prevent so-called "ghost-keys" from appearing after
that the USB device generating the key event(s) has been detached.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@261478 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r260315:
Implement two new libusb API functions.

PR:		usb/185454


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@261482 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r260903:
Add support for GPS ports to UHSO driver.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@261486 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r258787:
	r258780 should not have applied to .S files.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@261490 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r261260, r261262, r261315 and r261343:
Add support for trackpads found in Apple MacBook products. While at it
add some missing devd entries.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@261509 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r261432
 Fix the definition of hg_cmd.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@261532 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r260702 (by melifaro):
  Fix ipfw fwd for IPv4 traffic broken by r249894.

  Problem case:
  Original lookup returns route with GW set, so gw points to
  rte->rt_gateway.
  After that we're changing dst and performing lookup another time.
  Since fwd host is most probably directly reachable, resulting
  rte does not contain rt_gateway, so gw is not set. Finally, we
  end with packet transmitted to proper interface but wrong
  link-layer address.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@261545 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r261080:
The posix_fallocate(2) syscall should return error number on error,
without modifying errno.

MFC r261290:
The posix_madvise(3) and posix_fadvise(2) should return error on
failure, same as posix_fallocate(2).


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@261560 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r261449:
Fix lock acquisition in case no request space available, missed in r260097.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@261571 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r260949:
Make comconsole options set before its activation to be remembered.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@261573 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f