Now that we actually use more memory descriptors, make sure to dump
them as well.


git-svn-id: svn://svn.freebsd.org/base/head@246712 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Reform the busdma API so that new types may be added without modifying
every architecture's busdma_machdep.c.  It is done by unifying the
bus_dmamap_load_buffer() routines so that they may be called from MI
code.  The MD busdma is then given a chance to do any final processing
in the complete() callback.

The cam changes unify the bus_dmamap_load* handling in cam drivers.

The arm and mips implementations are updated to track virtual
addresses for sync().  Previously this was done in a type specific
way.  Now it is done in a generic way by recording the list of
virtuals in the map.

Submitted by:	jeff (sponsored by EMC/Isilon)
Reviewed by:	kan (previous version), scottl,
	mjacob (isp(4), no objections for target mode changes)
Discussed with:	     ian (arm changes)
Tested by:	marius (sparc64), mips (jmallet), isci(4) on x86 (jharris),
	amd64 (Fabian Keil <freebsd-listen@fabiankeil.de>)


git-svn-id: svn://svn.freebsd.org/base/head@246713 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Eliminate padding by moving 'narg' next to 'code'. Both are 32-bit
entities in the syscall_args structure that otherwise has 64-bit
only fields.


git-svn-id: svn://svn.freebsd.org/base/head@246714 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Eliminate the PC_CURTHREAD symbol and load the current thread's
thread structure pointer atomically from r13 (the pcpu pointer)
for the current CPU/core.
Add a CTASSERT in machdep.c to make sure that pc_curthread is in
fact the first field in struct pcpu.

The only non-atomic operations left were those related to process-
space operations, such as casuword, subyte, suword16, fubyte,
fuword16, copyin, copyout and their variations.

The casuword function has been re-structured more complete than
the others. This way we have an example of a better bundling
without introducing a lot of risk when we get it wrong. The
other functions can be rebundled in separate commits and with
the appropriate testing.


git-svn-id: svn://svn.freebsd.org/base/head@246715 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
- Use correct size of copying different socket structures.

MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@246719 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
- Make actually printing path of AF_LOCAL socket types.

MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@246720 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Introduce PLATFORMMETHOD_END and use it.


git-svn-id: svn://svn.freebsd.org/base/head@246732 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Pull out the if_transmit() work and revert back to ath_start().

My changed had some rather significant behavioural changes to throughput.
The two issues I noticed:

* With if_start and the ifnet mbuf queue, any temporary latency
  would get eaten up by some mbufs being queued.  With ath_transmit()
  queuing things to ath_buf's, I'd only get 512 TX buffers before I
  couldn't queue any further frames.

* There's also some non-zero latency involved with TX being pushed
  into a taskqueue via direct dispatch.  Any time the scheduler didn't
  immediately schedule the ath TX task would cause extra latency.
  Various 1ge/10ge drivers implement both direct dispatch (if the TX
  lock can be acquired) and deferred task transmission (if the TX lock
  can't be acquired), with frames being pushed into a drbd queue.
  I'll have to do this at some point, but until I figure out how to
  deal with 802.11 fragments, I'll have to wait a while longer.

So what I saw:

* lots of extra latency, specially under load - if the taskqueue
  wasn't immediately scheduled, things went pear shaped;

* any extra latency would result in TX ath_buf's taking their sweet time
  being replenished, so any further calls to ath_transmit() would drop
  mbufs.

* .. yes, there's no explicit backpressure here - things are just dropped.
  Eek.

With this, the general performance has gone up, but those subtle if_start()
related race conditions are back.  For some reason, this is doubly-obvious
with the AR5416 NIC and I don't quite understand why yet.

There's an unrelated issue with AR5416 performance in STA mode (it's
fine in AP mode when bridging frames, weirdly..) that requires a little
further investigation.  Specifically - it works fine on a Lenovo T40
(single core CPU) running a March 2012 9-STABLE kernel, but a Lenovo T60
(dual core) running an early November 2012 kernel behaves very poorly.
The same hardware with an AR9160 or AR9280 behaves perfectly.


git-svn-id: svn://svn.freebsd.org/base/head@246745 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add myself as a ports committer and my mentor relationship.

Approved by:	swills (mentor)


git-svn-id: svn://svn.freebsd.org/base/head@246747 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix my email.


git-svn-id: svn://svn.freebsd.org/base/head@246751 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add specific supported revision of D-Link DWA-140 rev B1, B2.

Submitted by:	PseudoCylon
MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@246752 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add new USB ID to FTDI driver.

MFC after:	1 week
PR:		kern/175893
Submitted by:	Tomek


git-svn-id: svn://svn.freebsd.org/base/head@246753 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Resolve a LOR after r246616. Protect control requests using the USB device
enumeration lock. Make sure all callers of usbd_enum_lock() check the return
value. Remove the control transfer specific lock. Bump the FreeBSD version
number, hence external USB modules may need to be recompiled due to a USB
device structure change.

MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@246759 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Make the F_READAHEAD option to fcntl(2) work as documented:  a value of zero
now disables read-ahead.  It used to effectively restore the system default
readahead hueristic if it had been changed; a negative value now restores
the default.

Reviewed by:	kib


git-svn-id: svn://svn.freebsd.org/base/head@246763 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add a dependency so that when compiling in a static dtb, the kernel gets
re-linked after changing the .dts source.

Reviewed by:	cognet, arm@


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