Fix this code to compile without warnings - AH_DEBUG was pulling in
ichan, but OS_MARK was not using it.  It only uses it when
AH_DEBUG_ALQ is also defined.


git-svn-id: svn://svn.freebsd.org/base/head@250172 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add the AR9300 HAL into the kernel and module builds.

Tested:

* make universe (honest!)


git-svn-id: svn://svn.freebsd.org/base/head@250173 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Switch to standard copyright license text

The initial version of this came from Sandvine but had "PROVIDED BY NETAPP,
INC" in the copyright text, presuambly because the license block was copied
from another file.  Replace it with standard "AUTHOR AND CONTRIBUTORS" form.

Approvided by: grehan@


git-svn-id: svn://svn.freebsd.org/base/head@250175 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix the getpwuid_r() call in the gssd daemon so that it handles
the ERANGE error return case. Without this fix, authentication
of users for certain system setups could fail unexpectedly.

Reported by:	Elias Martenson (lokedhs@gmail.com)
Tested by:	Elias Martenson (earlier version)
MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@250176 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix the getpwnam_r() call in the pname_to_uid() kerberos library function so
that it handles the ERANGE error return case. Without this fix, authentication
of users for certain system setups could fail unexpectedly.

Reported by:	Elias Martenson (lokedhs@gmail.com)
Tested by:	Elias Martenson (earlier version)
MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@250177 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Update probe flow so that devices with lbp can also disable disksort.

Ensure that delete_available is reset so re-probes after a media change,
to one with different delete characteristics, will result in the correct
methods being flagged as available.

Make all ccb state changes use a consistent flow:
* free()
* xpt_release_ccb()
* softc->state = <new state>
* xpt_schedule()

Reviewed by:	mav
Approved by:	pjd (mentor)
MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@250179 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix probe in progress check in dareprobe

Reviewed by:	mav
Approved by:	pjd (mentor)
MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@250180 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Use the existence of ATA Information VPD to determine if we should attempt
to query ATA functionality via ATA Pass-Through (16) as this page is defined
as "must" for SATL devices, hence indicating that the device is at least
likely to support Pass-Through (16).

This eliminates errors produced by CTL when ATA Pass-Through (16) fails.

Switch ATA probe daerror call to SF_NO_PRINT to avoid errors printing out
for devices which return invalid errors.

Output details about supported and choosen delete method when verbose booted.

Reviewed by:	mav
Approved by:	pjd (mentor)
MFC after:	 1 week


git-svn-id: svn://svn.freebsd.org/base/head@250181 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Suppress a GCC warning. This warning is actually bogus and newer GCC
versions than the one in base (dim@ mentioned he tried on 4.7.3 and 4.8.1)
do not whine about it, so, at some point this workaround will be reverted.

Reported by:	ache
Discussed with:	dim


git-svn-id: svn://svn.freebsd.org/base/head@250182 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Enable CAM SCSI to choice ATA TRIM during autodetection and correct method
names after increasing the priority of ATA TRIM.

Reviewed by:	mav
Approved by:	pjd (mentor)
MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@250183 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
remove trailing whitespace


git-svn-id: svn://svn.freebsd.org/base/head@250184 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add IDs for HighPoint RocketRAID 640L/642L/644L -- new series of 4-port
6Gbps PCIe 2.0 x2 SATA controllers, based on Marvell 88SE9235 chips.

MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@250185 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Prefer using the C++ version of the standard headers.  These place the
names within the std namespace (and possibly within the global
namespace).

The main advantage is that the C++ versions can provide optimized
versions or simplified interfaces.


git-svn-id: svn://svn.freebsd.org/base/head@250186 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add a hint suggesting why tmpfs does not need a special case there.


git-svn-id: svn://svn.freebsd.org/base/head@250187 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
The page read or written could be wired.  Do not requeue if the page
is not on a queue.

Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation


git-svn-id: svn://svn.freebsd.org/base/head@250188 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
For the new regular tmpfs vnode, v_object is initialized before
insmntque() is called.  The standard insmntque destructor resets the
vop vector to deadfs one, and calls vgone() on the vnode.  As result,
v_object is kept unchanged, which triggers an assertion in the reclaim
code, on instmntque() failure.  Also, in this case, OBJ_TMPFS flag on
the backed vm object is not cleared.

Provide the tmpfs insmntque() destructor which properly clears
OBJ_TMPFS flag and resets v_object.

Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation


git-svn-id: svn://svn.freebsd.org/base/head@250189 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix the v_object leak for non-regular tmpfs vnodes.

Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation


git-svn-id: svn://svn.freebsd.org/base/head@250190 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Expose cvmx_mgmt_port_num_ports() as a wrapper to the static
__cvmx_mgmt_port_num_ports() mostly to avoid exporting a function
starting with __.


git-svn-id: svn://svn.freebsd.org/base/head@250191 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Use cvmx_mgmt_port_num_ports() instead of the inlined copy of a
previous version of this function.


git-svn-id: svn://svn.freebsd.org/base/head@250192 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
The fsync(2) call should sync the vnode in such way that even after
system crash which happen after successfull fsync() return, the data
is accessible.  For msdosfs, this means that FAT entries for the file
must be written.

Since we do not track the FAT blocks containing entries for the
current file, just do a sloppy sync of the devvp vnode for the mount,
which buffers, among other things, contain FAT blocks.

Simultaneously, for deupdat():
- optimize by clearing the modified flags before short-circuiting a
  return, if the mount is read-only;
- only ignore the rest of the function for denode with DE_MODIFIED
  flag clear when the waitfor argument is false.  The directory buffer
  for the entry might be of delayed write;
- microoptimize by comparing the updated directory entry with the
  current block content;
- try to cluster the write, fall back to bawrite() if low on
  resources.

Based on the submission by:	bde
MFC after:	2 weeks


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