aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sunlance.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/sunlance.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/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";
91#include <linux/skbuff.h> 91#include <linux/skbuff.h>
92#include <linux/ethtool.h> 92#include <linux/ethtool.h>
93#include <linux/bitops.h> 93#include <linux/bitops.h>
94#include <linux/dma-mapping.h>
94 95
95#include <asm/system.h> 96#include <asm/system.h>
96#include <asm/io.h> 97#include <asm/io.h>
@@ -1283,10 +1284,10 @@ static void lance_free_hwresources(struct lance_private *lp)
1283 sbus_iounmap(lp->init_block_iomem, 1284 sbus_iounmap(lp->init_block_iomem,
1284 sizeof(struct lance_init_block)); 1285 sizeof(struct lance_init_block));
1285 } else if (lp->init_block_mem) { 1286 } else if (lp->init_block_mem) {
1286 sbus_free_consistent(&lp->sdev->ofdev.dev, 1287 dma_free_coherent(&lp->sdev->ofdev.dev,
1287 sizeof(struct lance_init_block), 1288 sizeof(struct lance_init_block),
1288 lp->init_block_mem, 1289 lp->init_block_mem,
1289 lp->init_block_dvma); 1290 lp->init_block_dvma);
1290 } 1291 }
1291} 1292}
1292 1293
@@ -1384,9 +1385,9 @@ static int __devinit sparc_lance_probe_one(struct sbus_dev *sdev,
1384 lp->tx = lance_tx_pio; 1385 lp->tx = lance_tx_pio;
1385 } else { 1386 } else {
1386 lp->init_block_mem = 1387 lp->init_block_mem =
1387 sbus_alloc_consistent(&sdev->ofdev.dev, 1388 dma_alloc_coherent(&sdev->ofdev.dev,
1388 sizeof(struct lance_init_block), 1389 sizeof(struct lance_init_block),
1389 &lp->init_block_dvma); 1390 &lp->init_block_dvma, GFP_ATOMIC);
1390 if (!lp->init_block_mem || lp->init_block_dvma == 0) { 1391 if (!lp->init_block_mem || lp->init_block_dvma == 0) {
1391 printk(KERN_ERR "SunLance: Cannot allocate consistent DMA memory.\n"); 1392 printk(KERN_ERR "SunLance: Cannot allocate consistent DMA memory.\n");
1392 goto fail; 1393 goto fail;