Convert a number of drivers to obtaining their parent DMA tag from their

PCI device attachment.
This commit is contained in:
Scott Long 2012-03-12 08:03:51 +00:00
parent 312af517e3
commit b6f97155cc
23 changed files with 25 additions and 23 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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 :

View File

@ -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 */

View File

@ -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,

View File

@ -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 */

View File

@ -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,

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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,

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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,

View File

@ -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 */

View File

@ -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,

View File

@ -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,

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */