Re: [PATCH] gianfar: Solve ethernet TX/RX problems for ls1021a

From: Vladimir Oltean
Date: Wed Jan 08 2020 - 11:30:47 EST


Hi Johnson,

On Wed, 8 Jan 2020 at 09:15, Johnson CH Chen (éæå)
<JohnsonCH.Chen@xxxxxxxx> wrote:
>
> Hi Vladimir,
>
> Vladimir Oltean <olteanv@xxxxxxxxx> æ 2020å1æ7æ éä äå11:49åéï
> >
> > Hi Chen,
> >
> > On Tue, 7 Jan 2020 at 12:37, Johnson CH Chen (éæå)
> > <JohnsonCH.Chen@xxxxxxxx> wrote:
> > >
> > > Add dma_endian_le to solve ethernet TX/RX problems for freescale
> > > ls1021a. Without this, it will result in rx-busy-errors by ethtool, and transmit queue timeout in ls1021a's platforms.
> > >
> > > Signed-off-by: Johnson Chen <johnsonch.chen@xxxxxxxx>
> > > ---
> >
> > This patch is not valid. The endianness configuration in
> > eTSECx_DMACTRL is reserved and not applicable.
> > What is the value of SCFG_ETSECDMAMCR bits ETSEC_BD and ETSEC_FR_DATA
> > on your board? Typically this is configured by the bootloader.
> >
>
> Thanks your suggestion. I use linux-fsl-sdk-v1.7, and find "dma-endian-le" is used in ls1021a.dtsi and gianfar.c/.h. For bootloader, version is U-Boot version is 2015.01-dirty and it seems old and not includes "SCFG_ETSECDMAMCR bits".
>
> It seems solution is included in bootloader, not in device tree for
> freescale/NXP: https://lxr.missinglinkelectronics.com/uboot/board/freescale/ls1021aiot/ls1021aiot.c
>
> It means bootloader provides functions are the same as device tree's.
> So what's benefit for this desgin? It seems we need to upgrade kernel and bootloader to satisfy our need, not just upgrade kernel only. So many thanks!
>

I'm not sure that the Freescale SDK 1.7 is of any relevance here. The
point is that this patch is breaking Ethernet for every other LS1021A
board except yours.

Regards,
-Vladimir