aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/benet
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2010-04-01 12:53:22 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-07 23:59:25 -0400
commitfac6da5b7a1b9779ba124ce92314d02378892855 (patch)
tree660e37967f9176b9e078602ecc8f302fad895195 /drivers/net/benet
parentb0cf4dfb7cd21556efd9a6a67edcba0840b4d98d (diff)
benet: use the dma state API instead of the pci equivalents
The DMA API is preferred. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Sathya Perla <sathyap@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/benet')
-rw-r--r--drivers/net/benet/be.h2
-rw-r--r--drivers/net/benet/be_main.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h
index 20842c5fd8fb..45037fbd4ff1 100644
--- a/drivers/net/benet/be.h
+++ b/drivers/net/benet/be.h
@@ -208,7 +208,7 @@ struct be_tx_obj {
208/* Struct to remember the pages posted for rx frags */ 208/* Struct to remember the pages posted for rx frags */
209struct be_rx_page_info { 209struct be_rx_page_info {
210 struct page *page; 210 struct page *page;
211 dma_addr_t bus; 211 DEFINE_DMA_UNMAP_ADDR(bus);
212 u16 page_offset; 212 u16 page_offset;
213 bool last_page_user; 213 bool last_page_user;
214}; 214};
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 49d51965312e..833618339d4d 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -720,7 +720,7 @@ get_rx_page_info(struct be_adapter *adapter, u16 frag_idx)
720 BUG_ON(!rx_page_info->page); 720 BUG_ON(!rx_page_info->page);
721 721
722 if (rx_page_info->last_page_user) { 722 if (rx_page_info->last_page_user) {
723 pci_unmap_page(adapter->pdev, pci_unmap_addr(rx_page_info, bus), 723 pci_unmap_page(adapter->pdev, dma_unmap_addr(rx_page_info, bus),
724 adapter->big_page_size, PCI_DMA_FROMDEVICE); 724 adapter->big_page_size, PCI_DMA_FROMDEVICE);
725 rx_page_info->last_page_user = false; 725 rx_page_info->last_page_user = false;
726 } 726 }
@@ -1031,7 +1031,7 @@ static void be_post_rx_frags(struct be_adapter *adapter)
1031 } 1031 }
1032 page_offset = page_info->page_offset; 1032 page_offset = page_info->page_offset;
1033 page_info->page = pagep; 1033 page_info->page = pagep;
1034 pci_unmap_addr_set(page_info, bus, page_dmaaddr); 1034 dma_unmap_addr_set(page_info, bus, page_dmaaddr);
1035 frag_dmaaddr = page_dmaaddr + page_info->page_offset; 1035 frag_dmaaddr = page_dmaaddr + page_info->page_offset;
1036 1036
1037 rxd = queue_head_node(rxq); 1037 rxd = queue_head_node(rxq);