Print out the platform reference frequency.

This is useful for AR933x platforms where that matters.


git-svn-id: svn://svn.freebsd.org/base/head@248865 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
* Fix clock register definitions
* Add maximum clock register values


git-svn-id: svn://svn.freebsd.org/base/head@248866 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
For the AR933x UART, the serial clock is not the AHB clock, it's the
reference clock.  So use that instead.


git-svn-id: svn://svn.freebsd.org/base/head@248867 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Implement CAM_PERIPH_FOREACH() macro, safely iterating over the list of
driver's periphs, acquiring and releaseing periph references while doing it.

Use it to iterate over the lists of ada and da periphs when flushing caches
and putting devices to sleep on shutdown and suspend.  Previous code could
panic in theory if some device disappear in the middle of the process.


git-svn-id: svn://svn.freebsd.org/base/head@248868 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Minor mdoc fix.


git-svn-id: svn://svn.freebsd.org/base/head@248870 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove EOL whitespace.


git-svn-id: svn://svn.freebsd.org/base/head@248871 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Make pre-shutdown flush and spindown routines to not use xpt_polled_action(),
but execute the commands in regular way.  There is no any reason to cook CPU
while the system is still fully operational.  After this change polling in
CAM is used only for kernel dumping.


git-svn-id: svn://svn.freebsd.org/base/head@248872 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Unbreak compilation after r248868.


git-svn-id: svn://svn.freebsd.org/base/head@248874 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Non-functional cleanup of ng_ksocket_incoming2().


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


git-svn-id: svn://svn.freebsd.org/base/head@248883 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
When soreceive_generic() hands off an mbuf from buffer,
clear its pointer to next record, since next record
belongs to the buffer, and shouldn't be leaked.

The ng_ksocket(4) used to clear this pointer itself,
but the correct place is here.

Sponsored by:	Nginx, Inc


git-svn-id: svn://svn.freebsd.org/base/head@248884 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revamp mbuf handling in ng_ksocket_incoming2():

- Clear code that workarounded a bug in FreeBSD 3,
  and even predated import of netgraph(4).
- Clear workaround for m_nextpkt pointing into
  next record in buffer (fixed in r248884).
  Assert that m_nextpkt is clear.
- Do not rely on SOCK_STREAM sockets containing
  M_PKTHDR mbufs. Create a header ourselves and
  attach chain to it. This is correct fix for
  kern/154676.

PR:		kern/154676
Sponsored by:	Nginx, Inc


git-svn-id: svn://svn.freebsd.org/base/head@248885 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Once ng_ksocket(4) is fixed, re-apply r194662. See this revision for
longer description.

Discussed with:	andre, rwatson
Sponsored by:	Nginx, Inc.


git-svn-id: svn://svn.freebsd.org/base/head@248886 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix bug in m_split() in a case when split len matches len of the
first mbuf, and the first mbuf is M_PKTHDR.

PR:		kern/176144
Submitted by:	Jacques Fourie <jacques.fourie gmail.com>


git-svn-id: svn://svn.freebsd.org/base/head@248887 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Pass correct parameter to CTR5() in bus_dmamap_load_uio.

Sponsored by:	Intel


git-svn-id: svn://svn.freebsd.org/base/head@248891 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Do not add 1 to nsegs before passing to CTR5(), since nsegs
has already been incremented before these calls.

Sponsored by:	Intel


git-svn-id: svn://svn.freebsd.org/base/head@248892 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add CTR5() to bus_dmamap_load_ccb, similar to other bus_dmamap_load_*
functions.

Sponsored by:	Intel


git-svn-id: svn://svn.freebsd.org/base/head@248893 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add bus_dmamap_load_bio for non-CAM disk drivers that wish to enable
unmapped I/O.

Sponsored by:	Intel
Reviewed by:	kib


git-svn-id: svn://svn.freebsd.org/base/head@248896 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove a really noisy printf left over from debugging hardware errata.


git-svn-id: svn://svn.freebsd.org/base/head@248899 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Two small fixes:
  Set promiscuous code was unconditionally turning off multicast when
  turning off promiscuous mode, this should only be done when there are
  less than MAX groups. Thanks to Mike Karels for this correction.

  Second, the overtmp interrupt setup/detection was wrong, correcting it.

MFC after:	one week


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