]> git.baikalelectronics.ru Git - kernel.git/commit
sfc: Fix efx_rx_buf_offset() in the presence of swiotlb
authorBen Hutchings <bhutchings@solarflare.com>
Thu, 10 Jan 2013 23:51:54 +0000 (23:51 +0000)
committerBen Hutchings <bhutchings@solarflare.com>
Tue, 26 Feb 2013 14:57:16 +0000 (14:57 +0000)
commit783532107639fccb2454bffb1ebfae889565eedd
treec83ba26d5cc2e970c271f46d64b47e9767bce908
parent92d0f9f5dbbd8c259a682f5393993d8f076426e9
sfc: Fix efx_rx_buf_offset() in the presence of swiotlb

We assume that the mapping between DMA and virtual addresses is done
on whole pages, so we can find the page offset of an RX buffer using
the lower bits of the DMA address.  However, swiotlb maps in units of
2K, breaking this assumption.

Add an explicit page_offset field to struct efx_rx_buffer.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
drivers/net/ethernet/sfc/net_driver.h
drivers/net/ethernet/sfc/rx.c