Re: [PATCH net-next 2/2] net: phy: micrel: lan8814: Add support for PTP_PF_PEROUT

From: Horatiu Vultur - M31836
Date: Fri Apr 05 2024 - 05:17:48 EST


The 04/05/2024 08:35, Divya Koppera - I30481 wrote:
> Hi Horatiu,

Hi Divya,

> > + ts_on.tv_sec = rq->perout.on.sec;
> > + ts_on.tv_nsec = rq->perout.on.nsec;
> > + on_nsec = timespec64_to_ns(&ts_on);
> > +
> > + ts_period.tv_sec = rq->perout.period.sec;
> > + ts_period.tv_nsec = rq->perout.period.nsec;
> > + period_nsec = timespec64_to_ns(&ts_period);
> > +
> > + if (period_nsec < 200) {
> > + pr_warn_ratelimited("%s: perout period too small, minimum
> > is 200 nsec\n",
> > + phydev_name(phydev));
> > + return -EOPNOTSUPP;
> > + }
>
> Unlock is Missing in above and below conditions.

Thanks for the review.

Jakob already mention this in a previous comment[1]. And I already sent a
new version where this is fixed.

[1] https://lore.kernel.org/netdev/20240404094137.51b1397e@xxxxxxxxxx/T/#m3053305f9a354ebf89e4dd0e6140f6cfbd2591e6

>
> > +
> > + if (on_nsec >= period_nsec) {
> > + pr_warn_ratelimited("%s: pulse width must be smaller than
> > period\n",
> > + phydev_name(phydev));
> > + return -EINVAL;
> > + }
> > +
--
/Horatiu