]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ibmveth: Fix alignment of rx queue bug
authorSantiago Leon <santil@linux.vnet.ibm.com>
Tue, 4 Sep 2012 14:41:37 +0000 (14:41 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Oct 2012 17:39:22 +0000 (10:39 -0700)
commit2306783b6e793e80943656e8238b5a367428ee8e
tree537eada797b7964e5e416b334e916be2b699079e
parent5a899124734999d85d0b23371a367d92cfb82ee2
ibmveth: Fix alignment of rx queue bug

commit d90c92fee89ccd75ef2646f3bde0b4c0450666c3 upstream.

This patch fixes a bug found by Nish Aravamudan
(https://lkml.org/lkml/2012/5/15/220) where the driver is not following
the spec (it is not aligning the rx buffer on a 16-byte boundary) and the
hypervisor aborts the registration, making the device unusable.

The fix follows BenH's recommendation (https://lkml.org/lkml/2012/7/20/461)
to replace the kmalloc+map for a single call to dma_alloc_coherent()
because that function always aligns to a 16-byte boundary.

The stable trees will run into this bug whenever the rx buffer kmalloc call
returns something not aligned on a 16-byte boundary.

Signed-off-by: Santiago Leon <santil@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/ibm/ibmveth.c