summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/i825xx/lib82596.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-06-14 10:33:48 +0200
committerChristoph Hellwig <hch@lst.de>2017-08-29 10:03:45 +0200
commit7f683b920479530150cafbed9dc02eeafb90486b (patch)
tree3c8880c9def0428b0fef825ed33daa6d49d4aaa2 /drivers/net/ethernet/i825xx/lib82596.c
parentau1000_eth: switch to dma_alloc_attrs (diff)
downloadlinux-7f683b920479530150cafbed9dc02eeafb90486b.tar.xz
linux-7f683b920479530150cafbed9dc02eeafb90486b.zip
i825xx: switch to switch to dma_alloc_attrs
This way we can always pass DMA_ATTR_NON_CONSISTENT, the SNI mips version will simply ignore the flag. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/i825xx/lib82596.c')
-rw-r--r--drivers/net/ethernet/i825xx/lib82596.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/ethernet/i825xx/lib82596.c b/drivers/net/ethernet/i825xx/lib82596.c
index 8449c58f01fd..f00a1dc2128c 100644
--- a/drivers/net/ethernet/i825xx/lib82596.c
+++ b/drivers/net/ethernet/i825xx/lib82596.c
@@ -1063,8 +1063,9 @@ static int i82596_probe(struct net_device *dev)
if (!dev->base_addr || !dev->irq)
return -ENODEV;
- dma = (struct i596_dma *) DMA_ALLOC(dev->dev.parent,
- sizeof(struct i596_dma), &lp->dma_addr, GFP_KERNEL);
+ dma = dma_alloc_attrs(dev->dev.parent, sizeof(struct i596_dma),
+ &lp->dma_addr, GFP_KERNEL,
+ DMA_ATTR_NON_CONSISTENT);
if (!dma) {
printk(KERN_ERR "%s: Couldn't get shared memory\n", __FILE__);
return -ENOMEM;
@@ -1085,8 +1086,8 @@ static int i82596_probe(struct net_device *dev)
i = register_netdev(dev);
if (i) {
- DMA_FREE(dev->dev.parent, sizeof(struct i596_dma),
- (void *)dma, lp->dma_addr);
+ dma_free_attrs(dev->dev.parent, sizeof(struct i596_dma),
+ dma, lp->dma_addr, DMA_ATTR_NON_CONSISTENT);
return i;
}