Commit 37287fae authored by Christoph Paasch's avatar Christoph Paasch Committed by Jeff Kirsher

e1000e: Add missing dma_mapping_error-call in e1000_alloc_jumbo_rx_buffers

After dma_map_page, dma_mapping_error must be called. It seems safe to
not free the skb/page allocated in this function, as the skb/page can be
reused later.
Signed-off-by: default avatarChristoph Paasch <christoph.paasch@uclouvain.be>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 065946c6
...@@ -848,11 +848,16 @@ static void e1000_alloc_jumbo_rx_buffers(struct e1000_ring *rx_ring, ...@@ -848,11 +848,16 @@ static void e1000_alloc_jumbo_rx_buffers(struct e1000_ring *rx_ring,
} }
} }
if (!buffer_info->dma) if (!buffer_info->dma) {
buffer_info->dma = dma_map_page(&pdev->dev, buffer_info->dma = dma_map_page(&pdev->dev,
buffer_info->page, 0, buffer_info->page, 0,
PAGE_SIZE, PAGE_SIZE,
DMA_FROM_DEVICE); DMA_FROM_DEVICE);
if (dma_mapping_error(&pdev->dev, buffer_info->dma)) {
adapter->alloc_rx_buff_failed++;
break;
}
}
rx_desc = E1000_RX_DESC_EXT(*rx_ring, i); rx_desc = E1000_RX_DESC_EXT(*rx_ring, i);
rx_desc->read.buffer_addr = cpu_to_le64(buffer_info->dma); rx_desc->read.buffer_addr = cpu_to_le64(buffer_info->dma);
......
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