lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 6 Jun 2021 23:41:48 +0800
From:   Guo Ren <guoren@...nel.org>
To:     Jernej Škrabec <jernej.skrabec@...il.com>
Cc:     Andre Przywara <andre.przywara@....com>,
        Anup Patel <anup.patel@....com>,
        Palmer Dabbelt <palmerdabbelt@...gle.com>,
        Arnd Bergmann <arnd@...db.de>, wens@...e.org,
        maxime@...no.tech, Drew Fustini <drew@...gleboard.org>,
        liush@...winnertech.com,
        Wei Wu (吴伟) <lazyparser@...il.com>,
        wefu@...hat.com, linux-riscv <linux-riscv@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-arch <linux-arch@...r.kernel.org>,
        linux-sunxi@...ts.linux.dev, Maxime Ripard <mripard@...nel.org>,
        Corentin Labbe <clabbe@...libre.com>,
        Samuel Holland <samuel@...lland.org>,
        Icenowy Zheng <icenowy@...c.io>,
        LABBE Corentin <clabbe.montjoie@...il.com>,
        Michael Walle <michael@...le.cc>,
        Guo Ren <guoren@...ux.alibaba.com>
Subject: Re: [RFC PATCH v2 11/11] riscv: soc: Allwinner D1 GMAC driver only
 for temp use

On Sun, Jun 6, 2021 at 11:39 PM Jernej Škrabec <jernej.skrabec@...il.com> wrote:
>
> Hi!
>
> Dne nedelja, 06. junij 2021 ob 17:32:22 CEST je Guo Ren napisal(a):
> >  ,
> >
> > On Sun, Jun 6, 2021 at 6:50 PM Andre Przywara <andre.przywara@....com>
> wrote:
> > > On Sun,  6 Jun 2021 09:04:09 +0000
> > > guoren@...nel.org wrote:
> > >
> > > Hi,
> > >
> > > > From: liush <liush@...winnertech.com>
> > > >
> > > > This is a temporary driver, only guaranteed to work on allwinner
> > > > D1. In order to ensure the developer's demand for network usage.
> > >
> > > That looks like some Allwinner BSP driver, please don't endorse code
> > > of this quality (just look at all that commented code and the attempt
> > > for compile-time configuration).
> > >
> > > > It only could work at 1Gps mode.
> > > >
> > > > The correct gmac driver should follow (I guess)
> > > > drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
> > > >
> > > > If anyone is familiar with it and can help porting, I would be
> > > > very grateful.
> > >
> > > Have you tried compiling and using that driver? Ideally it should just
> > > work, Linux drivers are meant to be portable, by design. And the driver
> > > is already enabled by COMPILE_TEST.
> >
> > It still needs some work with dwmac-sun8i.c glue layer, eg:
> > tx/rx-delay setting, clk & pinmux drivers.
> >
> > The patch is just to help people using D1 with GMAC temporarily with
> > network function.
>
> It should be marked "DO NOT MERGE" or similar then.
Yes, thx for reminding. I'll fix it next time.

>
> Best regards,
> Jernej
>
> >
> > > But I guess you need some extra care to make the non-coherent DMA work?
> > > I haven't looked in detail, but are those new CMOs hooked into the
> > > generic DMA framework?
> >
> > Yes, we have the simliar principle with arm & csky for non-coherent:
> >  - Using PTE attributes setting Using PTE attributes to support
> > _PAGE_IOREMAP & _PAGE_WRITECOMBINE
> >  - Using CMO instructions deal SYNC_DMA_FOR_CPU/DEVICE.
> >
> > > Cheers,
> > > Andre
> > >
> > > > Signed-off-by: Liu Shaohua <liush@...winnertech.com>
> > > > Tested-by: Guo Ren <guoren@...nel.org>
> > > > Signed-off-by: Guo Ren <guoren@...nel.org>
> > > > Cc: Maxime Ripard <mripard@...nel.org>
> > > > Cc: Corentin Labbe <clabbe@...libre.com>
> > > > Cc: Samuel Holland <samuel@...lland.org>
> > > > Cc: Icenowy Zheng <icenowy@...c.io>
> > > > Cc: LABBE Corentin <clabbe.montjoie@...il.com>
> > > > Cc: Michael Walle <michael@...le.cc>
> > > > Cc: Chen-Yu Tsai <wens@...e.org>
> > > > Cc: Maxime Ripard <maxime@...no.tech>
> > > > Cc: Wei Fu <wefu@...hat.com>
> > > > Cc: Wei Wu <lazyparser@...il.com>
> > > > Signed-off-by: Guo Ren <guoren@...ux.alibaba.com>
>
>
>


-- 
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ