mlxsw: Make mailboxes 4KB aligned
authorIdo Schimmel <idosch@mellanox.com>
Thu, 27 Aug 2015 15:59:57 +0000 (17:59 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Aug 2015 23:31:17 +0000 (16:31 -0700)
commit1e81779ae41e5d14174ce5e61790ace34914ade0
tree8a72938a16998ebec052aa739085526901d27088
parent262df6919edd837c0745fc2a751364af671feaf7
mlxsw: Make mailboxes 4KB aligned

The HW-SW contract requires mailboxes passed to the firmware to be 4KB
aligned. Previously, these mailboxes were mapped using streaming DMA
routines, which do not guarantee the bus addresses to be 4KB aligned.
Under certain conditions this constraint was indeed violated and errors
were observed.

By using consistent DMA mapping routines together with a mailbox size of
4KB we are guaranteed not to violate the constraint.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/pci.c