ext2fs: fix inode flag conversion.

After r252890 we are naively attempting to pass through the
inode flags.  This is technically incorrect as the ext2
inode flags don't match the UFS/system values used in
FreeBSD and a clean conversion is needed.

Some filtering was left in place so the change didn't cause
significant changes in FreeBSD but some of the garbage passed
is likely to be the cause for warning messages in linux.

Fix the issue by resetting the flags before conversion as was
done previously. This also means we will not pass the EXT4_*
inode flags into FreeBSD's inode.

PR:		kern/185448
MFC after:	3 days
Fix for r260541: do not drop periph reference when request is restarted.
CAM_DEV_QFREEZE flag is still there and it will freeze device again.
We don't need chain write lock since we're not modifying its contents.
LibAliasSetAddress() uses its own mutex to serialize changes.

While here, convert ifp->if_xname access to if_name() function.

MFC after:	2 weeks
Sponsored by:	Yandex LLC
Move xpt_run_devq() call before request completion callback where it was
originally.

I am not sure why exactly have I moved it during one of many refactorings
during camlock project, but obviously it opens race window that may cause
use after free panics during SIM (in reported cases umass(4)) detach.

MFC after:	2 weeks
Fix amd64 build breakage caused by r260532.

Submitted by:	Marcus Karlsson (mk@acc.umu.se)
Pointy hat to:	me
Revert r260548. We really should not use IPFW_WLOCK() here
but this requires some more playing with IPFW_UH_WLOCK(). Leave till later.
Add firmware for Intel Centrino Wireless-N 105 devices.

Committed from:	Centrino 105 device
Add missing C++11 typeinfos to the libcxxrt version script.

PR:		185663
MFC after:	1 week
use a real uint64_t instead of writing code to emulate one..

I verified w/ a:
dd if=/dev/zero bs=1m count=5000 | sha256
a33351fafd00e4c4bcdee2a1c5d019026500f8cdfeaf91a9b8dbbb2619429659

Reviewed by:	cperciva
MFC after:	1 week
find: Allow -type d without statting everything.

fts(3) detects directories even in FTS_NOSTAT mode (so it can descend into
them).

No functional change is intended, but find commands that use -type d but no
primaries that still require stat/lstat calls make considerably fewer system
calls.
Add some missing .Nm for newer syscalls in existing man pages.

MFC after:	1 week
Remove spaces from boot messages when we print the CPU ID/Family/Stepping
to match the rest of the CPU identification lines, and once again fit
into 80 columns in the usual case.
Don't do synchronous USB requests inside USB transfer callbacks. It is
technically OK, but not recommended.

MFC after:	1 weeks
Make sure reserved fields of the EHCI DMA descriptors are not dirty
after previous transfers.

MFC after:	1 week
Fix gcc with EABI on big-endian ARM by setting the endian correctly.
Without this gcc would generate byte loads for a little-endian core.

MFC after:	1 week
Remove incorrect bit shift when assigning the LUN request field

This caused duplicate targets appearing on Google Compute Engine
instances.

PR:		kern/185626
Submitted by:	Venkatesh Srinivas <venkateshs@google.com>
MFC after:	3 days
Correctly update the count of stuck pages, "addl_page_shortage", in
vm_pageout_scan().  There were missing increments in two less common cases.

Don't conflate the count of stuck pages and the pageout deficit provided by
vm_page_alloc{,_contig}().  (A proposed fix to the OOM code depends on this.)

Handle held pages consistently in the inactive queue scan.  In the more
common case, we did not move the page to the tail of the queue.  Whereas, in
the less common case, we did.  There's no particular reason to move the page
in the less common case, so remove it.

Perform the calculation of the page shortage for the active queue scan a
little earlier, before the active queue lock is acquired.  The correctness
of this calculation doesn't depend on the active queue lock being held.

Eliminate a redundant variable, "pcount".  Use the more descriptive
variable, "maxscan", in its place.

Apply a few nearby style fixes, e.g., eliminate stray whitespace and excess
parentheses.

Reviewed by:	kib
Sponsored by:	EMC / Isilon Storage Division
fts: Stat things relative to the directory fd, if possible.

As a result, the kernel needs to process shorter pathnames if fts is not
changing directories (if fts follows symlinks (-L option to utilities), fts
cannot open "." or FTS_NOCHDIR was specified).

Side effect: If pathnames exceed PATH_MAX, [ENAMETOOLONG] is not hit at the
stat stage but later (opendir or application fts_accpath) or not at all.
fts(3): Remove stray mentions of the obsolete fts_bignum.
Generate and install pkg-config files for atf.

These files are required to get packages in ports to build against atf and
also to get a couple of currently-failing tests to pass.

I'm following the approach already used by the libusb pkg-config files
installed by the system regarding the location and the install rules.

MFC after:	5 days