Re: [PATCH 08/11] staging: et131x: simplify rx dma code

2013-12-04 Thread Mark Einon
On Wed, Dec 04, 2013 at 03:24:18PM +0800, ZHAO Gang wrote: 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

Re: [PATCH 08/11] staging: et131x: simplify rx dma code

2013-12-04 Thread ZHAO Gang
On Wed, Dec 4, 2013 at 5:05 PM, Mark Einon mark.ei...@gmail.com wrote: On Wed, Dec 04, 2013 at 03:24:18PM +0800, ZHAO Gang wrote: 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

Re: [PATCH 08/11] staging: et131x: simplify rx dma code

2013-12-04 Thread ZHAO Gang
On Wed, Dec 4, 2013 at 8:01 PM, ZHAO Gang gamer...@gmail.com wrote: On Wed, Dec 4, 2013 at 5:05 PM, Mark Einon mark.ei...@gmail.com wrote: On Wed, Dec 04, 2013 at 03:24:18PM +0800, ZHAO Gang wrote: The original code allocate rx dma memory in several dma_alloc_coherent calls, which causes

Re: [PATCH 08/11] staging: et131x: simplify rx dma code

2013-12-04 Thread ZHAO Gang
On Wed, Dec 4, 2013 at 10:53 PM, Mark Einon mark.ei...@gmail.com wrote: On Wed, Dec 04, 2013 at 09:32:27PM +0800, ZHAO Gang wrote: By re-examine the code I found the calculation is not correct. The real impact is too big to apply this patch, so this patch and following patches should be

[PATCH 08/11] staging: et131x: simplify rx dma code

2013-12-03 Thread ZHAO Gang
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