Fix a time calculation error in ctlstat_standard().

ctlstat.c:	When converting a timeval to a floating point
		number in ctlstat_standard(), cast the nanoseconds
		calculation to a long double, so we don't lose
		precision.  Without the cast, we wind up with a
		time in whole seconds only.

Sponsored by:	Spectra Logic
MFC after:	3 days


git-svn-id: svn://svn.freebsd.org/base/head@249334 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Since UMA_ZONE_PCPU zones put a constraint on sizeof(struct pcpu), declared
as CTASSERT in MI pcpu.h, stop including all possible mutually exclusive
PCPU_MD_FIELDS fields into LINT kernels, due to brekaing
aforementioned CTASSERT.


git-svn-id: svn://svn.freebsd.org/base/head@249335 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add ID for ASMedia ASM1042 USB 3.0 controller.

MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@249336 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Simplify allocate_legacy code, txr pointer was breaking LEGACY compile,
thanks to Nick Rogers for pointing this out.


git-svn-id: svn://svn.freebsd.org/base/head@249339 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove obsolete comment about lack of locking for MMIO range lookup.

Pointed out by:	Tycho Nightingale (tycho.nightingale@plurisbusnetworks.com)


git-svn-id: svn://svn.freebsd.org/base/head@249342 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Need to call init_mem() to really initialize the MMIO range lookups.

This was working by accident because:
- the RB_HEADs were being initialized to zero as part of BSS
- the pthread_rwlock functions were implicitly initializing the lock object

Obtained from:	NetApp


git-svn-id: svn://svn.freebsd.org/base/head@249343 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
o Provide function kvm_read_zpcpu() to access UMA_ZONE_PCPU allocations.
o Provide function kvm_counter_u64_fetch() to fetch valut of a counter(9).

Sponsored by:	Nginx, Inc.


git-svn-id: svn://svn.freebsd.org/base/head@249344 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Use kvm_counter_u64_fetch() to fix obtaining ipstat and tcpstat from
kernel core files.

Sponsored by:	Nginx, Inc.


git-svn-id: svn://svn.freebsd.org/base/head@249345 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Create controller-level DMA tag, handling range of supported addresses.
That simplifies logic for channels and gives the bus information about what
device actually allocated the tag.

Submitted by:	jhb@


git-svn-id: svn://svn.freebsd.org/base/head@249346 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add a callback to the ada(4) driver so that it knows when GEOM has released
references to it.

This is the functional equivalent to change r237518, which added this
functionality to the cd(4) and da(4) drivers.

This fix prevents a panic caused by GEOM calling adaopen() while the device
is going away.  We now keep the device around until GEOM has finished
cleaning up its state.

ata_da.c:	In adaregister(), add a d_gone callback to the GEOM disk
		structure registered for the ada driver.  Increment the
		peripheral reference count for GEOM.

		Add a new callback, adadiskgonecb(), that GEOM calls when
		it is done with its resources.  This callback releases the
		reference acquired in adaregister().

Submitted by:	Po-Li Soong
Sponsored by:	Spectra Logic
MFC After:	5 days


git-svn-id: svn://svn.freebsd.org/base/head@249347 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
options DPT_HANDLE_TIMEOUTS hasn't worked since dpt(4) was converted to CAM
somewhere around svn r39402 to r39234.

I don't know of anyone who really wants to test these changes, but they
only remove the deprecated code in question.  This shreds the driver down a
bit and *removes* options from the kernel configs.

These don't appear to be referenced in the man page, so no need to check it
there.

PR:		kern/44587
Obtained from:	Yahoo! Inc.
MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@249348 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
While investigating a p/r I noted that the camcontrol devlist output for
volumes behind a ciss(4) controller were being reported with malformeed
names and identifiers.

Repair that reporting by using the CAM values for the three SCSI indents
reported via camcontrol devlist

PR:	kern/171650
Reviewed by:	scottl
Obtained from:	Yahoo! Inc.
MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@249349 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Update ciss(4) man page.  We absolutely support performant mode of operation
on this controller.  Indicate that the 5300 is the *only* controller that
will only work in simple mode.

Bus rescans should not be needed now and I consider it a bug if disks do
not appear or dissapear when created or destroyed.

Obtained from:	Yahoo! Inc


git-svn-id: svn://svn.freebsd.org/base/head@249350 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge remote-tracking branch 'upstream/master'