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:   Thu, 19 Aug 2021 17:33:15 +0000
From:   Biju Das <biju.das.jz@...renesas.com>
To:     Sergey Shtylyov <s.shtylyov@....ru>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>
CC:     Sergei Shtylyov <sergei.shtylyov@...il.com>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        Sergey Shtylyov <s.shtylyov@...russia.ru>,
        Adam Ford <aford173@...il.com>, Andrew Lunn <andrew@...n.ch>,
        Yuusuke Ashizuka <ashiduka@...itsu.com>,
        Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-renesas-soc@...r.kernel.org" 
        <linux-renesas-soc@...r.kernel.org>,
        Chris Paterson <Chris.Paterson2@...esas.com>,
        Biju Das <biju.das@...renesas.com>,
        Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@...renesas.com>
Subject: RE: [PATCH net-next v3 2/9] ravb: Add struct ravb_hw_info to driver
 data

Hi Sergei,

> Subject: Re: [PATCH net-next v3 2/9] ravb: Add struct ravb_hw_info to
> driver data
> 
> On 8/18/21 10:07 PM, Biju Das wrote:
> 
> > The DMAC and EMAC blocks of Gigabit Ethernet IP found on RZ/G2L SoC
> > are similar to the R-Car Ethernet AVB IP. With a few changes in the
> > driver we can support both IPs.
> >
> > This patch adds the struct ravb_hw_info to hold hw features, driver
> > data and function pointers to support both the IPs. It also replaces
> > the driver data chip type with struct ravb_hw_info by moving chip type
> to it.
> >
> > Signed-off-by: Biju Das <biju.das.jz@...renesas.com>
> > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
> > Reviewed-by: Andrew Lunn <andrew@...n.ch>
> > ---
> > v2->v3:
> >  * Retained Rb tag from Andrew, since there is no functionality change
> >    apart from just splitting the patch into 2. Also updated the commit
> >    description.
> > v2:
> >  * Incorporated Andrew and Sergei's review comments for making it
> smaller patch
> >    and provided detailed description.
> 
> [...]
> >  static inline u32 ravb_read(struct net_device *ndev, enum ravb_reg
> > reg) diff --git a/drivers/net/ethernet/renesas/ravb_main.c
> > b/drivers/net/ethernet/renesas/ravb_main.c
> > index 94eb9136752d..b6554e5e13af 100644
> > --- a/drivers/net/ethernet/renesas/ravb_main.c
> > +++ b/drivers/net/ethernet/renesas/ravb_main.c
> [...]
> > @@ -2113,7 +2122,7 @@ static int ravb_probe(struct platform_device
> *pdev)
> >  		}
> >  	}
> >
> > -	priv->chip_id = chip_id;
> > +	priv->chip_id = info->chip_id;
> 
>    Do we still need priv->chip_id?

The patch currently merged is preparation patch, subsequent patch will replace
all the chip_id in ravb_main with hardware features and driver features.
After that both priv->chip_id and info_chipid is not required for ravb_main.c

However ptp driver[1] still uses it, by adding a feature bit we can replace
that as well. So going forward, there won't be any priv->chip_id or info->chip_id.

Does it makes sense?

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/renesas/ravb_ptp.c?h=v5.14-rc6#n200

Regards,
Biju

> 
> >  	priv->clk = devm_clk_get(&pdev->dev, NULL);
> >  	if (IS_ERR(priv->clk)) {
> [...]
> 
> Reviewed-by: Sergey Shtylyov <s.shtylyov@....ru>
> 
> [...]
> 
> MBR, Sergey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ