diff options
| author | John-Mark Gurney <jmg@FreeBSD.org> | 2006-09-03 00:27:42 +0000 |
|---|---|---|
| committer | John-Mark Gurney <jmg@FreeBSD.org> | 2006-09-03 00:27:42 +0000 |
| commit | 378f231e7d884bc4d5954638f602f7ff44dfe5b3 (patch) | |
| tree | 2d913a3cb79e7a1579bdad59426344b90355f220 /sys/dev | |
| parent | 01646adbc89c26f1148440064cdfe77336a61a8f (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/aic7xxx/ahc_eisa.c | 4 | ||||
| -rw-r--r-- | sys/dev/aic7xxx/ahc_isa.c | 4 | ||||
| -rw-r--r-- | sys/dev/aic7xxx/ahc_pci.c | 4 | ||||
| -rw-r--r-- | sys/dev/aic7xxx/ahd_pci.c | 4 | ||||
| -rw-r--r-- | sys/dev/ata/ata-dma.c | 2 | ||||
| -rw-r--r-- | sys/dev/bge/if_bge.c | 2 | ||||
| -rw-r--r-- | sys/dev/em/if_em.c | 6 | ||||
| -rw-r--r-- | sys/dev/gem/if_gem.c | 7 | ||||
| -rw-r--r-- | sys/dev/isp/isp_pci.c | 5 | ||||
| -rw-r--r-- | sys/dev/usb/ohci_pci.c | 8 |
10 files changed, 24 insertions, 22 deletions
diff --git a/sys/dev/aic7xxx/ahc_eisa.c b/sys/dev/aic7xxx/ahc_eisa.c index f98059f69016..8c6e4df444d8 100644 --- a/sys/dev/aic7xxx/ahc_eisa.c +++ b/sys/dev/aic7xxx/ahc_eisa.c @@ -131,8 +131,8 @@ aic7770_attach(device_t dev) /* Allocate a dmatag for our SCB DMA maps */ /* XXX Should be a child of the PCI bus dma tag */ - error = aic_dma_tag_create(ahc, /*parent*/NULL, /*alignment*/1, - /*boundary*/0, + error = aic_dma_tag_create(ahc, /*parent*/bus_get_dma_tag(dev), + /*alignment*/1, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, diff --git a/sys/dev/aic7xxx/ahc_isa.c b/sys/dev/aic7xxx/ahc_isa.c index d01ffc96d3f8..0bf0f537274e 100644 --- a/sys/dev/aic7xxx/ahc_isa.c +++ b/sys/dev/aic7xxx/ahc_isa.c @@ -254,8 +254,8 @@ ahc_isa_attach(device_t dev) /* Allocate a dmatag for our SCB DMA maps */ /* XXX Should be a child of the VLB/ISA bus dma tag */ - error = aic_dma_tag_create(ahc, /*parent*/NULL, /*alignment*/1, - /*boundary*/0, + error = aic_dma_tag_create(ahc, /*parent*/bus_get_dma_tag(dev), + /*alignment*/1, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, diff --git a/sys/dev/aic7xxx/ahc_pci.c b/sys/dev/aic7xxx/ahc_pci.c index 4a4889c49707..50297269d1b7 100644 --- a/sys/dev/aic7xxx/ahc_pci.c +++ b/sys/dev/aic7xxx/ahc_pci.c @@ -107,8 +107,8 @@ ahc_pci_attach(device_t dev) /* Allocate a dmatag for our SCB DMA maps */ /* XXX Should be a child of the PCI bus dma tag */ - error = aic_dma_tag_create(ahc, /*parent*/NULL, /*alignment*/1, - /*boundary*/0, + error = aic_dma_tag_create(ahc, /*parent*/bus_get_dma_tag(dev), + /*alignment*/1, /*boundary*/0, (ahc->flags & AHC_39BIT_ADDRESSING) ? 0x7FFFFFFFFFLL : BUS_SPACE_MAXADDR_32BIT, diff --git a/sys/dev/aic7xxx/ahd_pci.c b/sys/dev/aic7xxx/ahd_pci.c index 8f2e65e61dad..03b136349cf3 100644 --- a/sys/dev/aic7xxx/ahd_pci.c +++ b/sys/dev/aic7xxx/ahd_pci.c @@ -109,8 +109,8 @@ ahd_pci_attach(device_t dev) /* Allocate a dmatag for our SCB DMA maps */ /* XXX Should be a child of the PCI bus dma tag */ - error = aic_dma_tag_create(ahd, /*parent*/NULL, /*alignment*/1, - /*boundary*/0, + error = aic_dma_tag_create(ahd, /*parent*/bus_get_dma_tag(dev), + /*alignment*/1, /*boundary*/0, (ahd->flags & AHD_39BIT_ADDRESSING) ? 0x7FFFFFFFFF : BUS_SPACE_MAXADDR_32BIT, diff --git a/sys/dev/ata/ata-dma.c b/sys/dev/ata/ata-dma.c index 6f94084d3b66..87f49cd7c093 100644 --- a/sys/dev/ata/ata-dma.c +++ b/sys/dev/ata/ata-dma.c @@ -96,7 +96,7 @@ ata_dmaalloc(device_t dev) struct ata_channel *ch = device_get_softc(dev); struct ata_dc_cb_args ccba; - if (bus_dma_tag_create(NULL, ch->dma->alignment, 0, + if (bus_dma_tag_create(bus_get_dma_tag(dev), ch->dma->alignment, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, ch->dma->max_iosize, ATA_DMA_ENTRIES, ch->dma->segsize, diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index d137b05683f1..229e81c1d771 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -1702,7 +1702,7 @@ bge_dma_alloc(device_t dev) /* * Allocate the parent bus DMA tag appropriate for PCI. */ - error = bus_dma_tag_create(NULL, /* parent */ + error = bus_dma_tag_create(bus_get_dma_tag(sc->bge_dev),/* parent */ PAGE_SIZE, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ diff --git a/sys/dev/em/if_em.c b/sys/dev/em/if_em.c index 66ab3cc3e5c2..8fbdf22f2ab4 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 */ diff --git a/sys/dev/gem/if_gem.c b/sys/dev/gem/if_gem.c index 3efe0ed711a1..ed9fd56488f1 100644 --- a/sys/dev/gem/if_gem.c +++ b/sys/dev/gem/if_gem.c @@ -153,9 +153,10 @@ gem_attach(sc) gem_reset(sc); GEM_UNLOCK(sc); - error = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT, - BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, GEM_NSEGS, - BUS_SPACE_MAXSIZE_32BIT, 0, NULL, NULL, &sc->sc_pdmatag); + error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, + MCLBYTES, GEM_NSEGS, BUS_SPACE_MAXSIZE_32BIT, 0, NULL, NULL, + &sc->sc_pdmatag); if (error) goto fail_ifnet; diff --git a/sys/dev/isp/isp_pci.c b/sys/dev/isp/isp_pci.c index 7ea7dbf5bc7c..749ca3345d99 100644 --- a/sys/dev/isp/isp_pci.c +++ b/sys/dev/isp/isp_pci.c @@ -1442,8 +1442,9 @@ isp_pci_mbxdma(ispsoftc_t *isp) #endif ISP_UNLOCK(isp); - if (isp_dma_tag_create(NULL, 1, slim, llim, hlim, - NULL, NULL, BUS_SPACE_MAXSIZE, ISP_NSEGS, slim, 0, &pcs->dmat)) { + if (isp_dma_tag_create(bus_get_dma_tag(pcs->pci_dev), 1, slim, llim, + hlim, NULL, NULL, BUS_SPACE_MAXSIZE, ISP_NSEGS, slim, 0, + &pcs->dmat)) { isp_prt(isp, ISP_LOGERR, "could not create master dma tag"); ISP_LOCK(isp); return (1); diff --git a/sys/dev/usb/ohci_pci.c b/sys/dev/usb/ohci_pci.c index 1401a4b0316f..78bc401a8efa 100644 --- a/sys/dev/usb/ohci_pci.c +++ b/sys/dev/usb/ohci_pci.c @@ -307,10 +307,10 @@ ohci_pci_attach(device_t self) } /* Allocate a parent dma tag for DMA maps */ - err = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT, - BUS_SPACE_MAXADDR, NULL, NULL, BUS_SPACE_MAXSIZE_32BIT, - USB_DMA_NSEG, BUS_SPACE_MAXSIZE_32BIT, 0, NULL, NULL, - &sc->sc_bus.parent_dmatag); + err = bus_dma_tag_create(bus_get_dma_tag(self), 1, 0, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, + BUS_SPACE_MAXSIZE_32BIT, USB_DMA_NSEG, BUS_SPACE_MAXSIZE_32BIT, 0, + NULL, NULL, &sc->sc_bus.parent_dmatag); if (err) { device_printf(self, "Could not allocate parent DMA tag (%d)\n", err); |
