Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c73e787a authored by Ben Hutchings's avatar Ben Hutchings
Browse files

sfc: Correct efx_rx_buffer::page_offset when EFX_PAGE_IP_ALIGN != 0



RX DMA buffers start at an offset of EFX_PAGE_IP_ALIGN bytes from the
start of a cache line.  This offset obviously needs to be included in
the virtual address, but this was missed in commit b590ace0
('sfc: Fix efx_rx_buf_offset() in the presence of swiotlb') since
EFX_PAGE_IP_ALIGN is equal to 0 on both x86 and powerpc.

Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
parent 35205b21
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -215,7 +215,7 @@ static int efx_init_rx_buffers_page(struct efx_rx_queue *rx_queue)
		rx_buf = efx_rx_buffer(rx_queue, index);
		rx_buf->dma_addr = dma_addr + EFX_PAGE_IP_ALIGN;
		rx_buf->u.page = page;
		rx_buf->page_offset = page_offset;
		rx_buf->page_offset = page_offset + EFX_PAGE_IP_ALIGN;
		rx_buf->len = efx->rx_buffer_len - EFX_PAGE_IP_ALIGN;
		rx_buf->flags = EFX_RX_BUF_PAGE;
		++rx_queue->added_count;