* [PATCH] skge: use the DMA state API instead of the pci equivalents
@ 2010-04-28 0:57 FUJITA Tomonori
2010-05-03 22:32 ` David Miller
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: FUJITA Tomonori @ 2010-04-28 0:57 UTC (permalink / raw)
To: netdev; +Cc: shemminger
This replace the PCI DMA state API (include/linux/pci-dma.h) with the
DMA equivalents since the PCI DMA state API will be obsolete.
No functional change.
For further information about the background:
http://marc.info/?l=linux-netdev&m=127037540020276&w=2
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
drivers/net/skge.c | 32 ++++++++++++++++----------------
drivers/net/skge.h | 4 ++--
2 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index 96eee86..40e5c46 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -984,8 +984,8 @@ static void skge_rx_setup(struct skge_port *skge, struct skge_element *e,
wmb();
rd->control = BMU_OWN | BMU_STF | BMU_IRQ_EOF | BMU_TCP_CHECK | bufsize;
- pci_unmap_addr_set(e, mapaddr, map);
- pci_unmap_len_set(e, maplen, bufsize);
+ dma_unmap_addr_set(e, mapaddr, map);
+ dma_unmap_len_set(e, maplen, bufsize);
}
/* Resume receiving using existing skb,
@@ -1018,8 +1018,8 @@ static void skge_rx_clean(struct skge_port *skge)
rd->control = 0;
if (e->skb) {
pci_unmap_single(hw->pdev,
- pci_unmap_addr(e, mapaddr),
- pci_unmap_len(e, maplen),
+ dma_unmap_addr(e, mapaddr),
+ dma_unmap_len(e, maplen),
PCI_DMA_FROMDEVICE);
dev_kfree_skb(e->skb);
e->skb = NULL;
@@ -2756,8 +2756,8 @@ static netdev_tx_t skge_xmit_frame(struct sk_buff *skb,
e->skb = skb;
len = skb_headlen(skb);
map = pci_map_single(hw->pdev, skb->data, len, PCI_DMA_TODEVICE);
- pci_unmap_addr_set(e, mapaddr, map);
- pci_unmap_len_set(e, maplen, len);
+ dma_unmap_addr_set(e, mapaddr, map);
+ dma_unmap_len_set(e, maplen, len);
td->dma_lo = map;
td->dma_hi = map >> 32;
@@ -2799,8 +2799,8 @@ static netdev_tx_t skge_xmit_frame(struct sk_buff *skb,
tf->dma_lo = map;
tf->dma_hi = (u64) map >> 32;
- pci_unmap_addr_set(e, mapaddr, map);
- pci_unmap_len_set(e, maplen, frag->size);
+ dma_unmap_addr_set(e, mapaddr, map);
+ dma_unmap_len_set(e, maplen, frag->size);
tf->control = BMU_OWN | BMU_SW | control | frag->size;
}
@@ -2837,12 +2837,12 @@ static void skge_tx_free(struct skge_port *skge, struct skge_element *e,
/* skb header vs. fragment */
if (control & BMU_STF)
- pci_unmap_single(pdev, pci_unmap_addr(e, mapaddr),
- pci_unmap_len(e, maplen),
+ pci_unmap_single(pdev, dma_unmap_addr(e, mapaddr),
+ dma_unmap_len(e, maplen),
PCI_DMA_TODEVICE);
else
- pci_unmap_page(pdev, pci_unmap_addr(e, mapaddr),
- pci_unmap_len(e, maplen),
+ pci_unmap_page(pdev, dma_unmap_addr(e, mapaddr),
+ dma_unmap_len(e, maplen),
PCI_DMA_TODEVICE);
if (control & BMU_EOF) {
@@ -3060,11 +3060,11 @@ static struct sk_buff *skge_rx_get(struct net_device *dev,
goto resubmit;
pci_dma_sync_single_for_cpu(skge->hw->pdev,
- pci_unmap_addr(e, mapaddr),
+ dma_unmap_addr(e, mapaddr),
len, PCI_DMA_FROMDEVICE);
skb_copy_from_linear_data(e->skb, skb->data, len);
pci_dma_sync_single_for_device(skge->hw->pdev,
- pci_unmap_addr(e, mapaddr),
+ dma_unmap_addr(e, mapaddr),
len, PCI_DMA_FROMDEVICE);
skge_rx_reuse(e, skge->rx_buf_size);
} else {
@@ -3075,8 +3075,8 @@ static struct sk_buff *skge_rx_get(struct net_device *dev,
goto resubmit;
pci_unmap_single(skge->hw->pdev,
- pci_unmap_addr(e, mapaddr),
- pci_unmap_len(e, maplen),
+ dma_unmap_addr(e, mapaddr),
+ dma_unmap_len(e, maplen),
PCI_DMA_FROMDEVICE);
skb = e->skb;
prefetch(skb->data);
diff --git a/drivers/net/skge.h b/drivers/net/skge.h
index 831de1b..507addc 100644
--- a/drivers/net/skge.h
+++ b/drivers/net/skge.h
@@ -2393,8 +2393,8 @@ struct skge_element {
struct skge_element *next;
void *desc;
struct sk_buff *skb;
- DECLARE_PCI_UNMAP_ADDR(mapaddr);
- DECLARE_PCI_UNMAP_LEN(maplen);
+ DEFINE_DMA_UNMAP_ADDR(mapaddr);
+ DEFINE_DMA_UNMAP_LEN(maplen);
};
struct skge_ring {
--
1.6.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] skge: use the DMA state API instead of the pci equivalents
2010-04-28 0:57 [PATCH] skge: use the DMA state API instead of the pci equivalents FUJITA Tomonori
@ 2010-05-03 22:32 ` David Miller
2010-05-03 23:14 ` Stephen Hemminger
2010-05-13 6:43 ` David Miller
2010-05-15 1:33 ` Stephen Hemminger
2 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2010-05-03 22:32 UTC (permalink / raw)
To: fujita.tomonori; +Cc: netdev, shemminger
From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Date: Wed, 28 Apr 2010 09:57:04 +0900
> This replace the PCI DMA state API (include/linux/pci-dma.h) with the
> DMA equivalents since the PCI DMA state API will be obsolete.
>
> No functional change.
>
> For further information about the background:
>
> http://marc.info/?l=linux-netdev&m=127037540020276&w=2
>
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Stephen have you had a chance to smoke test this yet?
I'd like to apply it as it's been rotting in patchwork
for almost a week now.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] skge: use the DMA state API instead of the pci equivalents
2010-05-03 22:32 ` David Miller
@ 2010-05-03 23:14 ` Stephen Hemminger
0 siblings, 0 replies; 6+ messages in thread
From: Stephen Hemminger @ 2010-05-03 23:14 UTC (permalink / raw)
To: David Miller; +Cc: fujita.tomonori, netdev
On Mon, 03 May 2010 15:32:26 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:
> From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> Date: Wed, 28 Apr 2010 09:57:04 +0900
>
> > This replace the PCI DMA state API (include/linux/pci-dma.h) with the
> > DMA equivalents since the PCI DMA state API will be obsolete.
> >
> > No functional change.
> >
> > For further information about the background:
> >
> > http://marc.info/?l=linux-netdev&m=127037540020276&w=2
> >
> > Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
>
> Stephen have you had a chance to smoke test this yet?
> I'd like to apply it as it's been rotting in patchwork
> for almost a week now.
Let me fire up that box.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] skge: use the DMA state API instead of the pci equivalents
2010-04-28 0:57 [PATCH] skge: use the DMA state API instead of the pci equivalents FUJITA Tomonori
2010-05-03 22:32 ` David Miller
@ 2010-05-13 6:43 ` David Miller
2010-05-15 1:33 ` Stephen Hemminger
2 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2010-05-13 6:43 UTC (permalink / raw)
To: fujita.tomonori; +Cc: netdev, shemminger
From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Date: Wed, 28 Apr 2010 09:57:04 +0900
> This replace the PCI DMA state API (include/linux/pci-dma.h) with the
> DMA equivalents since the PCI DMA state API will be obsolete.
>
> No functional change.
>
> For further information about the background:
>
> http://marc.info/?l=linux-netdev&m=127037540020276&w=2
>
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Stephen, ping? How did the testing go?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] skge: use the DMA state API instead of the pci equivalents
2010-04-28 0:57 [PATCH] skge: use the DMA state API instead of the pci equivalents FUJITA Tomonori
2010-05-03 22:32 ` David Miller
2010-05-13 6:43 ` David Miller
@ 2010-05-15 1:33 ` Stephen Hemminger
2010-05-16 6:29 ` David Miller
2 siblings, 1 reply; 6+ messages in thread
From: Stephen Hemminger @ 2010-05-15 1:33 UTC (permalink / raw)
To: FUJITA Tomonori; +Cc: netdev
On Wed, 28 Apr 2010 09:57:04 +0900
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> wrote:
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Yes, this works fine. Sorry for the delay but that test system
was offline for several months and the disk went bad.
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] skge: use the DMA state API instead of the pci equivalents
2010-05-15 1:33 ` Stephen Hemminger
@ 2010-05-16 6:29 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2010-05-16 6:29 UTC (permalink / raw)
To: shemminger; +Cc: fujita.tomonori, netdev
From: Stephen Hemminger <shemminger@linux-foundation.org>
Date: Fri, 14 May 2010 18:33:07 -0700
> On Wed, 28 Apr 2010 09:57:04 +0900
> FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> wrote:
>
>> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
>
> Yes, this works fine. Sorry for the delay but that test system
> was offline for several months and the disk went bad.
>
> Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-05-16 6:29 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-28 0:57 [PATCH] skge: use the DMA state API instead of the pci equivalents FUJITA Tomonori
2010-05-03 22:32 ` David Miller
2010-05-03 23:14 ` Stephen Hemminger
2010-05-13 6:43 ` David Miller
2010-05-15 1:33 ` Stephen Hemminger
2010-05-16 6:29 ` 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).