]> git.baikalelectronics.ru Git - kernel.git/commit
bnx2x: Configure device endianity on driver load and reset endianity on removal.
authorManish Chopra <manish.chopra@qlogic.com>
Tue, 2 Sep 2014 08:31:25 +0000 (04:31 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Sep 2014 20:54:35 +0000 (13:54 -0700)
commit2d485422aadbe2fc98bf43318bd9d4c44b8778e7
treeb077efa246bd5f32aad44e4239115f77253dc3a9
parentf9ed3c9ec3d223f1ea3ae5eddbea81609f8da201
bnx2x: Configure device endianity on driver load and reset endianity on removal.

Some hosts can be both little and big endian.
In certain scenarios a big endian kernel can kexec a little endian kernel.

This patch fixes this case from both ends:
1) Return endianity to original values on shutdown (in case little endian kernel boots after we shutdown).
2) Do not rely on HW reset values when loading driver in little endian kernel
   but configure them explicitly (in case previous kernel was big endian and did not reset the HW).

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c