[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250829062654.mr7fos3yp63d2wjv@DEN-DL-M31836.microchip.com>
Date: Fri, 29 Aug 2025 08:26:54 +0200
From: Horatiu Vultur <horatiu.vultur@...rochip.com>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
CC: <andrew@...n.ch>, <hkallweit1@...il.com>, <davem@...emloft.net>,
<edumazet@...gle.com>, <kuba@...nel.org>, <pabeni@...hat.com>,
<richardcochran@...il.com>, <Parthiban.Veerasooran@...rochip.com>,
<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next v4 2/2] net: phy: micrel: Add PTP support for
lan8842
The 08/28/2025 09:27, Russell King (Oracle) wrote:
> Hi,
Hi Russell,
>
> Just a few comments.
>
> On Thu, Aug 28, 2025 at 09:34:25AM +0200, Horatiu Vultur wrote:
> > diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
> > index 9a90818481320..95ba1a2859a9a 100644
> > --- a/drivers/net/phy/micrel.c
> > +++ b/drivers/net/phy/micrel.c
> > @@ -457,6 +457,9 @@ struct lan8842_phy_stats {
> >
> > struct lan8842_priv {
> > struct lan8842_phy_stats phy_stats;
> > + int rev;
>
> Maybe make this a u16 and move it at the end of the struct?
Yes, I can make it u16 and move it at the end.
Just for understanding, do you want to move it at the end not to have
any holes in the struct?
>
> > + struct phy_device *phydev;
>
> Why do you need this member? In this patch, you initialise this, but
> never use it.
Actually is not needed, I forgot to remove it before sending the first
version.
>
> > @@ -5817,6 +5833,41 @@ static int lan8842_probe(struct phy_device *phydev)
> > if (ret < 0)
> > return ret;
> >
> > + /* Revision lan8832 doesn't have support for PTP, therefore don't add
> > + * any PTP clocks
> > + */
> > + priv->rev = lanphy_read_page_reg(phydev, LAN8814_PAGE_COMMON_REGS,
> > + LAN8842_SKU_REG);
> > + if (priv->rev < 0)
> > + return priv->rev;
>
> ret = lanphy_read_page_reg(phydev, LAN8814_PAGE_COMMON_REGS,
> LAN8842_SKU_REG);
> if (ret < 0)
> return ret;
>
> priv->rev = ret;
Yes, I will update it like you suggested in the next version.
>
> Thanks.
>
> --
> RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
--
/Horatiu
Powered by blists - more mailing lists