提交 40955532 编写于 作者: V Vladislav Zolotarov 提交者: David S. Miller

bnx2x: call dev_kfree_skb_any instead of dev_kfree_skb

replace function calls when possible call in both irq/non-irq contexts
Signed-off-by: NDmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: NEilon Greenstein <eilong@broadcom.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 792d4b5c
...@@ -131,7 +131,7 @@ static u16 bnx2x_free_tx_pkt(struct bnx2x *bp, struct bnx2x_fastpath *fp, ...@@ -131,7 +131,7 @@ static u16 bnx2x_free_tx_pkt(struct bnx2x *bp, struct bnx2x_fastpath *fp,
/* release skb */ /* release skb */
WARN_ON(!skb); WARN_ON(!skb);
dev_kfree_skb(skb); dev_kfree_skb_any(skb);
tx_buf->first_bd = 0; tx_buf->first_bd = 0;
tx_buf->skb = NULL; tx_buf->skb = NULL;
...@@ -465,7 +465,7 @@ static void bnx2x_tpa_stop(struct bnx2x *bp, struct bnx2x_fastpath *fp, ...@@ -465,7 +465,7 @@ static void bnx2x_tpa_stop(struct bnx2x *bp, struct bnx2x_fastpath *fp,
} else { } else {
DP(NETIF_MSG_RX_STATUS, "Failed to allocate new pages" DP(NETIF_MSG_RX_STATUS, "Failed to allocate new pages"
" - dropping packet!\n"); " - dropping packet!\n");
dev_kfree_skb(skb); dev_kfree_skb_any(skb);
} }
......
...@@ -840,7 +840,7 @@ static inline int bnx2x_alloc_rx_skb(struct bnx2x *bp, ...@@ -840,7 +840,7 @@ static inline int bnx2x_alloc_rx_skb(struct bnx2x *bp,
mapping = dma_map_single(&bp->pdev->dev, skb->data, fp->rx_buf_size, mapping = dma_map_single(&bp->pdev->dev, skb->data, fp->rx_buf_size,
DMA_FROM_DEVICE); DMA_FROM_DEVICE);
if (unlikely(dma_mapping_error(&bp->pdev->dev, mapping))) { if (unlikely(dma_mapping_error(&bp->pdev->dev, mapping))) {
dev_kfree_skb(skb); dev_kfree_skb_any(skb);
return -ENOMEM; return -ENOMEM;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册