]> git.baikalelectronics.ru Git - kernel.git/commit
net: systemport: Set correct RSB endian bits based on host
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 29 Aug 2017 20:35:17 +0000 (13:35 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Aug 2017 21:42:17 +0000 (14:42 -0700)
commit13606f0b4d2f8e289331898562acb554dfb391a2
tree14fcdd53d67924c6ceb162a5a1190cb47754982f
parentb6345d4fb000145b2cfc0b39c8825450b4df6ef0
net: systemport: Set correct RSB endian bits based on host

RSB_SWAP0 needs to match the host CPU endian, and it needs to be set
for LE and clear for BE. RSB_SWAP1 must always be cleared for SYSTEMPORT
Lite.

With these settings, we have the Receive Status Block always match the
host endian and we do not need to perform any conversion. Since there is
not necessarily a CONFIG_CPU_LITTLE_ENDIAN option defined, we test for
!CONFIG_CPU_BIG_ENDIAN which is guaranteed to be set.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bcmsysport.c