Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg.
Lockfunc allows a driver to provide a function for managing its locking
semantics while using busdma. At the moment, this is used for the
asynchronous busdma_swi and callback mechanism. Two lockfunc implementations
are provided: busdma_lock_mutex() performs standard mutex operations on the
mutex that is specified from lockfuncarg. dftl_lock() is a panic
implementation and is defaulted to when NULL, NULL are passed to
bus_dma_tag_create(). The only time that NULL, NULL should ever be used is
when the driver ensures that bus_dmamap_load() will not be deferred.
Drivers that do not provide their own locking can pass
busdma_lock_mutex,&Giant args in order to preserve the former behaviour.
sparc64 and powerpc do not provide real busdma_swi functions, so this is
largely a noop on those platforms. The busdma_swi on is64 is not properly
locked yet, so warnings will be emitted on this platform when busdma
callback deferrals happen.
If anyone gets panics or warnings from dflt_lock() being called, please
let me know right away.
Reviewed by: tmm, gibbs
ahd_pci.c:
Retrieve the allow_memio hint from the resource manager to
determine whether or not to try PCI MEMIO.
aic79xx_osm.h:
aic7xxx_osm.h:
Don't wrongly abuse the callout_reset() interface when trying
to abuse timeouts generated from the CAM layer. This fixes the
console freeze and lost timeout problem that many have reported,
especially on SMP systems.
aic79xx_pci.c
aic7xxx_pci.c
Rewrite the MEMIO test routine to prevent certain broken chipsets
from trying to burst multiple DWORDs to the registers. Also make
the routine better detect byte merging by the host bridge and
deal with it.
aic79xx.reg:
Correct an incorrect register definition.
Approved by: re (rwatson, jhb)
Move IOCell paramters into softc and add a hook for the
OSM to modify these as well as other settings prior to
committing them to the chip.
Approved by: re (blanket)