summaryrefslogtreecommitdiffstats
path: root/sys/dev/em
diff options
context:
space:
mode:
authorjmg <jmg@FreeBSD.org>2006-09-03 00:27:42 +0000
committerjmg <jmg@FreeBSD.org>2006-09-03 00:27:42 +0000
commitc25fb06d921a770f65a0f6e25dc1e92e4e1b5227 (patch)
tree2d913a3cb79e7a1579bdad59426344b90355f220 /sys/dev/em
parent84ee477ac39bc8414949b4df724f390aac837627 (diff)
downloadFreeBSD-src-c25fb06d921a770f65a0f6e25dc1e92e4e1b5227.zip
FreeBSD-src-c25fb06d921a770f65a0f6e25dc1e92e4e1b5227.tar.gz
add a newbus method for obtaining the bus's bus_dma_tag_t... This is
required by arches like sparc64 (not yet implemented) and sun4v where there are seperate IOMMU's for each PCI bus... For all other arches, it will end up returning NULL, which makes it a no-op... Convert a few drivers (the ones we've been working w/ on sun4v) to the new convection... Eventually all drivers will need to replace the parent tag of NULL, w/ bus_get_dma_tag(dev), though dev is usually different for each driver, and will require hand inspection... Reviewed by: scottl (earlier version)
Diffstat (limited to 'sys/dev/em')
-rw-r--r--sys/dev/em/if_em.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/em/if_em.c b/sys/dev/em/if_em.c
index 66ab3cc..8fbdf22 100644
--- a/sys/dev/em/if_em.c
+++ b/sys/dev/em/if_em.c
@@ -2389,7 +2389,7 @@ em_dma_malloc(struct adapter *adapter, bus_size_t size, struct em_dma_alloc *dma
{
int error;
- error = bus_dma_tag_create(NULL, /* parent */
+ error = bus_dma_tag_create(bus_get_dma_tag(adapter->dev), /* parent */
EM_DBA_ALIGN, 0, /* alignment, bounds */
BUS_SPACE_MAXADDR, /* lowaddr */
BUS_SPACE_MAXADDR, /* highaddr */
@@ -2493,7 +2493,7 @@ em_setup_transmit_structures(struct adapter *adapter)
* Setup DMA descriptor areas.
*/
size = roundup2(adapter->hw.max_frame_size, MCLBYTES);
- if ((error = bus_dma_tag_create(NULL, /* parent */
+ if ((error = bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */
1, 0, /* alignment, bounds */
BUS_SPACE_MAXADDR, /* lowaddr */
BUS_SPACE_MAXADDR, /* highaddr */
@@ -2905,7 +2905,7 @@ em_allocate_receive_structures(struct adapter *adapter)
bzero(adapter->rx_buffer_area, sizeof(struct em_buffer) * adapter->num_rx_desc);
- error = bus_dma_tag_create(NULL, /* parent */
+ error = bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */
1, 0, /* alignment, bounds */
BUS_SPACE_MAXADDR, /* lowaddr */
BUS_SPACE_MAXADDR, /* highaddr */
OpenPOWER on IntegriCloud