qed: Correct endian order of MAC passed to MFW
commit179910020759bffe8d75f0b69e6307c25e4d660d
authorMintz, Yuval <Yuval.Mintz@cavium.com>
Thu, 23 Mar 2017 13:50:17 +0000 (23 15:50 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Mar 2017 18:53:30 +0000 (23 11:53 -0700)
treedcabe453391ab624fe88036459cc1dd467f77c32
parent2f67af8c596e16760dc7e7d28ee0edd7ce59f2b4
qed: Correct endian order of MAC passed to MFW

The management firmware is running on a Big Endian processor,
and when running on LE platform HW is configured to swap access
to memory shared between management firmware and driver on
32-bit granulariy.

As a result, for matters of simplicity most of the APIs between
driver and management firmware are based on 32-bit variables.
MAC settings are one exception, as driver needs to fill a byte
array when indicating to management firmware that primary MAC
has changed.
Due to the swap, driver must make sure that the mac that was
provided in byte-order would be translated into native order,
otherwise after the swap the management firmware would read
it swapped.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_mcp.c