aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_in.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2013-09-06 22:39:20 +0100
committerBen Hutchings <ben@decadent.org.uk>2013-10-26 21:06:11 +0100
commit5f7f65dae41a2f2ba134b880d2b9a8bc459ba01b (patch)
tree4169f8fdfcb1e94741609f3eae276560161af7f5 /net/lapb/lapb_in.c
parent068d848f7f3d3db8c68e517ba93cb170914a64d8 (diff)
sfc: Fix efx_rx_buf_offset() for recycled pages
This bug fix is only for stable branches older than 3.10. The bug was fixed upstream by commit 2768935a4660 ('sfc: reuse pages to avoid DMA mapping/unmapping costs'), but that change is totally unsuitable for stable. Commit b590ace09d51 ('sfc: Fix efx_rx_buf_offset() in the presence of swiotlb') added an explicit page_offset member to struct efx_rx_buffer, which must be set consistently with the u.page and dma_addr fields. However, it failed to add the necessary assignment in efx_resurrect_rx_buffer(). It also did not correct the calculation of efx_rx_buffer::dma_addr in efx_resurrect_rx_buffer(), which assumes that DMA-mapping a page will result in a page-aligned DMA address (exactly what swiotlb violates). Add the assignment of efx_rx_buffer::page_offset and change the calculation of dma_addr to make use of it. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'net/lapb/lapb_in.c')
0 files changed, 0 insertions, 0 deletions