Commit fc27bd11 authored by David Woodhouse's avatar David Woodhouse Committed by David S. Miller

8139cp: Use dev_kfree_skb_any() instead of dev_kfree_skb() in cp_clean_rings()

This can be called from cp_tx_timeout() with interrupts disabled.
Spotted by Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0315e382
...@@ -1151,7 +1151,7 @@ static void cp_clean_rings (struct cp_private *cp) ...@@ -1151,7 +1151,7 @@ static void cp_clean_rings (struct cp_private *cp)
desc = cp->rx_ring + i; desc = cp->rx_ring + i;
dma_unmap_single(&cp->pdev->dev,le64_to_cpu(desc->addr), dma_unmap_single(&cp->pdev->dev,le64_to_cpu(desc->addr),
cp->rx_buf_sz, PCI_DMA_FROMDEVICE); cp->rx_buf_sz, PCI_DMA_FROMDEVICE);
dev_kfree_skb(cp->rx_skb[i]); dev_kfree_skb_any(cp->rx_skb[i]);
} }
} }
...@@ -1164,7 +1164,7 @@ static void cp_clean_rings (struct cp_private *cp) ...@@ -1164,7 +1164,7 @@ static void cp_clean_rings (struct cp_private *cp)
le32_to_cpu(desc->opts1) & 0xffff, le32_to_cpu(desc->opts1) & 0xffff,
PCI_DMA_TODEVICE); PCI_DMA_TODEVICE);
if (le32_to_cpu(desc->opts1) & LastFrag) if (le32_to_cpu(desc->opts1) & LastFrag)
dev_kfree_skb(skb); dev_kfree_skb_any(skb);
cp->dev->stats.tx_dropped++; cp->dev->stats.tx_dropped++;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment