Commit 1a2bd6b2 authored by Mark Einon's avatar Mark Einon Committed by Greg Kroah-Hartman

staging: et131x: Remove alignment offset padding on DMA buffer allocation/free

This padding was used to align buffers to a 4k boundary when returned
from dma_alloc_coherent(). As the buffers are already 4k aligned, and
the alignment no longer performed, the padding is not needed.
Signed-off-by: default avatarMark Einon <mark.einon@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 15ffde4d
...@@ -2291,8 +2291,7 @@ static int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter) ...@@ -2291,8 +2291,7 @@ static int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter)
for (id = 0; id < NUM_FBRS; id++) { for (id = 0; id < NUM_FBRS; id++) {
/* Allocate an area of memory for Free Buffer Ring */ /* Allocate an area of memory for Free Buffer Ring */
bufsize = (sizeof(struct fbr_desc) * bufsize = (sizeof(struct fbr_desc) * rx_ring->fbr[id]->num_entries);
rx_ring->fbr[id]->num_entries) + 0xfff;
rx_ring->fbr[id]->ring_virtaddr = rx_ring->fbr[id]->ring_virtaddr =
dma_alloc_coherent(&adapter->pdev->dev, dma_alloc_coherent(&adapter->pdev->dev,
bufsize, bufsize,
...@@ -2463,8 +2462,7 @@ static void et131x_rx_dma_memory_free(struct et131x_adapter *adapter) ...@@ -2463,8 +2462,7 @@ static void et131x_rx_dma_memory_free(struct et131x_adapter *adapter)
} }
bufsize = bufsize =
(sizeof(struct fbr_desc) * rx_ring->fbr[id]->num_entries) + sizeof(struct fbr_desc) * rx_ring->fbr[id]->num_entries;
0xfff;
dma_free_coherent(&adapter->pdev->dev, bufsize, dma_free_coherent(&adapter->pdev->dev, bufsize,
rx_ring->fbr[id]->ring_virtaddr, rx_ring->fbr[id]->ring_virtaddr,
......
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