[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z4Ki1h1h0OCxHfsb@hoboy.vegasvil.org>
Date: Sat, 11 Jan 2025 08:56:54 -0800
From: Richard Cochran <richardcochran@...il.com>
To: Jiawen Wu <jiawenwu@...stnetic.com>
Cc: andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, linux@...linux.org.uk,
horms@...nel.org, jacob.e.keller@...el.com, netdev@...r.kernel.org,
vadim.fedorenko@...ux.dev, mengyuanlou@...-swift.com
Subject: Re: [PATCH net-next v3 4/4] net: ngbe: Add support for 1PPS and TOD
On Fri, Jan 10, 2025 at 11:17:16AM +0800, Jiawen Wu wrote:
> +static void wx_ptp_setup_sdp(struct wx *wx)
> +{
> + struct cyclecounter *cc = &wx->hw_cc;
> + u32 tsauxc, rem, tssdp, tssdp1;
> + u32 trgttiml0, trgttimh0;
> + u32 trgttiml1, trgttimh1;
> + unsigned long flags;
> + u64 ns = 0;
> +
> + if (wx->pps_width >= WX_NS_PER_SEC) {
> + wx_err(wx, "PTP pps width cannot be longer than 1s!\n");
> + return;
> + }
Instead of silently doing nothing, the driver should return an error
if the dialed period cannot be supported.
Thanks,
Richard
Powered by blists - more mailing lists