diff options
author | Sathya Perla <sathya.perla@emulex.com> | 2014-03-04 07:44:38 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-04 22:17:53 +0100 |
commit | e50287be7c007a10e6e2e3332e52466faf4b6a04 (patch) | |
tree | 7ecf4f04fe32210aba3e7c4a3f9fd0c369c619b5 /Documentation/email-clients.txt | |
parent | Merge branch 'mpls_tc' (diff) | |
download | linux-e50287be7c007a10e6e2e3332e52466faf4b6a04.tar.xz linux-e50287be7c007a10e6e2e3332e52466faf4b6a04.zip |
be2net: dma_sync each RX frag before passing it to the stack
The driver currently maps a page for DMA, divides the page into multiple
frags and posts them to the HW. It un-maps the page after data is received
on all the frags of the page. This scheme doesn't work when bounce buffers
are used for DMA (swiotlb=force kernel param).
This patch fixes this problem by calling dma_sync_single_for_cpu() for each
frag (excepting the last one) so that the data is copied from the bounce
buffers. The page is un-mapped only when DMA finishes on the last frag of
the page.
(Thanks Ben H. for suggesting the dma_sync API!)
This patch also renames the "last_page_user" field of be_rx_page_info{}
struct to "last_frag" to improve readability of the fixed code.
Reported-by: Li Fengmao <li.fengmao@zte.com.cn>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/email-clients.txt')
0 files changed, 0 insertions, 0 deletions