mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 10:33:27 +00:00
bnx2: convert to SKB paged frag API.
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>
This commit is contained in:
parent
dc234d0b24
commit
b7b6a688d2
1 changed files with 4 additions and 4 deletions
|
@ -2930,8 +2930,8 @@ bnx2_reuse_rx_skb_pages(struct bnx2 *bp, struct bnx2_rx_ring_info *rxr,
|
||||||
|
|
||||||
shinfo = skb_shinfo(skb);
|
shinfo = skb_shinfo(skb);
|
||||||
shinfo->nr_frags--;
|
shinfo->nr_frags--;
|
||||||
page = shinfo->frags[shinfo->nr_frags].page;
|
page = skb_frag_page(&shinfo->frags[shinfo->nr_frags]);
|
||||||
shinfo->frags[shinfo->nr_frags].page = NULL;
|
__skb_frag_set_page(&shinfo->frags[shinfo->nr_frags], NULL);
|
||||||
|
|
||||||
cons_rx_pg->page = page;
|
cons_rx_pg->page = page;
|
||||||
dev_kfree_skb(skb);
|
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];
|
txbd = &txr->tx_desc_ring[ring_prod];
|
||||||
|
|
||||||
len = frag->size;
|
len = frag->size;
|
||||||
mapping = dma_map_page(&bp->pdev->dev, frag->page, frag->page_offset,
|
mapping = skb_frag_dma_map(&bp->pdev->dev, frag, 0, len,
|
||||||
len, PCI_DMA_TODEVICE);
|
PCI_DMA_TODEVICE);
|
||||||
if (dma_mapping_error(&bp->pdev->dev, mapping))
|
if (dma_mapping_error(&bp->pdev->dev, mapping))
|
||||||
goto dma_error;
|
goto dma_error;
|
||||||
dma_unmap_addr_set(&txr->tx_buf_ring[ring_prod], mapping,
|
dma_unmap_addr_set(&txr->tx_buf_ring[ring_prod], mapping,
|
||||||
|
|
Loading…
Reference in a new issue