]> www.infradead.org Git - users/jedix/linux-maple.git/commit
qed: Correct endian order of MAC passed to MFW
authorMintz, Yuval <Yuval.Mintz@cavium.com>
Thu, 23 Mar 2017 13:50:17 +0000 (15:50 +0200)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 26 Jul 2017 03:46:49 +0000 (20:46 -0700)
commit209d5a9bf7e900a37859341fdc4d96d73b044c0a
tree11b01d2b1bf44925d2588c1181cda409e60aebb7
parent18752b47497a7bb97f610e339b0117db304f476d
qed: Correct endian order of MAC passed to MFW

Orabug: 2593305326439680

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>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/qlogic/qed/qed_mcp.c