diff options
author | Ian Campbell <Ian.Campbell@citrix.com> | 2011-08-30 03:18:25 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-08-31 01:58:01 +0400 |
commit | 18324d690d6a5028e3c174fc1921447aedead2b8 (patch) | |
tree | 5b7f8cdacf5776f33376f991369a1b8dfc20f573 /drivers/net/ethernet/sun | |
parent | 4d5b1a674e3426aa53191978631472518da71852 (diff) | |
download | linux-18324d690d6a5028e3c174fc1921447aedead2b8.tar.xz |
cassini: convert to SKB paged frag API.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sun')
-rw-r--r-- | drivers/net/ethernet/sun/cassini.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/ethernet/sun/cassini.c b/drivers/net/ethernet/sun/cassini.c index 1776a37b7aed..f07a72150c63 100644 --- a/drivers/net/ethernet/sun/cassini.c +++ b/drivers/net/ethernet/sun/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); |