aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/8139too.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-08-08 02:16:04 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:50:22 -0400
commit6cc92cddb13a7874dcd7751c84b0e61738815077 (patch)
tree9e33135f1ed5f4ad80e240d86f725e0207d2f030 /drivers/net/8139too.c
parentae94607d19028f9805e82da8975c66d3858fcfd8 (diff)
[netdrvr] 8139cp, 8139too: convert to generic DMA
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/8139too.c')
-rw-r--r--drivers/net/8139too.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c
index 20af6baecfcb..76d3048a1a63 100644
--- a/drivers/net/8139too.c
+++ b/drivers/net/8139too.c
@@ -1316,18 +1316,18 @@ static int rtl8139_open (struct net_device *dev)
1316 if (retval) 1316 if (retval)
1317 return retval; 1317 return retval;
1318 1318
1319 tp->tx_bufs = pci_alloc_consistent(tp->pci_dev, TX_BUF_TOT_LEN, 1319 tp->tx_bufs = dma_alloc_coherent(&tp->pci_dev->dev, TX_BUF_TOT_LEN,
1320 &tp->tx_bufs_dma); 1320 &tp->tx_bufs_dma, GFP_KERNEL);
1321 tp->rx_ring = pci_alloc_consistent(tp->pci_dev, RX_BUF_TOT_LEN, 1321 tp->rx_ring = dma_alloc_coherent(&tp->pci_dev->dev, RX_BUF_TOT_LEN,
1322 &tp->rx_ring_dma); 1322 &tp->rx_ring_dma, GFP_KERNEL);
1323 if (tp->tx_bufs == NULL || tp->rx_ring == NULL) { 1323 if (tp->tx_bufs == NULL || tp->rx_ring == NULL) {
1324 free_irq(dev->irq, dev); 1324 free_irq(dev->irq, dev);
1325 1325
1326 if (tp->tx_bufs) 1326 if (tp->tx_bufs)
1327 pci_free_consistent(tp->pci_dev, TX_BUF_TOT_LEN, 1327 dma_free_coherent(&tp->pci_dev->dev, TX_BUF_TOT_LEN,
1328 tp->tx_bufs, tp->tx_bufs_dma); 1328 tp->tx_bufs, tp->tx_bufs_dma);
1329 if (tp->rx_ring) 1329 if (tp->rx_ring)
1330 pci_free_consistent(tp->pci_dev, RX_BUF_TOT_LEN, 1330 dma_free_coherent(&tp->pci_dev->dev, RX_BUF_TOT_LEN,
1331 tp->rx_ring, tp->rx_ring_dma); 1331 tp->rx_ring, tp->rx_ring_dma);
1332 1332
1333 return -ENOMEM; 1333 return -ENOMEM;
@@ -2246,10 +2246,10 @@ static int rtl8139_close (struct net_device *dev)
2246 2246
2247 rtl8139_tx_clear (tp); 2247 rtl8139_tx_clear (tp);
2248 2248
2249 pci_free_consistent(tp->pci_dev, RX_BUF_TOT_LEN, 2249 dma_free_coherent(&tp->pci_dev->dev, RX_BUF_TOT_LEN,
2250 tp->rx_ring, tp->rx_ring_dma); 2250 tp->rx_ring, tp->rx_ring_dma);
2251 pci_free_consistent(tp->pci_dev, TX_BUF_TOT_LEN, 2251 dma_free_coherent(&tp->pci_dev->dev, TX_BUF_TOT_LEN,
2252 tp->tx_bufs, tp->tx_bufs_dma); 2252 tp->tx_bufs, tp->tx_bufs_dma);
2253 tp->rx_ring = NULL; 2253 tp->rx_ring = NULL;
2254 tp->tx_bufs = NULL; 2254 tp->tx_bufs = NULL;
2255 2255