Remove all legacy ATA code parts, not used since options ATA_CAM enabled in
most kernels before FreeBSD 9.0.  Remove such modules and respective kernel
options: atadisk, ataraid, atapicd, atapifd, atapist, atapicam.  Remove the
atacontrol utility and some man pages.  Remove useless now options ATA_CAM.

No objections:	current@, stable@
MFC after:	never


git-svn-id: svn://svn.freebsd.org/base/head@249083 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove obsolete files of the legacy ATA stack.


git-svn-id: svn://svn.freebsd.org/base/head@249084 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix the busdma logic to work with EDMA chipsets when using bounce
buffers (ie, >4GB on amd64.)

The underlying problem was that PREREAD doesn't sync the mbuf
with the DMA memory (ie, bounce buffer), so the bounce buffer may
have had stale information.  Thus it was always considering the
buffer completed and things just went off the rails.

This change does the following:

* Make ath_rx_pkt() always consume the mbuf somehow; it no longer
  passes error mbufs (eg CRC errors, crypt errors, etc) back up
  to the RX path to recycle.  This means that a new mbuf is always
  allocated each time, but it's cleaner.

* Push the RX buffer map/unmap to occur in the RX path, not
  ath_rx_pkt().  Thus, ath_rx_pkt() now assumes (a) it has to consume
  the mbuf somehow, and (b) that it's already been unmapped and
  synced.

* For the legacy path, the descriptor isn't mapped, it comes out of
  coherent, DMA memory anyway.  So leave it there.

* For the EDMA path, the RX descriptor has to be cleared before
  its passed to the hardware, so that when we check with
  a POSTREAD sync, we actually get either a blank (not finished)
  or a filled out descriptor (finished.)  Otherwise we get stale
  data in the DMA memory.

* .. so, for EDMA RX path, we need PREREAD|PREWRITE to sync the
  data -> DMA memory, then POSTREAD|POSTWRITE to finish syncing
  the DMA memory -> data.

* Whilst we're here, make sure that in EDMA buffer setup (ie,
  bzero'ing the descriptor part) is done before the mbuf is
  map/synched.

NOTE: there's been a lot of commits besides this one with regards to
tidying up the busdma handling in ath(4).  Please check the recent
commit history.

Discussed with and thanks to:	scottl

Tested:

* AR5416 (non-EDMA) on i386, with the DMA tag for the driver
  set to 2^^30, not 2^^32, STA

* AR9580 (EDMA) on i386, as above, STA

* User - tested AR9380 on amd64 with 32GB RAM.

PR:		kern/177530


git-svn-id: svn://svn.freebsd.org/base/head@249085 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove atapicam(4) reference.


git-svn-id: svn://svn.freebsd.org/base/head@249086 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove references to ataraid(4) and atacontrol(8).


git-svn-id: svn://svn.freebsd.org/base/head@249087 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Update comments!


git-svn-id: svn://svn.freebsd.org/base/head@249088 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Check status of ahci_em_reset() on attach and abort if reset failed.
For now it is just a hypothetical case.

Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>


git-svn-id: svn://svn.freebsd.org/base/head@249089 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove usr.sbin/burncd, useless after legacy ATA stack removal.


git-svn-id: svn://svn.freebsd.org/base/head@249090 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Use xpt_lock_buses() instead of equivalent mtx_lock(&xsoftc.xpt_topo_lock)
to unify the code.


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

Discussed with:	mav


git-svn-id: svn://svn.freebsd.org/base/head@249092 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Implement AR933x polled IO uart bus code.

This implements the bus transmit/receive/sigchg/ipend methods with
a polled interrupt handler (ipend) rather than enabling hardware
interrupts.

The FIFO is faked at 16 bytes deep for now, just so the transmit
IO side doesn't suck too bad (the callout frequency limits how quickly
IO is flushed to the sender, rather than scheduling the callout more
frequently whilst there's active TX.  But I digress.)

Tested:

* Atheros AP121 (AR9330) reference board, booting to multi-user interactive
  mode.


git-svn-id: svn://svn.freebsd.org/base/head@249093 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove some more references to legacy ATA.

Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>


git-svn-id: svn://svn.freebsd.org/base/head@249094 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove periodic script for ataraid(4) and add instead script for graid(8).


git-svn-id: svn://svn.freebsd.org/base/head@249095 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Improve error handling when unwrapping received data.

Submitted by:	Rick Macklem
MFC after:	1 week


git-svn-id: svn://svn.freebsd.org/base/head@249096 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove a comment about devices being able to specify multiple interrupt
types. This is no longer the case because interrupt types now have to map to
an ithread priority (c.f. intr_priority()).


git-svn-id: svn://svn.freebsd.org/base/head@249097 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove xpt_sim_opened(), the only consumer of which was atapicam, which is
now gone.


git-svn-id: svn://svn.freebsd.org/base/head@249099 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Since the CTL version in FreeBSD does not support High Availability,
ctl_is_single should always be set to 1.  Make it so.  Previously
it was always 0, because ctl_isc_start() never got to run.

Suggested by:	ken


git-svn-id: svn://svn.freebsd.org/base/head@249102 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFprojects/camlock r248928:
Move CAM_DEBUG_CDB messages from the point of queuing to the point of
sending to SIM.  That allows to inspect real requests execution order,
respecting priorities, freezing, etc.

MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@249104 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFprojects/camlock r248930:
Remove extra NULL checks. d_drv1 can never be NULL during periph life cycle.

MFC after:	2 weeks


git-svn-id: svn://svn.freebsd.org/base/head@249105 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
MFprojects/camlock r248931:
Replace some direct mutex operations with wrappers.

MFC after:	2 weeks


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