bge usage of bus_dma_tag_create?
James Van Artsdalen
james-freebsd-amd64 at jrv.org
Fri Dec 12 00:23:09 PST 2003
I am confused by this code in sys/dev/bge/if_bge.c.
Are the values for the lowaddr and highaddr args to
bus_dma_tag_create () swapped?
The ata and aha drivers seem to have lowaddr <= highaddr,
but on AMD64 that's not true below.
static int
bge_dma_alloc(dev)
device_t dev;
{
struct bge_softc *sc;
int nseg, i, error;
struct bge_dmamap_arg ctx;
sc = device_get_softc(dev);
/*
* Allocate the parent bus DMA tag appropriate for PCI.
*/
#define BGE_NSEG_NEW 32
error = bus_dma_tag_create(NULL, /* parent */
PAGE_SIZE, 0, /* alignment, boundary */
BUS_SPACE_MAXADDR, /* lowaddr */
BUS_SPACE_MAXADDR_32BIT,/* highaddr */
NULL, NULL, /* filter, filterarg */
MAXBSIZE, BGE_NSEG_NEW, /* maxsize, nsegments */
BUS_SPACE_MAXSIZE_32BIT,/* maxsegsize */
BUS_DMA_ALLOCNOW, /* flags */
NULL, NULL, /* lockfunc, lockarg */
&sc->bge_cdata.bge_parent_tag);
More information about the freebsd-amd64
mailing list