Re: [PATCH 2/2] net: sh_eth: make work on big endian systems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/04/2017 05:17 PM, Thomas Petazzoni wrote:

The sh_eth driver uses cpu_to_le32() and le32_to_cpu() to manipulate the
fields of the DMA descriptors, making the assumption that the DMA descriptors are little-endian.

However, testing on the Renesas SH7786 running in big-endian mode reveals
that the DMA descriptors are also big-endian when running big-endian.
Therefore, all the endianness conversion needs to be removed for the sh_eth
driver to work.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@xxxxxxxxxxxxxxxxxx> --- Note: I see that Sergei Shtylyov has done some work around endianness on
this driver back in 2015. I am not sure if it's used on other non-SuperH
platforms in platforms where the CPU might run big-endian but the IP still
be little-endian.

  The original Renesas' code assumed that... but the big-endian descriptors
(marked as such) were never used by the arch/sh/ code (and the code wouldn't
work right even if they did!). Therefore I did remove EDMAC_BIG_ENDIAN (and
now EDMAC_LITTLE_ENDIAN can be removed as well).

If this is the case, then we would need a different approach and more
discussion.

   No, the ARM platforms sh_eth is used on (mostly R-Car) seem to be
little-endian only.

Therefore, it would be useful to wait for an ACK from Sergei before applying this patch.
   You have it (-:

Acked-by: Sergei Shtylyov <sergei.shtylyov@xxxxxxxxxxxxxxxxxx>

MBR, Sergei



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux