diff options
author | David S. Miller <davem@davemloft.net> | 2008-08-27 18:09:11 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-08-29 02:13:15 -0700 |
commit | 738f2b7b813913e651f39387d007dd961755dee2 (patch) | |
tree | 022ca4d144cba51495e6f26a8f55d3046d16c2e3 /drivers/net/sunqe.c | |
parent | 944c67dff7a88f0a775e5b604937f9e30d2de555 (diff) | |
download | linux-3.10-738f2b7b813913e651f39387d007dd961755dee2.tar.gz linux-3.10-738f2b7b813913e651f39387d007dd961755dee2.tar.bz2 linux-3.10-738f2b7b813913e651f39387d007dd961755dee2.zip |
sparc: Convert all SBUS drivers to dma_*() interfaces.
And all the SBUS dma interfaces are deleted.
A private implementation remains inside of the 32-bit sparc port which
exists only for the sake of the implementation of dma_*().
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sunqe.c')
-rw-r--r-- | drivers/net/sunqe.c | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/drivers/net/sunqe.c b/drivers/net/sunqe.c index ac8049cab24..66f66ee8ca6 100644 --- a/drivers/net/sunqe.c +++ b/drivers/net/sunqe.c @@ -24,6 +24,7 @@ #include <linux/skbuff.h> #include <linux/ethtool.h> #include <linux/bitops.h> +#include <linux/dma-mapping.h> #include <asm/system.h> #include <asm/io.h> @@ -879,12 +880,12 @@ static int __devinit qec_ether_init(struct sbus_dev *sdev) goto fail; } - qe->qe_block = sbus_alloc_consistent(&qe->qe_sdev->ofdev.dev, - PAGE_SIZE, - &qe->qblock_dvma); - qe->buffers = sbus_alloc_consistent(&qe->qe_sdev->ofdev.dev, - sizeof(struct sunqe_buffers), - &qe->buffers_dvma); + qe->qe_block = dma_alloc_coherent(&qe->qe_sdev->ofdev.dev, + PAGE_SIZE, + &qe->qblock_dvma, GFP_ATOMIC); + qe->buffers = dma_alloc_coherent(&qe->qe_sdev->ofdev.dev, + sizeof(struct sunqe_buffers), + &qe->buffers_dvma, GFP_ATOMIC); if (qe->qe_block == NULL || qe->qblock_dvma == 0 || qe->buffers == NULL || qe->buffers_dvma == 0) goto fail; @@ -926,15 +927,15 @@ fail: if (qe->mregs) sbus_iounmap(qe->mregs, MREGS_REG_SIZE); if (qe->qe_block) - sbus_free_consistent(&qe->qe_sdev->ofdev.dev, - PAGE_SIZE, - qe->qe_block, - qe->qblock_dvma); + dma_free_coherent(&qe->qe_sdev->ofdev.dev, + PAGE_SIZE, + qe->qe_block, + qe->qblock_dvma); if (qe->buffers) - sbus_free_consistent(&qe->qe_sdev->ofdev.dev, - sizeof(struct sunqe_buffers), - qe->buffers, - qe->buffers_dvma); + dma_free_coherent(&qe->qe_sdev->ofdev.dev, + sizeof(struct sunqe_buffers), + qe->buffers, + qe->buffers_dvma); free_netdev(dev); @@ -957,14 +958,14 @@ static int __devexit qec_sbus_remove(struct of_device *dev) sbus_iounmap(qp->qcregs, CREG_REG_SIZE); sbus_iounmap(qp->mregs, MREGS_REG_SIZE); - sbus_free_consistent(&qp->qe_sdev->ofdev.dev, - PAGE_SIZE, - qp->qe_block, - qp->qblock_dvma); - sbus_free_consistent(&qp->qe_sdev->ofdev.dev, - sizeof(struct sunqe_buffers), - qp->buffers, - qp->buffers_dvma); + dma_free_coherent(&qp->qe_sdev->ofdev.dev, + PAGE_SIZE, + qp->qe_block, + qp->qblock_dvma); + dma_free_coherent(&qp->qe_sdev->ofdev.dev, + sizeof(struct sunqe_buffers), + qp->buffers, + qp->buffers_dvma); free_netdev(net_dev); |