benet: use the dma state API instead of the pci equivalents
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Thu, 1 Apr 2010 16:53:22 +0000 (16:53 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Apr 2010 03:59:25 +0000 (20:59 -0700)
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>
drivers/net/benet/be.h
drivers/net/benet/be_main.c

index 20842c5fd8fb2aecde85020bf60c873c815edb7d..45037fbd4ff173735a3d0c32fab48a0dd2db2009 100644 (file)
@@ -208,7 +208,7 @@ struct be_tx_obj {
 /* Struct to remember the pages posted for rx frags */
 struct be_rx_page_info {
        struct page *page;
-       dma_addr_t bus;
+       DEFINE_DMA_UNMAP_ADDR(bus);
        u16 page_offset;
        bool last_page_user;
 };
index 49d51965312e8d66328a9f574001b04b97d8e434..833618339d4d64e644b11046880c73a3e2fce584 100644 (file)
@@ -720,7 +720,7 @@ get_rx_page_info(struct be_adapter *adapter, u16 frag_idx)
        BUG_ON(!rx_page_info->page);
 
        if (rx_page_info->last_page_user) {
-               pci_unmap_page(adapter->pdev, pci_unmap_addr(rx_page_info, bus),
+               pci_unmap_page(adapter->pdev, dma_unmap_addr(rx_page_info, bus),
                        adapter->big_page_size, PCI_DMA_FROMDEVICE);
                rx_page_info->last_page_user = false;
        }
@@ -1031,7 +1031,7 @@ static void be_post_rx_frags(struct be_adapter *adapter)
                }
                page_offset = page_info->page_offset;
                page_info->page = pagep;
-               pci_unmap_addr_set(page_info, bus, page_dmaaddr);
+               dma_unmap_addr_set(page_info, bus, page_dmaaddr);
                frag_dmaaddr = page_dmaaddr + page_info->page_offset;
 
                rxd = queue_head_node(rxq);