]> 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)
commitabcf12518cda1a248cc0b59b433155720c396bfd
treec83ba26d5cc2e970c271f46d64b47e9767bce908
parent8030c46c7fecfc9b8f9eaa6ddcb43fdb5c2b9fd9
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