• Sergei Shtylyov's avatar
    sh_eth: make sh_eth_soft_swap() work on ARM · 232b6743
    Sergei Shtylyov authored
    Browsing  thru the driver disassembly, I noticed that ARM gcc generated
    no  code  whatsoever for sh_eth_soft_swap() while building a little-endian
    kernel -- apparently __LITTLE_ENDIAN__ was not being #define'd, however
    it got implicitly #define'd when building with the SH gcc (I could only
    find the explicit #define __LITTLE_ENDIAN that was #include'd when building
    a little-endian kernel).  Luckily, the Ether controller  only doing big-
    endian DMA is encountered on the early SH771x SoCs only and all ARM SoCs
    implement EDMR.DE and thus set 'sh_eth_cpu_data::hw_swap'. But anyway, we
    need to fix the #ifdef inside sh_eth_soft_swap() to something that would
    work on all architectures...
    Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
    Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    232b6743
sh_eth.h 13.1 KB