DragonFly BSD
DragonFly kernel List (threaded) for 2004-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

RFC bus_dma_tag_parent


From: Chuck Tuffli <chuck_tuffli@xxxxxxxxxxx>
Date: Wed, 10 Nov 2004 14:20:08 -0800

This has come up a couple times recently*, so here's a proposal as to
one way of fixing the problem in the bus_dma API

BUS_DMA(9)

NAME
  bus_dma, ..., bus_dma_tag_parent

SYNOPSIS
  #include <machine/bus.h>
. ..
  bus_dma_tag_t
  bus_dma_tag_parent(device_t dev);

. ..

FUNCTIONS
. ..
  bus_dma_tag_parent(dev)

  Returns the DMA tag of the bus dev connects to. Drivers can use the
  DMA tag for the parent parameter in subsequent calls to
  bus_dma_tag_create(9). All devices on a bus share this tag as their
  parent and should not destroy it.

  Returns NULL if tag does not exist or a bus_dma_tag_t on success.



If this is the type of fix you were thinking of, I'll go ahead and
code something up for PCI devices.

* http://leaf.dragonflybsd.org/mailarchive/bugs/2004-10/msg00050.html
-- 
Chuck Tuffli
Agilent Technologies



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]