diff --git a/sys/dev/advansys/adv_pci.c b/sys/dev/advansys/adv_pci.c index 6a073ba68db0..ef938e38efeb 100644 --- a/sys/dev/advansys/adv_pci.c +++ b/sys/dev/advansys/adv_pci.c @@ -189,7 +189,7 @@ adv_pci_attach(device_t dev) /* Allocate a dmatag for our transfer DMA maps */ /* XXX Should be a child of the PCI bus dma tag */ error = bus_dma_tag_create( - /* parent */ NULL, + /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, /* boundary */ 0, /* lowaddr */ ADV_PCI_MAX_DMA_ADDR, diff --git a/sys/dev/advansys/adw_pci.c b/sys/dev/advansys/adw_pci.c index 8777a4428abc..d9169cf70a04 100644 --- a/sys/dev/advansys/adw_pci.c +++ b/sys/dev/advansys/adw_pci.c @@ -260,7 +260,7 @@ adw_pci_attach(device_t dev) /* Allocate a dmatag for our transfer DMA maps */ /* XXX Should be a child of the PCI bus dma tag */ error = bus_dma_tag_create( - /* parent */ NULL, + /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, /* boundary */ 0, /* lowaddr */ ADW_PCI_MAX_DMA_ADDR, diff --git a/sys/dev/amr/amr_pci.c b/sys/dev/amr/amr_pci.c index 61b20e17e350..f47d408764db 100644 --- a/sys/dev/amr/amr_pci.c +++ b/sys/dev/amr/amr_pci.c @@ -275,7 +275,7 @@ amr_pci_attach(device_t dev) /* * Allocate the parent bus DMA tag appropriate for PCI. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* PCI parent */ 1, 0, /* alignment,boundary */ AMR_IS_SG64(sc) ? BUS_SPACE_MAXADDR : diff --git a/sys/dev/an/if_an_pci.c b/sys/dev/an/if_an_pci.c index 2d0d2b5a6672..fe3467d83e07 100644 --- a/sys/dev/an/if_an_pci.c +++ b/sys/dev/an/if_an_pci.c @@ -195,7 +195,7 @@ an_attach_pci(dev) } /* Allocate DMA region */ - 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_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ diff --git a/sys/dev/arcmsr/arcmsr.c b/sys/dev/arcmsr/arcmsr.c index ee2e538ad0fe..a24809ed162c 100644 --- a/sys/dev/arcmsr/arcmsr.c +++ b/sys/dev/arcmsr/arcmsr.c @@ -3486,7 +3486,7 @@ static u_int32_t arcmsr_initialize(device_t dev) return ENOMEM; } } - if(bus_dma_tag_create( /*parent*/ NULL, + if(bus_dma_tag_create( /*PCI parent*/ bus_get_dma_tag(dev), /*alignemnt*/ 1, /*boundary*/ 0, /*lowaddr*/ BUS_SPACE_MAXADDR, diff --git a/sys/dev/asr/asr.c b/sys/dev/asr/asr.c index 6034b6f239bf..127ade2555eb 100644 --- a/sys/dev/asr/asr.c +++ b/sys/dev/asr/asr.c @@ -2328,7 +2328,7 @@ asr_alloc_dma(Asr_softc_t *sc) dev = sc->ha_dev; - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* PCI parent */ 1, 0, /* algnmnt, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ diff --git a/sys/dev/buslogic/bt_pci.c b/sys/dev/buslogic/bt_pci.c index de7cc9ed4e8b..5994bec2119c 100644 --- a/sys/dev/buslogic/bt_pci.c +++ b/sys/dev/buslogic/bt_pci.c @@ -173,7 +173,7 @@ bt_pci_attach(device_t dev) /* Allocate a dmatag for our CCB DMA maps */ /* XXX Should be a child of the PCI bus dma tag */ - if (bus_dma_tag_create( /* parent */ NULL, + if (bus_dma_tag_create( /* PCI parent */ bus_get_dma_tag(dev), /* alignemnt */ 1, /* boundary */ 0, /* lowaddr */ BUS_SPACE_MAXADDR_32BIT, diff --git a/sys/dev/bxe/if_bxe.c b/sys/dev/bxe/if_bxe.c index 1c5398acbb91..b60d6e2fc78c 100644 --- a/sys/dev/bxe/if_bxe.c +++ b/sys/dev/bxe/if_bxe.c @@ -13582,7 +13582,8 @@ bxe_host_structures_alloc(device_t dev) /* * Allocate the parent bus DMA tag appropriate for PCI. */ - rc = bus_dma_tag_create(NULL, /* parent tag */ + rc = bus_dma_tag_create( + bus_get_dma_tag(dev), /* PCI parent tag */ 1, /* alignment for segs */ BXE_DMA_BOUNDARY, /* cannot cross */ BUS_SPACE_MAXADDR, /* restricted low */ diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c index 37af5168cfe4..3291f03e44dd 100644 --- a/sys/dev/ciss/ciss.c +++ b/sys/dev/ciss/ciss.c @@ -796,7 +796,7 @@ ciss_init_pci(struct ciss_softc *sc) * Note that "simple" adapters can only address within a 32-bit * span. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(sc->ciss_dev),/* PCI parent */ 1, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ diff --git a/sys/dev/cxgb/cxgb_sge.c b/sys/dev/cxgb/cxgb_sge.c index a34dab28b5da..5450b7ef6b53 100644 --- a/sys/dev/cxgb/cxgb_sge.c +++ b/sys/dev/cxgb/cxgb_sge.c @@ -592,7 +592,7 @@ t3_sge_alloc(adapter_t *sc) { /* The parent tag. */ - if (bus_dma_tag_create( NULL, /* parent */ + if (bus_dma_tag_create( bus_get_dma_tag(sc->dev),/* PCI parent */ 1, 0, /* algnmnt, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ diff --git a/sys/dev/dpt/dpt_pci.c b/sys/dev/dpt/dpt_pci.c index df925659e758..2009dbdf2f20 100644 --- a/sys/dev/dpt/dpt_pci.c +++ b/sys/dev/dpt/dpt_pci.c @@ -133,7 +133,7 @@ dpt_pci_attach (device_t dev) /* Allocate a dmatag representing the capabilities of this attachment */ /* XXX Should be a child of the PCI bus dma tag */ - if (bus_dma_tag_create( /* parent */ NULL, + if (bus_dma_tag_create( /* PCI parent */ bus_get_dma_tag(dev), /* alignemnt */ 1, /* boundary */ 0, /* lowaddr */ BUS_SPACE_MAXADDR_32BIT, diff --git a/sys/dev/hifn/hifn7751.c b/sys/dev/hifn/hifn7751.c index 7e3a65f7931c..ecb12397cda9 100644 --- a/sys/dev/hifn/hifn7751.c +++ b/sys/dev/hifn/hifn7751.c @@ -431,7 +431,7 @@ hifn_attach(device_t dev) * Setup the area where the Hifn DMA's descriptors * and associated data structures. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* PCI parent */ 1, 0, /* alignment,boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ diff --git a/sys/dev/hptiop/hptiop.c b/sys/dev/hptiop/hptiop.c index 035cf07a0492..188ab8097572 100644 --- a/sys/dev/hptiop/hptiop.c +++ b/sys/dev/hptiop/hptiop.c @@ -1358,7 +1358,7 @@ static int hptiop_attach(device_t dev) mtx_init(&hba->lock, "hptioplock", NULL, MTX_DEF); #endif - if (bus_dma_tag_create(NULL,/* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev),/* PCI parent */ 1, /* alignment */ 0, /* boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ diff --git a/sys/dev/hptmv/entry.c b/sys/dev/hptmv/entry.c index 4c61e655898c..f525b1f98fed 100644 --- a/sys/dev/hptmv/entry.c +++ b/sys/dev/hptmv/entry.c @@ -1326,7 +1326,7 @@ init_adapter(IAL_ADAPTER_T *pAdapter) _vbus_p->OsExt = (void *)pAdapter; pMvSataAdapter->IALData = pAdapter; - if (bus_dma_tag_create(NULL,/* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(pAdapter->hpt_dev),/* parent */ 4, /* alignment */ BUS_SPACE_MAXADDR_32BIT+1, /* boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ diff --git a/sys/dev/ida/ida_pci.c b/sys/dev/ida/ida_pci.c index e71c6d4be897..bb6088f24161 100644 --- a/sys/dev/ida/ida_pci.c +++ b/sys/dev/ida/ida_pci.c @@ -267,7 +267,7 @@ ida_pci_attach(device_t dev) } error = bus_dma_tag_create( - /* parent */ NULL, + /* parent */ bus_get_dma_tag(dev), /* alignment */ 1, /* boundary */ 0, /* lowaddr */ BUS_SPACE_MAXADDR_32BIT, diff --git a/sys/dev/if_ndis/if_ndis_pci.c b/sys/dev/if_ndis/if_ndis_pci.c index 2b9ad1ef3993..a71b5da92554 100644 --- a/sys/dev/if_ndis/if_ndis_pci.c +++ b/sys/dev/if_ndis/if_ndis_pci.c @@ -290,7 +290,7 @@ ndis_attach_pci(dev) * Allocate the parent bus DMA tag appropriate for PCI. */ #define NDIS_NSEG_NEW 32 - error = bus_dma_tag_create(NULL, /* parent */ + error = bus_dma_tag_create(bus_get_dma_tag(dev),/* PCI parent */ 1, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ diff --git a/sys/dev/iir/iir_pci.c b/sys/dev/iir/iir_pci.c index 19d09c619fd8..662f06bc3b2f 100644 --- a/sys/dev/iir/iir_pci.c +++ b/sys/dev/iir/iir_pci.c @@ -318,7 +318,8 @@ iir_pci_attach(device_t dev) /* Allocate a dmatag representing the capabilities of this attachment */ /* XXX Should be a child of the PCI bus dma tag */ - if (bus_dma_tag_create(/*parent*/NULL, /*alignemnt*/1, /*boundary*/0, + if (bus_dma_tag_create(/*parent*/bus_get_dma_tag(dev), + /*alignemnt*/1, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, diff --git a/sys/dev/ips/ips_pci.c b/sys/dev/ips/ips_pci.c index 9781087891d1..d39f4acbf65c 100644 --- a/sys/dev/ips/ips_pci.c +++ b/sys/dev/ips/ips_pci.c @@ -135,7 +135,7 @@ static int ips_pci_attach(device_t dev) device_printf(dev, "irq setup failed\n"); goto error; } - if (bus_dma_tag_create( /* parent */ NULL, + if (bus_dma_tag_create( /* PCI parent */bus_get_dma_tag(dev), /* alignemnt */ 1, /* boundary */ 0, /* lowaddr */ BUS_SPACE_MAXADDR_32BIT, diff --git a/sys/dev/mfi/mfi_pci.c b/sys/dev/mfi/mfi_pci.c index 952ab1a3f467..30db74bd5967 100644 --- a/sys/dev/mfi/mfi_pci.c +++ b/sys/dev/mfi/mfi_pci.c @@ -216,7 +216,7 @@ mfi_pci_attach(device_t dev) error = ENOMEM; /* Allocate parent DMA tag */ - if (bus_dma_tag_create( NULL, /* parent */ + if (bus_dma_tag_create( bus_get_dma_tag(dev), /* PCI parent */ 1, 0, /* algnmnt, boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ diff --git a/sys/dev/mlx/mlx_pci.c b/sys/dev/mlx/mlx_pci.c index 00d0fe2bac0f..92ad8781a653 100644 --- a/sys/dev/mlx/mlx_pci.c +++ b/sys/dev/mlx/mlx_pci.c @@ -189,7 +189,7 @@ mlx_pci_attach(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(dev), /* PCI parent */ 1, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ diff --git a/sys/dev/mly/mly.c b/sys/dev/mly/mly.c index ee73ae9b9736..826b89dd48d6 100644 --- a/sys/dev/mly/mly.c +++ b/sys/dev/mly/mly.c @@ -392,7 +392,7 @@ mly_pci_attach(struct mly_softc *sc) * * Note that all of these controllers are 64-bit capable. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(sc->mly_dev),/* PCI parent */ 1, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ diff --git a/sys/dev/twe/twe_freebsd.c b/sys/dev/twe/twe_freebsd.c index 29dab580d9dc..6c31d6a07940 100644 --- a/sys/dev/twe/twe_freebsd.c +++ b/sys/dev/twe/twe_freebsd.c @@ -225,7 +225,7 @@ twe_attach(device_t dev) /* * Allocate the parent bus DMA tag appropriate for PCI. */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* PCI parent */ 1, 0, /* alignment, boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ diff --git a/sys/dev/tws/tws.c b/sys/dev/tws/tws.c index ba3b1505a42b..b1615db07d26 100644 --- a/sys/dev/tws/tws.c +++ b/sys/dev/tws/tws.c @@ -521,7 +521,7 @@ tws_init(struct tws_softc *sc) TWS_MAX_32BIT_SG_ELEMENTS; dma_mem_size = (sizeof(struct tws_command_packet) * tws_queue_depth) + (TWS_SECTOR_SIZE) ; - if ( bus_dma_tag_create(NULL, /* parent */ + if ( bus_dma_tag_create(bus_get_dma_tag(sc->tws_dev), /* PCI parent */ TWS_ALIGNMENT, /* alignment */ 0, /* boundary */ BUS_SPACE_MAXADDR_32BIT, /* lowaddr */