aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/e1000/e1000_main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 5e3356f8eb5a..972e06d984c8 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -2185,12 +2185,16 @@ static void e1000_clean_rx_ring(struct e1000_adapter *adapter,
2185 /* Free all the Rx ring sk_buffs */ 2185 /* Free all the Rx ring sk_buffs */
2186 for (i = 0; i < rx_ring->count; i++) { 2186 for (i = 0; i < rx_ring->count; i++) {
2187 buffer_info = &rx_ring->buffer_info[i]; 2187 buffer_info = &rx_ring->buffer_info[i];
2188 if (buffer_info->skb) { 2188 if (buffer_info->dma) {
2189 pci_unmap_single(pdev, 2189 pci_unmap_single(pdev,
2190 buffer_info->dma, 2190 buffer_info->dma,
2191 buffer_info->length, 2191 buffer_info->length,
2192 PCI_DMA_FROMDEVICE); 2192 PCI_DMA_FROMDEVICE);
2193 }
2193 2194
2195 buffer_info->dma = 0;
2196
2197 if (buffer_info->skb) {
2194 dev_kfree_skb(buffer_info->skb); 2198 dev_kfree_skb(buffer_info->skb);
2195 buffer_info->skb = NULL; 2199 buffer_info->skb = NULL;
2196 } 2200 }
@@ -4033,6 +4037,7 @@ static bool e1000_clean_rx_irq(struct e1000_adapter *adapter,
4033 buffer_info->dma, 4037 buffer_info->dma,
4034 buffer_info->length, 4038 buffer_info->length,
4035 PCI_DMA_FROMDEVICE); 4039 PCI_DMA_FROMDEVICE);
4040 buffer_info->dma = 0;
4036 4041
4037 length = le16_to_cpu(rx_desc->length); 4042 length = le16_to_cpu(rx_desc->length);
4038 /* !EOP means multiple descriptors were used to store a single 4043 /* !EOP means multiple descriptors were used to store a single
@@ -4222,6 +4227,7 @@ map_skb:
4222 pci_unmap_single(pdev, buffer_info->dma, 4227 pci_unmap_single(pdev, buffer_info->dma,
4223 adapter->rx_buffer_len, 4228 adapter->rx_buffer_len,
4224 PCI_DMA_FROMDEVICE); 4229 PCI_DMA_FROMDEVICE);
4230 buffer_info->dma = 0;
4225 4231
4226 break; /* while !buffer_info->skb */ 4232 break; /* while !buffer_info->skb */
4227 } 4233 }