Some more registers access optimizations:
 - Process ATIO queue only if interrupt status tells so;
 - Do not update queue out pointers after each processed command, do it
only once at the end of the loop.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257930 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Use relaxed (write-only) memory barriers when writing some of queue index
registers (for now on ISP2400+).  We never read those registers back and
AFAIK their semantics does not require any immediate reaction on write.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257932 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
x86 platforms that use an IOAPIC route the legacy timer interrupt (IRQ0) to
pin 2 of the IOAPIC.

Add an 'Interrupt Source Override' entry to the MADT to describe this
and start asserting interrupts on pin 2 in the 8254 device model.

Submitted by:	Tycho Nightingale (tycho.nightingale@pluribusnetworks.com)


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257933 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Update svn from 1.8.1 to 1.8.4 - minor security fixes and client side
merge handling bug fixes (reintegrate, mergeinfo etc)


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257936 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Unbreak the installer on head/:

  When bsdinstall(8) sources the bsdconfig(8) common.subr file,
  PKG_ABI is set by calling 'pkg -vv' and searching for the ABI
  pkg(8) will use.

  When pkg(8) is run for the first time, the bootstrap process
  is run, which prompts for 'y/N' input from stdin if running with
  TERM set.

  Since TERM is set and it is the first time pkg(8) is run, which
  happens automatically, bsdinstall(8) hangs waiting for user input
  which is never displayed since a specific line is expected by
  awk(1), and stdin is expected by pkg(8).

  Set ASSUME_ALWAYS_YES=1, which will cause pkg(8) to assume the
  '-y' flag is also used for the bootstrap process, allowing
  bsdinstall(8) to proceed to the keymap lookup, otherwise
  bsdinstall(8) appears to hang after selecting 'Install' from the
  menu on first boot from CDROM.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257937 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove the env(1) but keep the var.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257938 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Check the partition scheme before blowing away disks, instead of after.
The effects of this patch would only be noticeable if you were purposefully
setting a bad value and trying to see what happens; and leaving the disks
intact if a bad value has been set seems fair.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257939 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Silence bmake(1) errors if TEST_DIRS evaluation is empty.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257940 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add the necessary bits for dumps on ppc64.

MFC after:	2 weeks


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257941 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix a few style nits.

MFC after:	3 days
X-MFC-After:	10.0-RELEASE
Sponsored by:	The FreeBSD Foundation


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257942 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove never used ioctls that originate from KAME. The proof
of their zero usage was exp-run from misc/183538.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257943 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Do not use just freed memory.

Sponsored by:	Nginx, Inc.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257945 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Introduce seperate mutex lock to protect protect CTL I/O pools, slightly
reducing global CTL lock scope and congestion.

While there, simplify CTL I/O pools KPI, hiding implementation details.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257946 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Send EAPOL frames at the management rate, not the data rate.

Without this, a far away station with low signal strength would
associate using the management rate (by default the lowest rate)
and then the EAPOL frames would go out at the current AMRR best
guess.  This would result in association failing authentication.

Tested:

* Intel 5100, STA
* Intel 2230, STA


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257947 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Use IWN_NBANDS rather than a hard-coded limit.

Tested:

* Intel 5100, STA


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257948 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix off-by-one. Sorry!


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257949 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Replace the hard-coded RX queue value check with IWN_UNSOLICITED_RX_NOTIF.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257950 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
If A-MPDU transmission fails entirely, then no BA is received from the
NIC and pushed up to the driver.  Unfortunately this means there's
no rate control notification done.  Thus, if the rate control code
makes a decision that hits a crappy rate that can't succeed, the
rate code would never lower the rate and packet loss would continue.

So, fake some rate control notification in this case.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257951 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFV r257952:

Upgrade to OpenSSH 6.4p1.

Bump VersionAddendum.

Approved by:	des


git-svn-id: svn+ssh://svn.freebsd.org/base/head@257954 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add support for the MediaTek/Ralink RT5370/RT5372 chipset.

Tested with the TP-Link TL-WN727N (RT5370) and the D-Link DWA-140 (RT5372)
on i386/amd64/arm with WPA.


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