From: Ian Campbell Date: Wed, 24 Aug 2011 22:28:12 +0000 (+0000) Subject: bnx2: convert to SKB paged frag API. X-Git-Tag: firefly_0821_release~3680^2~4273^2~388 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b7b6a688d217936459ff5cf1087b2361db952509;p=firefly-linux-kernel-4.4.55.git bnx2: convert to SKB paged frag API. Signed-off-by: Ian Campbell Reviewed-by: Konrad Rzeszutek Wilk Cc: Michael Chan Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c index 4a9a8c8184d8..9afb6534cabe 100644 --- a/drivers/net/ethernet/broadcom/bnx2.c +++ b/drivers/net/ethernet/broadcom/bnx2.c @@ -2930,8 +2930,8 @@ bnx2_reuse_rx_skb_pages(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr, shinfo = skb_shinfo(skb); shinfo->nr_frags--; - page = shinfo->frags[shinfo->nr_frags].page; - shinfo->frags[shinfo->nr_frags].page = NULL; + page = skb_frag_page(&shinfo->frags[shinfo->nr_frags]); + __skb_frag_set_page(&shinfo->frags[shinfo->nr_frags], NULL); cons_rx_pg->page = page; dev_kfree_skb(skb); @@ -6511,8 +6511,8 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev) txbd = &txr->tx_desc_ring[ring_prod]; len = frag->size; - mapping = dma_map_page(&bp->pdev->dev, frag->page, frag->page_offset, - len, PCI_DMA_TODEVICE); + mapping = skb_frag_dma_map(&bp->pdev->dev, frag, 0, len, + PCI_DMA_TODEVICE); if (dma_mapping_error(&bp->pdev->dev, mapping)) goto dma_error; dma_unmap_addr_set(&txr->tx_buf_ring[ring_prod], mapping,