From: Amir Vadai Date: Mon, 7 Oct 2013 11:38:13 +0000 (+0200) Subject: net/mlx4_en: Fix pages never dma unmapped on rx X-Git-Tag: v3.12-rc7~20^2~56^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=021f1107ffdae7a82af6c53f4c52654062e365c6;p=pandora-kernel.git net/mlx4_en: Fix pages never dma unmapped on rx This patch fixes a bug introduced by commit 51151a16 (mlx4: allow order-0 memory allocations in RX path). dma_unmap_page never reached because condition to detect last fragment in page is wrong. offset+frag_stride can't be greater than size, need to make sure no additional frag will fit in page => compare offset + frag_stride + next_frag_size instead. next_frag_size is the same as the current one, since page is shared only with frags of the same size. CC: Eric Dumazet Signed-off-by: Amir Vadai Acked-by: Eric Dumazet Signed-off-by: David S. Miller --- Reading git-diff-tree failed