[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250826064918.xhqwgndlnhbfnvnb@DEN-DL-M31836.microchip.com>
Date: Tue, 26 Aug 2025 08:49:18 +0200
From: Horatiu Vultur - M31836 <Horatiu.Vultur@...rochip.com>
To: Parthiban Veerasooran - I17164 <Parthiban.Veerasooran@...rochip.com>
CC: "andrew@...n.ch" <andrew@...n.ch>, "hkallweit1@...il.com"
<hkallweit1@...il.com>, "linux@...linux.org.uk" <linux@...linux.org.uk>,
"davem@...emloft.net" <davem@...emloft.net>, "edumazet@...gle.com"
<edumazet@...gle.com>, "kuba@...nel.org" <kuba@...nel.org>,
"pabeni@...hat.com" <pabeni@...hat.com>, "richardcochran@...il.com"
<richardcochran@...il.com>, "netdev@...r.kernel.org"
<netdev@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next v2 2/2] net: phy: micrel: Add PTP support for
lan8842
The 08/25/2025 09:03, Parthiban Veerasooran - I17164 wrote:
Hi Parthiban,
>
> On 25/08/25 12:01 pm, Horatiu Vultur wrote:
> > + /* As the lan8814 and lan8842 has the same IP for the PTP block, the
> > + * only difference is the number of the GPIOs, then make sure that the
> > + * lan8842 initialized also the shared data pointer as this is used in
> > + * all the PTP functions for lan8814. The lan8842 doesn't have multiple
> > + * PHYs in the same package.
> > + */
> > + addr = lanphy_read_page_reg(phydev, LAN8814_PAGE_COMMON_REGS,
> > + LAN8842_STRAP_REG);
> > + addr &= LAN8842_STRAP_REG_PHYADDR_MASK;
> > + if (addr < 0)
> > + return addr;
> > +
> > + devm_phy_package_join(&phydev->mdio.dev, phydev, addr,
> > + sizeof(struct lan8814_shared_priv));
> Shouldn't you check the return value of devm_phy_package_join()?
> Apologies — I missed to comment in my previous review.
Yes, I should check the return value. I will fix this in the next
version.
No worries, thanks for catching this.
>
> Best regards,
> Parthiban V
> > + if (phy_package_init_once(phydev)) {
> > + ret = lan8842_ptp_probe_once(phydev);
> > + if (ret)
> > + return ret;
> > + }
> > +
> > + lan8814_ptp_init(phydev);
> > +
> > return 0;
> > }
--
/Horatiu
Powered by blists - more mailing lists