Re: [PATCH] mlx4_en: fix endianness with blue frame support
From: David Miller <davem@davemloft.net>
Date: 2011-10-10 18:13:07
Also in:
netdev
From: David Miller <davem@davemloft.net>
Date: 2011-10-10 18:13:07
Also in:
netdev
From: Thadeu Lima de Souza Cascardo <redacted> Date: Mon, 10 Oct 2011 13:46:54 -0300
On Mon, Oct 10, 2011 at 01:42:23PM -0300, Thadeu Lima de Souza Cascardo wrote:quoted
The doorbell register was being unconditionally swapped. In x86, that meant it was being swapped to BE and written to the descriptor and to memory, depending on the case of blue frame support or writing to doorbell register. On PPC, this meant it was being swapped to LE and then swapped back to BE while writing to the register. But in the blue frame case, it was being written as LE to the descriptor. The fix is not to swap doorbell unconditionally, write it to the register as BE and convert it to BE when writing it to the descriptor. Signed-off-by: Thadeu Lima de Souza Cascardo <redacted> Reported-by: Richard Hendrickson <redacted> Cc: Eli Cohen <redacted> Cc: Yevgeny Petrilin <redacted> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> ---So I tested this patch and it works for me. Thanks Ben and Eli for finding out the problem with doorbell in the descriptor.
Applied, thanks everyone.