]> 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)
commit10829117583873aebb06c53b02ec1a200960f0f0
treeb077efa246bd5f32aad44e4239115f77253dc3a9
parentb1f10057f1aa7eeceb137dce08aec0e357ff3336
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