MFC r275162:
Init array field in the proper place.

Obtained from:	OpenBSD


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@275348 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r275003:
Add missing headers needed by write().


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@275350 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r274918:
Don't use the synchronization endpoint unless referenced by the
isochronous endpoint descriptor used for the data transfers, hence the
synchronization feature might not be supposed to be supported [yet].
This makes seamless playback synced with the USB HOST clock work with
the DN32-USB module for Midas audio systems and possibly other similar
products from Klark Teknik.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@275351 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r264321, r264342, r264351, r264356, r273850, r274629:

Currently, the TCP slow timer can starve TCP input processing while it
walks the list of connections in TIME_WAIT closing expired connections
due to contention on the global TCP pcbinfo lock.

To remediate, introduce a new global lock to protect the list of
connections in TIME_WAIT.  Only acquire the TCP pcbinfo lock when
closing an expired connection.  This limits the window of time when
TCP input processing is stopped to the amount of time needed to close
a single connection.

Approved by:    jhb (mentor)


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@275402 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r273856,273863,273963-273965

- Add two new functions to the AGP driver KPI to bind/unbind arbitrary sets
  of pages into the GTT.
- Avoid possible overflow in agp_generic_alloc_memory.
- In agp(4) avoid the need to flush all cpu caches with wbinvd between
  updating the GTT and flushing the AGP TLB by storing the GTT in
  write-combining memory.
- In agp_amd_bind_page don't flush the AGP TLB.  It's done by the calling
  function.
- agp_generic_unbind_memory: flush AGP TLB before unwiring pages
  agp_bind_pages: assert that pages have been wired down


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@275406 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r273862,273902:

Port the TTM AGP backend to the FreeBSD agp driver and enable AGP support
in the radeonkms driver.

Note: In PCI mode virtual addresses on the graphics card that map to system
RAM are translated to physical addresses by the graphics card itself.   In
AGP mode address translation is done by the AGP chipset so fictitious
addresses appear on the system bus.  For the CPU cache management to work
correctly when the CPU accesses this memory it needs to use the same
fictitious addresses (and let the chipset translate them) instead of using
the physical addresses directly.

Reviewed by:	kib


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

Use default memory type for TTM buffer objects that may be cached.


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

drm: fix usage of vm_phys_fictitious_to_vm_page

vm_phys_fictitious_to_vm_page should not be called directly, even when
operating on a range that has been registered using
vm_phys_fictitious_reg_range. PHYS_TO_VM_PAGE should be used instead
because on arches that use VM_PHYSSEG_DENSE the page might come
directly from vm_page_array.

Reported by:	nwhitehorn
Tested by:	nwhitehorn, David Mackay <davidm.jx8p@gmail.com>
Sponsored by:	Citrix Systems R&D


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

Add a guard against attempting to invoke the buildenv target with -j# as
that silently exits rather than doing something useful.

Sponsored by:	DARPA, AFRL


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

Merge from CheriBSD (3422ebe71b6c06fe78b1be73623b240c219e08e3):

Rename beripic to beripic0.

Sponsored by:	DARPA, AFRL


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

Merge from CheriBSD (2e28d2a3090239b30481f35dc452ad95a5c57389):

Remove initalized, but unused devname variable

Sponsored by:	DARPA, AFRL


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

Merge from CheriBSD:

commit d0c7d235c09fc65dbdb278e7016a96f79c6a49cc
  Make the Altera JTAG UART device driver slightly more forgiving of
  the foibles of a sub-par hrdware interface by increasing the timeout
  for spotting JTAG polling from one to two seconds.

commit 19ed45a18832560dab967c179d83b71081c3a220
  Update comment.

commit 8edfe803f033cc8e33229f99894c2b7496a44d5f
  Add a comment about a device-driver race condition that could cause the BERI
  pipeline to wedge awaiting JTAG in the event that both the low-level console
  and the tty layer decide to write to the JTAG FIFO just before JTAG is
  disconnected.  Resolving this race is a bit tricky as it looks like there
  isn't a way to 'give the character back' to the tty layer when we discover
  the race.  The easy fix is to drop the character, which we don't yet do, but
  perhaps should as that is a better outcome than wedging the pipeline.

commit 2ea26cf579c9defcf31e413e7c9b0fbc159237fc
  Add a comment about an inherent race with hardware in the Altera JTAG
  UART's low-level console code.

Submitted by:	rwatson
Sponsored by:	DARPA, AFRL


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@275429 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r275101:
Add bunch of PCI IDs of Intel Wildcat Point (9 Series) chipsets.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@275439 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r275123: Fix incorrect check, blocking MULTIID functionality.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@275443 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r275124:  Fix WWNN/WWPN generation for virtual channels.


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

Fix typo.

Sponsored by:	The FreeBSD Foundation


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@275445 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r275328 and r275330:
Add missing libraries when linking and fix building of some infiniband
utilities by updating some header file locations and compiler include
directives.

Sponsored by:	Mellanox Technologies


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

PR:		195372


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@275450 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r275120:
Fix SA_SIGINFO | SA_RESETHAND handling, reset disposition after sv_sendsig()
is called.


git-svn-id: svn+ssh://svn.freebsd.org/base/stable/10@275456 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFC r273488:
Fix some bugs in the error handling of getdevice().

PR:	194506


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