Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

au1000_eth: switch to dma_alloc_attrs

Use dma_alloc_attrs directly instead of the dma_alloc_noncoherent wrapper.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: David S. Miller <davem@davemloft.net>

+10 -8
+10 -8
drivers/net/ethernet/amd/au1000_eth.c
··· 1180 1180 /* Allocate the data buffers 1181 1181 * Snooping works fine with eth on all au1xxx 1182 1182 */ 1183 - aup->vaddr = (u32)dma_alloc_noncoherent(NULL, MAX_BUF_SIZE * 1184 - (NUM_TX_BUFFS + NUM_RX_BUFFS), 1185 - &aup->dma_addr, 0); 1183 + aup->vaddr = (u32)dma_alloc_attrs(NULL, MAX_BUF_SIZE * 1184 + (NUM_TX_BUFFS + NUM_RX_BUFFS), 1185 + &aup->dma_addr, 0, 1186 + DMA_ATTR_NON_CONSISTENT); 1186 1187 if (!aup->vaddr) { 1187 1188 dev_err(&pdev->dev, "failed to allocate data buffers\n"); 1188 1189 err = -ENOMEM; ··· 1362 1361 err_remap2: 1363 1362 iounmap(aup->mac); 1364 1363 err_remap1: 1365 - dma_free_noncoherent(NULL, MAX_BUF_SIZE * (NUM_TX_BUFFS + NUM_RX_BUFFS), 1366 - (void *)aup->vaddr, aup->dma_addr); 1364 + dma_free_attrs(NULL, MAX_BUF_SIZE * (NUM_TX_BUFFS + NUM_RX_BUFFS), 1365 + (void *)aup->vaddr, aup->dma_addr, 1366 + DMA_ATTR_NON_CONSISTENT); 1367 1367 err_vaddr: 1368 1368 free_netdev(dev); 1369 1369 err_alloc: ··· 1396 1394 if (aup->tx_db_inuse[i]) 1397 1395 au1000_ReleaseDB(aup, aup->tx_db_inuse[i]); 1398 1396 1399 - dma_free_noncoherent(NULL, MAX_BUF_SIZE * 1400 - (NUM_TX_BUFFS + NUM_RX_BUFFS), 1401 - (void *)aup->vaddr, aup->dma_addr); 1397 + dma_free_attrs(NULL, MAX_BUF_SIZE * (NUM_TX_BUFFS + NUM_RX_BUFFS), 1398 + (void *)aup->vaddr, aup->dma_addr, 1399 + DMA_ATTR_NON_CONSISTENT); 1402 1400 1403 1401 iounmap(aup->macdma); 1404 1402 iounmap(aup->mac);