From: Andrew Lunn <andrew@lunn•ch>
To: Jakub Kicinski <kuba@kernel•org>
Cc: Piergiorgio Beruto <piergiorgio.beruto@gmail•com>,
netdev@vger•kernel.org, peppe.cavallaro@st•com,
Voon Weifeng <weifeng.voon@intel•com>,
Rayagond Kokatanur <rayagond@vayavyalabs•com>,
Jose Abreu <Jose.Abreu@synopsys•com>,
Antonio Borneo <antonio.borneo@st•com>,
Tan Tee Min <tee.min.tan@intel•com>,
Kurt Kanzenbach <kurt@linutronix•de>
Subject: Re: [PATCH net] stmmac: fix potential division by 0
Date: Wed, 7 Dec 2022 14:48:23 +0100 [thread overview]
Message-ID: <Y5CZp0QJVejOpWSY@lunn.ch> (raw)
In-Reply-To: <20221206182823.08e5f917@kernel.org>
On Tue, Dec 06, 2022 at 06:28:23PM -0800, Jakub Kicinski wrote:
> On Thu, 1 Dec 2022 15:49:37 +0100 Andrew Lunn wrote:
> > > The root cause is the MAC using the internal clock as a PTP reference
> > > (default), which should be allowed since the connection to an external
> > > PTP clock is optional from an HW perspective. The internal clock seems
> > > to be derived from the MII clock speed, which is 2.5 MHz at 10 Mb/s.
> >
> > I think we need help from somebody who understands PTP on this device.
> > The clock is clearly out of range, but how important is that to PTP?
> > Will PTP work if the value is clamped to 0xff? Or should we be
> > returning -EINVAL and disabling PTP because it has no chance of
> > working?
>
> Indeed, we need some more info here :( Like does the PTP actually
> work with 2.5 MHz clock? The frequency adjustment only cares about
> the addend, what is sub_second_inc thing?
Hi Jakub
I Cc: many of the people who worked on PTP with this hardware, and
nobody has replied.
I think we should wait a couple more days, and then add a range check,
and disable PTP for invalid clocks. That might provoke feedback.
Andrew
next prev parent reply other threads:[~2022-12-07 13:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-01 0:37 [PATCH net] stmmac: fix potential division by 0 Piergiorgio Beruto
2022-12-01 1:39 ` Andrew Lunn
2022-12-01 10:24 ` Piergiorgio Beruto
2022-12-01 14:49 ` Andrew Lunn
2022-12-02 8:26 ` Piergiorgio Beruto
2022-12-07 2:28 ` Jakub Kicinski
2022-12-07 13:48 ` Andrew Lunn [this message]
2022-12-07 14:50 ` Kurt Kanzenbach
2022-12-08 0:26 ` Andrew Lunn
2022-12-08 9:27 ` Piergiorgio Beruto
2022-12-10 10:50 ` Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y5CZp0QJVejOpWSY@lunn.ch \
--to=andrew@lunn$(echo .)ch \
--cc=Jose.Abreu@synopsys$(echo .)com \
--cc=antonio.borneo@st$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=kurt@linutronix$(echo .)de \
--cc=netdev@vger$(echo .)kernel.org \
--cc=peppe.cavallaro@st$(echo .)com \
--cc=piergiorgio.beruto@gmail$(echo .)com \
--cc=rayagond@vayavyalabs$(echo .)com \
--cc=tee.min.tan@intel$(echo .)com \
--cc=weifeng.voon@intel$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox