* [PATCH] cxgb3: simplify need_skb_unmap
@ 2010-07-08 9:52 FUJITA Tomonori
2010-07-09 6:08 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: FUJITA Tomonori @ 2010-07-08 9:52 UTC (permalink / raw)
To: netdev; +Cc: divy
We can use CONFIG_NEED_DMA_MAP_STATE to see if a platform does real
DMA unmapping.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
drivers/net/cxgb3/sge.c | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c
index 5962b91..8ff96c6 100644
--- a/drivers/net/cxgb3/sge.c
+++ b/drivers/net/cxgb3/sge.c
@@ -203,15 +203,11 @@ static inline void refill_rspq(struct adapter *adapter,
*/
static inline int need_skb_unmap(void)
{
- /*
- * This structure is used to tell if the platform needs buffer
- * unmapping by checking if DECLARE_PCI_UNMAP_ADDR defines anything.
- */
- struct dummy {
- DEFINE_DMA_UNMAP_ADDR(addr);
- };
-
- return sizeof(struct dummy) != 0;
+#ifdef CONFIG_NEED_DMA_MAP_STATE
+ return 1;
+#else
+ return 0;
+#endif
}
/**
--
1.6.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] cxgb3: simplify need_skb_unmap
2010-07-08 9:52 [PATCH] cxgb3: simplify need_skb_unmap FUJITA Tomonori
@ 2010-07-09 6:08 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-07-09 6:08 UTC (permalink / raw)
To: fujita.tomonori; +Cc: netdev, divy
From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Date: Thu, 8 Jul 2010 18:52:38 +0900
> We can use CONFIG_NEED_DMA_MAP_STATE to see if a platform does real
> DMA unmapping.
>
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-07-09 6:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-08 9:52 [PATCH] cxgb3: simplify need_skb_unmap FUJITA Tomonori
2010-07-09 6:08 ` 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).