]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4_en: Doorbell is byteswapped in Little Endian archs
authorAmir Vadai <amirv@mellanox.com>
Mon, 22 Dec 2014 08:21:57 +0000 (10:21 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Dec 2014 21:33:10 +0000 (16:33 -0500)
commit8b29d3f4e9cd688cdeb5ba9fcedd4ecf6bf03b0d
tree2be9bbac102868cb3d3bcac57bcc60ed222a4395
parent4da56be133273e2ca626bf67edb664d9832b7642
net/mlx4_en: Doorbell is byteswapped in Little Endian archs

iowrite32() will byteswap it's argument on big endian archs.
iowrite32be() will byteswap on little endian archs.
Since we don't want to do this unnecessary byteswap on the fast path,
doorbell is stored in the NIC's native endianness. Using the right
iowrite() according to the arch endianness.

CC: Wei Yang <weiyang@linux.vnet.ibm.com>
CC: David Laight <david.laight@aculab.com>
Fixes: bc7c7cc ("net/mlx4_en: Avoid calling bswap in tx fast path")
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_tx.c