diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2010-04-27 09:09:25 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-27 19:29:50 -0400 |
commit | 59d71989352deb71bc0bba83802820de765f6e25 (patch) | |
tree | 817ace76d6535316468983cf8d96cd685ba0be12 /drivers/net/igb/igb_ethtool.c | |
parent | 0be3f55f8aa5f9d1882255128bd79d4885b0cbe4 (diff) |
igb: convert igb from using PCI DMA functions to using DMA API functions
This patch makes it so that igb now uses the DMA API functions instead of
the PCI API functions. To do this the pci_dev pointer that was in the
rings has been replaced with a device pointer, and as a result all
references to [tr]x_ring->pdev have been replaced with [tr]x_ring->dev.
This patch is based of of work originally done by Nicholas Nunley.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/igb/igb_ethtool.c')
-rw-r--r-- | drivers/net/igb/igb_ethtool.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c index 1b8fd7f4064d..f2ebf927e4bc 100644 --- a/drivers/net/igb/igb_ethtool.c +++ b/drivers/net/igb/igb_ethtool.c | |||
@@ -1394,7 +1394,7 @@ static int igb_setup_desc_rings(struct igb_adapter *adapter) | |||
1394 | 1394 | ||
1395 | /* Setup Tx descriptor ring and Tx buffers */ | 1395 | /* Setup Tx descriptor ring and Tx buffers */ |
1396 | tx_ring->count = IGB_DEFAULT_TXD; | 1396 | tx_ring->count = IGB_DEFAULT_TXD; |
1397 | tx_ring->pdev = adapter->pdev; | 1397 | tx_ring->dev = &adapter->pdev->dev; |
1398 | tx_ring->netdev = adapter->netdev; | 1398 | tx_ring->netdev = adapter->netdev; |
1399 | tx_ring->reg_idx = adapter->vfs_allocated_count; | 1399 | tx_ring->reg_idx = adapter->vfs_allocated_count; |
1400 | 1400 | ||
@@ -1408,7 +1408,7 @@ static int igb_setup_desc_rings(struct igb_adapter *adapter) | |||
1408 | 1408 | ||
1409 | /* Setup Rx descriptor ring and Rx buffers */ | 1409 | /* Setup Rx descriptor ring and Rx buffers */ |
1410 | rx_ring->count = IGB_DEFAULT_RXD; | 1410 | rx_ring->count = IGB_DEFAULT_RXD; |
1411 | rx_ring->pdev = adapter->pdev; | 1411 | rx_ring->dev = &adapter->pdev->dev; |
1412 | rx_ring->netdev = adapter->netdev; | 1412 | rx_ring->netdev = adapter->netdev; |
1413 | rx_ring->rx_buffer_len = IGB_RXBUFFER_2048; | 1413 | rx_ring->rx_buffer_len = IGB_RXBUFFER_2048; |
1414 | rx_ring->reg_idx = adapter->vfs_allocated_count; | 1414 | rx_ring->reg_idx = adapter->vfs_allocated_count; |
@@ -1604,10 +1604,10 @@ static int igb_clean_test_rings(struct igb_ring *rx_ring, | |||
1604 | buffer_info = &rx_ring->buffer_info[rx_ntc]; | 1604 | buffer_info = &rx_ring->buffer_info[rx_ntc]; |
1605 | 1605 | ||
1606 | /* unmap rx buffer, will be remapped by alloc_rx_buffers */ | 1606 | /* unmap rx buffer, will be remapped by alloc_rx_buffers */ |
1607 | pci_unmap_single(rx_ring->pdev, | 1607 | dma_unmap_single(rx_ring->dev, |
1608 | buffer_info->dma, | 1608 | buffer_info->dma, |
1609 | rx_ring->rx_buffer_len, | 1609 | rx_ring->rx_buffer_len, |
1610 | PCI_DMA_FROMDEVICE); | 1610 | DMA_FROM_DEVICE); |
1611 | buffer_info->dma = 0; | 1611 | buffer_info->dma = 0; |
1612 | 1612 | ||
1613 | /* verify contents of skb */ | 1613 | /* verify contents of skb */ |