RE: [PATCH net-next 10/11] net: enetc: add preliminary support for i.MX95 ENETC PF

From: Wei Fang
Date: Mon Oct 14 2024 - 05:21:23 EST


> -----Original Message-----
> From: Simon Horman <horms@xxxxxxxxxx>
> Sent: 2024年10月14日 17:07
> To: Wei Fang <wei.fang@xxxxxxx>
> Cc: davem@xxxxxxxxxxxxx; edumazet@xxxxxxxxxx; kuba@xxxxxxxxxx;
> pabeni@xxxxxxxxxx; robh@xxxxxxxxxx; krzk+dt@xxxxxxxxxx;
> conor+dt@xxxxxxxxxx; Vladimir Oltean <vladimir.oltean@xxxxxxx>; Claudiu
> Manoil <claudiu.manoil@xxxxxxx>; Clark Wang <xiaoning.wang@xxxxxxx>;
> Frank Li <frank.li@xxxxxxx>; christophe.leroy@xxxxxxxxxx;
> linux@xxxxxxxxxxxxxxx; bhelgaas@xxxxxxxxxx; imx@xxxxxxxxxxxxxxx;
> netdev@xxxxxxxxxxxxxxx; devicetree@xxxxxxxxxxxxxxx;
> linux-kernel@xxxxxxxxxxxxxxx; linux-pci@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH net-next 10/11] net: enetc: add preliminary support for
> i.MX95 ENETC PF
>
> On Wed, Oct 09, 2024 at 05:51:15PM +0800, Wei Fang wrote:
> > The i.MX95 ENETC has been upgraded to revision 4.1, which is very
> > different from the LS1028A ENETC (revision 1.0) except for the SI
> > part. Therefore, the fsl-enetc driver is incompatible with i.MX95
> > ENETC PF. So we developed the nxp-enetc4 driver for i.MX95 ENETC
> > PF, and this driver will be used to support the ENETC PF with major
> > revision 4 in the future.
> >
> > Currently, the nxp-enetc4 driver only supports basic transmission
> > feature for i.MX95 ENETC PF, the more basic and advanced features
> > will be added in the subsequent patches.
> >
> > Signed-off-by: Wei Fang <wei.fang@xxxxxxx>
>
> ...
>
> > diff --git a/drivers/net/ethernet/freescale/enetc/enetc4_pf.c
> b/drivers/net/ethernet/freescale/enetc/enetc4_pf.c
>
> ...
>
> > +static void enetc4_pf_remove(struct pci_dev *pdev)
> > +{
> > + struct enetc_si *si;
> > + struct enetc_pf *pf;
> > +
> > + si = pci_get_drvdata(pdev);
> > + pf = enetc_si_priv(si);
>
> Hi Wei Fang,
>
> pf is set but otherwise unused in this function. So I think that it, and
> the call to enetc_si_priv() should probably be removed. They can be added
> back if and when they are needed in subsequent patches.
>

Thanks very much, I forgot to remove it when I copied from local branch. :(

> > +
> > + enetc4_pf_netdev_destroy(si);
> > + enetc_pci_remove(pdev);
> > +}
>
> ...