summaryrefslogtreecommitdiffstats
path: root/sys/dev/fxp
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2007-01-21 19:32:51 +0000
committermarius <marius@FreeBSD.org>2007-01-21 19:32:51 +0000
commit95a9b2142ae1f23ba99ffffc7acc4055f2c40cea (patch)
tree0022c3a9a6df560b7e242e09f139c9d0dd23011b /sys/dev/fxp
parent32ccb0b9691d9721a82fc29bc9002a655b8622b6 (diff)
downloadFreeBSD-src-95a9b2142ae1f23ba99ffffc7acc4055f2c40cea.zip
FreeBSD-src-95a9b2142ae1f23ba99ffffc7acc4055f2c40cea.tar.gz
Change the remainder of the drivers for DMA'ing devices enabled in the
sparc64 GENERIC and the sound device drivers known working on sparc64 to use bus_get_dma_tag() to obtain the parent DMA tag so we can get rid of the sparc64_root_dma_tag kludge eventually. Except for ath(4), sk(4), stge(4) and ti(4) these changes are runtime tested (unless I booted up the wrong kernels again...).
Diffstat (limited to 'sys/dev/fxp')
-rw-r--r--sys/dev/fxp/if_fxp.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index a1500cc..630ffd7 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -612,19 +612,19 @@ fxp_attach(device_t dev)
sc->maxtxseg = FXP_NTXSEG;
if (sc->flags & FXP_FLAG_EXT_RFA)
sc->maxtxseg--;
- error = bus_dma_tag_create(NULL, 2, 0, BUS_SPACE_MAXADDR_32BIT,
- BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES * sc->maxtxseg,
- sc->maxtxseg, MCLBYTES, 0, busdma_lock_mutex, &Giant,
- &sc->fxp_mtag);
+ error = bus_dma_tag_create(bus_get_dma_tag(dev), 2, 0,
+ BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
+ MCLBYTES * sc->maxtxseg, sc->maxtxseg, MCLBYTES, 0,
+ busdma_lock_mutex, &Giant, &sc->fxp_mtag);
if (error) {
device_printf(dev, "could not allocate dma tag\n");
goto fail;
}
- error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT,
- BUS_SPACE_MAXADDR, NULL, NULL, sizeof(struct fxp_stats), 1,
- sizeof(struct fxp_stats), 0, busdma_lock_mutex, &Giant,
- &sc->fxp_stag);
+ error = bus_dma_tag_create(bus_get_dma_tag(dev), 4, 0,
+ BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
+ sizeof(struct fxp_stats), 1, sizeof(struct fxp_stats), 0,
+ busdma_lock_mutex, &Giant, &sc->fxp_stag);
if (error) {
device_printf(dev, "could not allocate dma tag\n");
goto fail;
@@ -641,9 +641,10 @@ fxp_attach(device_t dev)
goto fail;
}
- error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT,
- BUS_SPACE_MAXADDR, NULL, NULL, FXP_TXCB_SZ, 1,
- FXP_TXCB_SZ, 0, busdma_lock_mutex, &Giant, &sc->cbl_tag);
+ error = bus_dma_tag_create(bus_get_dma_tag(dev), 4, 0,
+ BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
+ FXP_TXCB_SZ, 1, FXP_TXCB_SZ, 0,
+ busdma_lock_mutex, &Giant, &sc->cbl_tag);
if (error) {
device_printf(dev, "could not allocate dma tag\n");
goto fail;
@@ -662,10 +663,10 @@ fxp_attach(device_t dev)
goto fail;
}
- error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT,
- BUS_SPACE_MAXADDR, NULL, NULL, sizeof(struct fxp_cb_mcs), 1,
- sizeof(struct fxp_cb_mcs), 0, busdma_lock_mutex, &Giant,
- &sc->mcs_tag);
+ error = bus_dma_tag_create(bus_get_dma_tag(dev), 4, 0,
+ BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
+ sizeof(struct fxp_cb_mcs), 1, sizeof(struct fxp_cb_mcs), 0,
+ busdma_lock_mutex, &Giant, &sc->mcs_tag);
if (error) {
device_printf(dev, "could not allocate dma tag\n");
goto fail;
OpenPOWER on IntegriCloud