Skip to content

Commit

Permalink
bnx2: convert to SKB paged frag API.
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Michael Chan <mchan@broadcom.com>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ian Campbell authored and David S. Miller committed Aug 26, 2011
1 parent dc234d0 commit b7b6a68
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/net/ethernet/broadcom/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit b7b6a68

Please sign in to comment.