]> git.kernelconcepts.de Git - karo-tx-linux.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)
commit04860eb7d911bbd958463416cc045b69ffdf73b3
treeb077efa246bd5f32aad44e4239115f77253dc3a9
parent511c24456ad19d51fcdbc5eda9df7be98c20e6b0
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