]> git.baikalelectronics.ru Git - kernel.git/commit
mlx4_en: fix endianness with blue frame support
authorThadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Mon, 10 Oct 2011 06:42:23 +0000 (06:42 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Oct 2011 18:10:37 +0000 (14:10 -0400)
commit91390cbaa90bf4691218110716e09847a57ac8ef
tree427339a4620cd1c694f44bb030d0b538c46311eb
parent65feb5df88186717dcde0c6046b6d35fc17c6137
mlx4_en: fix endianness with blue frame support

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 <cascardo@linux.vnet.ibm.com>
Reported-by: Richard Hendrickson <richhend@us.ibm.com>
Cc: Eli Cohen <eli@dev.mellanox.co.il>
Cc: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/mlx4/en_tx.c