Rename variable name from 'index' to 'idx' to avoid shadowing index(3).

Noticed by:	dim
MFC after:	2 weeks
Move struct ether_vlan_header to ethernet.h, out of if_vlan_var.h,
since this structure is protocol definition, not part of implementation.
Fix some minor TSO issues:
- Improve description of TSO limits.
- Remove a not needed KASSERT()
- Remove some not needed variable casts.

Sponsored by:	Mellanox Technologies
Discussed with:	lstewart @
MFC after:	1 week
On 965 and higher, map GTT as write-combining.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Based on some BIOS configuration (GGC register in host bridge, bit 1),
IGP may declare subclass as either VGA-compatible, or non-VGA.  The
difference is that in the later case, IGP does not claim VGA cycles.
Other than that, the device functions normally, and agp_i810 should
attach to it.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Initial attachment of the agp(4) to Haswell IGP.  There is no handling
of cacheablility control bits in GTT PTEs yet.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Fix gcc build: preserve const qualifier when casting input values.

Noticed by:	bz@
Submitted by:	dim@
Update comment.

Noted by:	dim
Approved by:	secteam (des)
MFC after:	4 days
Add workaround for vt efifb's early use of PHYS_TO_DMAP

In vt_efifb_init the framebuffer's physaddr is passed to PHYS_TO_DMAP
before the DMAP is setup. The result is not actually accessed until
after the mapping is setup, though. Loosen the assertion in PHYS_TO_DMAP
for now, to allow use when dmaplimit == 0.

Reviewed by:	kib
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D1142
Test errno against EEXIST as well.

MFC after:	3 days
Remove myself from bxe(4) maintenance.
Use the correct device (child) when asking the bus layer about which power
state said device should go into.

This was a snafu introduced in the ACPI/PCI awareness separation.

When putting a device into a power state, the bus (and thus firmware,
eg ACPI) should be asked before hand to check whether the device
can indeed go into that power state.

There's a set of nodes in ACPI under each device - the _SxD nodes - which
state which ACPI power state to put the device into when the system is
going into power save state 'x'.  So when going into S3, the existence
of an _S3D node would override whatever the system was trying to do.

By default the PCI code wants to put devices into D3 before suspending.

I have a laptop here (Asus Zenbook - check the PR) whose EHCI controller
really wants to be in D2 during suspend, not D3.  So if we put it into
D3 and then try to enter S3, everything hangs.  The device itself
can go into D3 - it just can't be there when the call to ACPI to enter
S3 occurs.  The PCI patch fixes this.

jkim@ noticed that the same is needed for the ACPI child device
enumeration.

Thankyou to Matt Dillon (the programmer, not the actor) for buying me
this particular laptop so I could debug the issues with the Atheros
AR9485 that is in it.  It's his fault that I ended up with this
laptop and was sufficiently annoyed by the lack of USB suspend
to go down this rabbit hole.

Tested:

* Thinkpad T400
* Thinkpad X230
* Thinkpad T42
* Thinkpad T60
* Asus Zenbook (see PR)
* Asus EEEPC 701
* Asus EEEPC 1001PX

TODO:

* Figure out what we should do about devices we unload drivers for
  that want to be in a specific state when entering S3 / S4 -
  the "put devices into D3 if they're not bound to a driver" option
  may also mess with things.

PR:		kern/194884
Reviewed by:	jhb, jkim
MFC after:	1 week
Relnotes:	yes
Sponsored by:	Matt Dillon <dillon@apollo.backplane.com> (hardware)
Use the callout(9) API instead of timeout(9).  To do this more cleanly,
convert a global timer to a per-controller timer.  This works much better
with locking and removes the need for several global lookup tables.

Tested by:	ambrisko
Change kbdb's kthr::cpu field into an int, to avoid gcc warnings about
comparing it with NOCPU, which became -1 recently.  While here, avoid
using it for address calculations if it is negative.

Reviewed by:	jhb, adrian
MFC after:	1 week
Default `bsdconfig timezone' and `tzsetup' to `-s' in a VM.

Recommended by:	cperciva
Reviewed by:	cperciva
Relnotes:	tzsetup and bsdconfig now assume that the "hardware" clock inside a VM is set to UTC
Use the correct device.  Note this commit complements r274386.

PR:		194884
Move NFS and TFTP filesystems before the synthetic filesystems (bzip,
gzip, and split).  "Real" filesystems should always be listed first so
that the "bare" filename is tried before alternate filenames.  For PXE
booting in particular this can remove a lot of spurious pathname lookups.

While here, move splitfs to the bottom after the bzip and gzip filesystems
as it is the least often used.

Tested by:	Prokash Sinha <psinha@panasas.com>
MFC after:	1 week
Fix whitespace.

Thanks to:	nwhitehorn
Add device ID for the T502-BT (dual-port 1G) adapter.

Reviewed by:	np
MFC after:	1 week
Remove SF_KQUEUE code.  This code was developed at Netflix, but was not
ever used.  It didn't go into stable/10, neither was documented.
It might be useful, but we collectively decided to remove it, rather
leave it abandoned and unmaintained.  It is removed in one single
commit, so restoring it should be easy, if anyone wants to reopen
this idea.

Sponsored by:	Netflix