summaryrefslogtreecommitdiff
path: root/drivers/net/sunlance.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-08-28 05:09:11 +0400
committerDavid S. Miller <davem@davemloft.net>2008-08-29 13:13:15 +0400
commit738f2b7b813913e651f39387d007dd961755dee2 (patch)
tree022ca4d144cba51495e6f26a8f55d3046d16c2e3 /drivers/net/sunlance.c
parent944c67dff7a88f0a775e5b604937f9e30d2de555 (diff)
downloadlinux-738f2b7b813913e651f39387d007dd961755dee2.tar.xz
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/sunlance.c')
-rw-r--r--drivers/net/sunlance.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c
index 4f4baf9f4ec8..65758881d7aa 100644
--- a/drivers/net/sunlance.c
+++ b/drivers/net/sunlance.c
@@ -91,6 +91,7 @@ static char lancestr[] = "LANCE";
#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>
@@ -1283,10 +1284,10 @@ static void lance_free_hwresources(struct lance_private *lp)
sbus_iounmap(lp->init_block_iomem,
sizeof(struct lance_init_block));
} else if (lp->init_block_mem) {
- sbus_free_consistent(&lp->sdev->ofdev.dev,
- sizeof(struct lance_init_block),
- lp->init_block_mem,
- lp->init_block_dvma);
+ dma_free_coherent(&lp->sdev->ofdev.dev,
+ sizeof(struct lance_init_block),
+ lp->init_block_mem,
+ lp->init_block_dvma);
}
}
@@ -1384,9 +1385,9 @@ static int __devinit sparc_lance_probe_one(struct sbus_dev *sdev,
lp->tx = lance_tx_pio;
} else {
lp->init_block_mem =
- sbus_alloc_consistent(&sdev->ofdev.dev,
- sizeof(struct lance_init_block),
- &lp->init_block_dvma);
+ dma_alloc_coherent(&sdev->ofdev.dev,
+ sizeof(struct lance_init_block),
+ &lp->init_block_dvma, GFP_ATOMIC);
if (!lp->init_block_mem || lp->init_block_dvma == 0) {
printk(KERN_ERR "SunLance: Cannot allocate consistent DMA memory.\n");
goto fail;