[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1313760467-8598-20-git-send-email-ian.campbell@citrix.com>
Date: Fri, 19 Aug 2011 14:26:52 +0100
From: Ian Campbell <ian.campbell@...rix.com>
To: netdev@...r.kernel.org
CC: linux-kernel@...r.kernel.org,
Ian Campbell <ian.campbell@...rix.com>,
Grant Likely <grant.likely@...retlab.ca>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <eric.dumazet@...il.com>,
David Decotigny <decot@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Mike Frysinger <vapier@...too.org>,
devicetree-discuss@...ts.ozlabs.org
Subject: [PATCH 20/75] cassini: convert to SKB paged frag API.
Signed-off-by: Ian Campbell <ian.campbell@...rix.com>
Cc: Grant Likely <grant.likely@...retlab.ca>
Cc: "David S. Miller" <davem@...emloft.net>
Cc: Eric Dumazet <eric.dumazet@...il.com>
Cc: David Decotigny <decot@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Mike Frysinger <vapier@...too.org>
Cc: netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Cc: devicetree-discuss@...ts.ozlabs.org
---
drivers/net/cassini.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c
index 646c86b..de5c7590 100644
--- a/drivers/net/cassini.c
+++ b/drivers/net/cassini.c
@@ -2048,8 +2048,8 @@ static int cas_rx_process_pkt(struct cas *cp, struct cas_rx_comp *rxc,
skb->truesize += hlen - swivel;
skb->len += hlen - swivel;
- get_page(page->buffer);
- frag->page = page->buffer;
+ __skb_frag_set_page(frag, page->buffer);
+ __skb_frag_ref(frag);
frag->page_offset = off;
frag->size = hlen - swivel;
@@ -2072,8 +2072,8 @@ static int cas_rx_process_pkt(struct cas *cp, struct cas_rx_comp *rxc,
skb->len += hlen;
frag++;
- get_page(page->buffer);
- frag->page = page->buffer;
+ __skb_frag_set_page(frag, page->buffer);
+ __skb_frag_ref(frag);
frag->page_offset = 0;
frag->size = hlen;
RX_USED_ADD(page, hlen + cp->crc_size);
@@ -2830,9 +2830,8 @@ static inline int cas_xmit_tx_ringN(struct cas *cp, int ring,
skb_frag_t *fragp = &skb_shinfo(skb)->frags[frag];
len = fragp->size;
- mapping = pci_map_page(cp->pdev, fragp->page,
- fragp->page_offset, len,
- PCI_DMA_TODEVICE);
+ mapping = skb_frag_dma_map(&cp->pdev->dev, fragp, 0, len,
+ PCI_DMA_TODEVICE);
tabort = cas_calc_tabort(cp, fragp->page_offset, len);
if (unlikely(tabort)) {
@@ -2843,7 +2842,7 @@ static inline int cas_xmit_tx_ringN(struct cas *cp, int ring,
ctrl, 0);
entry = TX_DESC_NEXT(ring, entry);
- addr = cas_page_map(fragp->page);
+ addr = cas_page_map(skb_frag_page(fragp));
memcpy(tx_tiny_buf(cp, ring, entry),
addr + fragp->page_offset + len - tabort,
tabort);
--
1.7.2.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists