[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1379607231.1514.13.camel@bwh-desktop.uk.level5networks.com>
Date: Thu, 19 Sep 2013 17:13:51 +0100
From: Ben Hutchings <bhutchings@...arflare.com>
To: David Miller <davem@...emloft.net>
CC: stable <stable@...r.kernel.org>, netdev <netdev@...r.kernel.org>
Subject: [stable] [PATCH] sfc: Fix efx_rx_buf_offset() for recycled pages
[Re-sending with cc to the current stable address. I still had the old
address in contacts, though I've definitely sent to the current address
previously...]
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.
I'm attaching the patches for 3.0.y, 3.2.y and 3.4.y (the last of which
should also be applicable to the later unofficial stable branches).
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
View attachment "sfc-Fix-efx_rx_buf_offset-for-recycled-pages-3.0.patch" of type "text/x-patch" (1833 bytes)
View attachment "sfc-Fix-efx_rx_buf_offset-for-recycled-pages-3.2.patch" of type "text/x-patch" (1878 bytes)
View attachment "sfc-Fix-efx_rx_buf_offset-for-recycled-pages-3.4.patch" of type "text/x-patch" (1889 bytes)
Powered by blists - more mailing lists