On Thu, Nov 28, 2013 at 3:58 PM, Dan Carpenter dan.carpen...@oracle.com wrote:
On Thu, Nov 28, 2013 at 12:53:39AM +0800, ZHAO Gang wrote:
@@ -2208,8 +2203,11 @@ static int et131x_rx_dma_memory_alloc(struct
et131x_adapter *adapter)
rx_ring = adapter-rx_ring;
/* Alloc memory for
The original code allocate rx dma memory in several dma_alloc_coherent calls,
which causes some problems:
1. since dma_alloc_coherent allocate at least one page memory, it wastes some
memory when allocation size is smaller than one page.
2. it causes et131x_rx_dma_memory_free as complex as
On Thu, Nov 28, 2013 at 12:53:39AM +0800, ZHAO Gang wrote:
@@ -2208,8 +2203,11 @@ static int et131x_rx_dma_memory_alloc(struct
et131x_adapter *adapter)
rx_ring = adapter-rx_ring;
/* Alloc memory for the lookup table */
- rx_ring-fbr[0] = kmalloc(sizeof(struct fbr_lookup),