netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] benet: use the dma state API instead of the pci equivalents
@ 2010-04-02  2:53 FUJITA Tomonori
  2010-04-02  2:53 ` [PATCH 2/2] benet: fix the misusage of zero dma address FUJITA Tomonori
  2010-04-05  9:04 ` [PATCH 1/2] benet: use the dma state API instead of the pci equivalents Sathya Perla
  0 siblings, 2 replies; 9+ messages in thread
From: FUJITA Tomonori @ 2010-04-02  2:53 UTC (permalink / raw)
  To: sathyap, subbus; +Cc: sarveshwarb, ajitk, netdev, fujita.tomonori

The DMA API is preferred.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
 drivers/net/benet/be.h      |    2 +-
 drivers/net/benet/be_main.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h
index 8f07525..bddae08 100644
--- a/drivers/net/benet/be.h
+++ b/drivers/net/benet/be.h
@@ -206,7 +206,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;
 };
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 17282df..8d5e27b 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -682,7 +682,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;
 	}
@@ -993,7 +993,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);
-- 
1.7.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-04-08  3:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-02  2:53 [PATCH 1/2] benet: use the dma state API instead of the pci equivalents FUJITA Tomonori
2010-04-02  2:53 ` [PATCH 2/2] benet: fix the misusage of zero dma address FUJITA Tomonori
2010-04-05  7:10   ` Sathya Perla
2010-04-05  7:40     ` FUJITA Tomonori
2010-04-05  8:22       ` Sathya Perla
2010-04-05  8:38         ` FUJITA Tomonori
2010-04-08  3:59         ` David Miller
2010-04-05  9:04 ` [PATCH 1/2] benet: use the dma state API instead of the pci equivalents Sathya Perla
2010-04-08  3:59   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).