]> git.kernelconcepts.de Git - karo-tx-linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Mar 2013 19:11:56 +0000 (12:11 -0700)
commit4b8fd2aa494aff51404a4afa0fe36475fd419b76
tree7c75b8f2c75aafd361a4bd28b1908efedda7ff63
parent56bed2f8e6061b65ce3f9f27df92ac2e1cc2e7e0
sfc: Fix efx_rx_buf_offset() in the presence of swiotlb

[ Upstream commits b590ace09d51cd39744e0f7662c5e4a0d1b5d952 and
  c73e787a8db9117d59b5180baf83203a42ecadca ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/sfc/net_driver.h
drivers/net/ethernet/sfc/rx.c