]> git.baikalelectronics.ru Git - kernel.git/commit
sfc: Properly sync RX DMA buffer when it is not the last in the page
authorBen Hutchings <bhutchings@solarflare.com>
Thu, 20 Dec 2012 18:48:20 +0000 (18:48 +0000)
committerBen Hutchings <bhutchings@solarflare.com>
Tue, 26 Feb 2013 14:55:49 +0000 (14:55 +0000)
commit8030c46c7fecfc9b8f9eaa6ddcb43fdb5c2b9fd9
tree0d087eac21de23332dddb6b27406d9c9919b0bc1
parent040a3227c6c8aa1b3a4cac8c69abcc377672988a
sfc: Properly sync RX DMA buffer when it is not the last in the page

We may currently allocate two RX DMA buffers to a page, and only unmap
the page when the second is completed.  We do not sync the first RX
buffer to be completed; this can result in packet loss or corruption
if the last RX buffer completed in a NAPI poll is the first in a page
and is not DMA-coherent.  (In the middle of a NAPI poll, we will
handle the following RX completion and unmap the page *before* looking
at the content of the first buffer.)

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