Page MenuHomeFreeBSD

D42607.diff
No OneTemporary

D42607.diff

diff --git a/sys/dev/mpi3mr/mpi3mr_pci.c b/sys/dev/mpi3mr/mpi3mr_pci.c
--- a/sys/dev/mpi3mr/mpi3mr_pci.c
+++ b/sys/dev/mpi3mr/mpi3mr_pci.c
@@ -256,6 +256,7 @@
static int mpi3mr_setup_resources(struct mpi3mr_softc *sc)
{
+ bus_dma_template_t t;
int i;
device_t dev = sc->mpi3mr_dev;
@@ -288,20 +289,11 @@
* dma_mask on the device.
*/
/* Allocate the parent DMA tag */
- if (bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */
- 1, 0, /* algnmnt, boundary */
- BUS_SPACE_MAXADDR, /* lowaddr */
- BUS_SPACE_MAXADDR, /* highaddr */
- NULL, NULL, /* filter, filterarg */
- BUS_SPACE_MAXSIZE_32BIT,/* maxsize */
- BUS_SPACE_UNRESTRICTED, /* nsegments */
- BUS_SPACE_MAXSIZE_32BIT,/* maxsegsize */
- 0, /* flags */
- NULL, NULL, /* lockfunc, lockarg */
- &sc->mpi3mr_parent_dmat)) {
+ bus_dma_template_init(&t, bus_get_dma_tag(dev));
+ if (bus_dma_template_tag(&t, &sc->mpi3mr_parent_dmat)) {
mpi3mr_dprint(sc, MPI3MR_ERROR, "Cannot allocate parent DMA tag\n");
return (ENOMEM);
- }
+ }
sc->max_msix_vectors = pci_msix_count(dev);

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 16, 9:50 PM (21 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14664855
Default Alt Text
D42607.diff (1 KB)

Event Timeline