aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sunqe.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-08-27 21:09:11 -0400
committerDavid S. Miller <davem@davemloft.net>2008-08-29 05:13:15 -0400
commit738f2b7b813913e651f39387d007dd961755dee2 (patch)
tree022ca4d144cba51495e6f26a8f55d3046d16c2e3 /drivers/net/sunqe.c
parent944c67dff7a88f0a775e5b604937f9e30d2de555 (diff)
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.c45
1 files changed, 23 insertions, 22 deletions
diff --git a/drivers/net/sunqe.c b/drivers/net/sunqe.c
index ac8049cab247..66f66ee8ca63 100644
--- a/drivers/net/sunqe.c
+++ b/drivers/net/sunqe.c
@@ -24,6 +24,7 @@
24#include <linux/skbuff.h> 24#include <linux/skbuff.h>
25#include <linux/ethtool.h> 25#include <linux/ethtool.h>
26#include <linux/bitops.h> 26#include <linux/bitops.h>
27#include <linux/dma-mapping.h>
27 28
28#include <asm/system.h> 29#include <asm/system.h>
29#include <asm/io.h> 30#include <asm/io.h>
@@ -879,12 +880,12 @@ static int __devinit qec_ether_init(struct sbus_dev *sdev)
879 goto fail; 880 goto fail;
880 } 881 }
881 882
882 qe->qe_block = sbus_alloc_consistent(&qe->qe_sdev->ofdev.dev, 883 qe->qe_block = dma_alloc_coherent(&qe->qe_sdev->ofdev.dev,
883 PAGE_SIZE, 884 PAGE_SIZE,
884 &qe->qblock_dvma); 885 &qe->qblock_dvma, GFP_ATOMIC);
885 qe->buffers = sbus_alloc_consistent(&qe->qe_sdev->ofdev.dev, 886 qe->buffers = dma_alloc_coherent(&qe->qe_sdev->ofdev.dev,
886 sizeof(struct sunqe_buffers), 887 sizeof(struct sunqe_buffers),
887 &qe->buffers_dvma); 888 &qe->buffers_dvma, GFP_ATOMIC);
888 if (qe->qe_block == NULL || qe->qblock_dvma == 0 || 889 if (qe->qe_block == NULL || qe->qblock_dvma == 0 ||
889 qe->buffers == NULL || qe->buffers_dvma == 0) 890 qe->buffers == NULL || qe->buffers_dvma == 0)
890 goto fail; 891 goto fail;
@@ -926,15 +927,15 @@ fail:
926 if (qe->mregs) 927 if (qe->mregs)
927 sbus_iounmap(qe->mregs, MREGS_REG_SIZE); 928 sbus_iounmap(qe->mregs, MREGS_REG_SIZE);
928 if (qe->qe_block) 929 if (qe->qe_block)
929 sbus_free_consistent(&qe->qe_sdev->ofdev.dev, 930 dma_free_coherent(&qe->qe_sdev->ofdev.dev,
930 PAGE_SIZE, 931 PAGE_SIZE,
931 qe->qe_block, 932 qe->qe_block,
932 qe->qblock_dvma); 933 qe->qblock_dvma);
933 if (qe->buffers) 934 if (qe->buffers)
934 sbus_free_consistent(&qe->qe_sdev->ofdev.dev, 935 dma_free_coherent(&qe->qe_sdev->ofdev.dev,
935 sizeof(struct sunqe_buffers), 936 sizeof(struct sunqe_buffers),
936 qe->buffers, 937 qe->buffers,
937 qe->buffers_dvma); 938 qe->buffers_dvma);
938 939
939 free_netdev(dev); 940 free_netdev(dev);
940 941
@@ -957,14 +958,14 @@ static int __devexit qec_sbus_remove(struct of_device *dev)
957 958
958 sbus_iounmap(qp->qcregs, CREG_REG_SIZE); 959 sbus_iounmap(qp->qcregs, CREG_REG_SIZE);
959 sbus_iounmap(qp->mregs, MREGS_REG_SIZE); 960 sbus_iounmap(qp->mregs, MREGS_REG_SIZE);
960 sbus_free_consistent(&qp->qe_sdev->ofdev.dev, 961 dma_free_coherent(&qp->qe_sdev->ofdev.dev,
961 PAGE_SIZE, 962 PAGE_SIZE,
962 qp->qe_block, 963 qp->qe_block,
963 qp->qblock_dvma); 964 qp->qblock_dvma);
964 sbus_free_consistent(&qp->qe_sdev->ofdev.dev, 965 dma_free_coherent(&qp->qe_sdev->ofdev.dev,
965 sizeof(struct sunqe_buffers), 966 sizeof(struct sunqe_buffers),
966 qp->buffers, 967 qp->buffers,
967 qp->buffers_dvma); 968 qp->buffers_dvma);
968 969
969 free_netdev(net_dev); 970 free_netdev(net_dev);
970 971