From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Jakub Kicinski <kuba@kernel.org>,
Holger Assmann <h.assmann@pengutronix.de>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>,
Alexandre Torgue <alexandre.torgue@st.com>,
Jose Abreu <joabreu@synopsys.com>,
"David S. Miller" <davem@davemloft.net>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Rayagond Kokatanur <rayagond@vayavyalabs.com>,
kernel@pengutronix.de, Michael Olbrich <m.olbrich@pengutronix.de>,
Jose Abreu <Jose.Abreu@synopsys.com>,
netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Richard Cochran <richardcochran@gmail.com>
Subject: Re: [PATCH 1/2] net: stmmac: retain PTP-clock at hwtstamp_set
Date: Thu, 17 Dec 2020 09:25:48 +0100 [thread overview]
Message-ID: <ae5371c0-ea53-6885-a25b-b44e9fe0b615@pengutronix.de> (raw)
In-Reply-To: <20201216171334.1e36fbff@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Hello,
On 17.12.20 02:13, Jakub Kicinski wrote:
>> + netdev_warn(priv->dev, "HW Timestamping init failed: %pe\n",
>> + ERR_PTR(ret));
>
> why convert to ERR_PTR and use %pe and not just %d?
To get a symbolic error name if support is compiled in (note the `e' after %p).
>
> also continuation misaligned
>
>> + } else {
>> + ret = stmmac_init_ptp(priv);
>> + if (ret == -EOPNOTSUPP)
>> + netdev_warn(priv->dev, "PTP not supported by HW\n");
>> + else if (ret)
>> + netdev_warn(priv->dev, "PTP init failed\n");
>> + }
>> }
>>
>> priv->eee_tw_timer = STMMAC_DEFAULT_TWT_LS;
>> @@ -5290,8 +5330,7 @@ int stmmac_resume(struct device *dev)
>> /* enable the clk previously disabled */
>> clk_prepare_enable(priv->plat->stmmac_clk);
>> clk_prepare_enable(priv->plat->pclk);
>> - if (priv->plat->clk_ptp_ref)
>> - clk_prepare_enable(priv->plat->clk_ptp_ref);
>> + stmmac_init_hwtstamp(priv);
>
> This was optional, now you always init?
Indeed, omitting the if condition here will lead to a needless warning on every reset.
Cheers,
Ahmad
>
>> /* reset the phy so that it's ready */
>> if (priv->mii)
>> stmmac_mdio_reset(priv->mii);
>>
>> base-commit: 3db1a3fa98808aa90f95ec3e0fa2fc7abf28f5c9
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2020-12-17 8:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-16 11:32 [PATCH 1/2] net: stmmac: retain PTP-clock at hwtstamp_set Holger Assmann
2020-12-16 11:32 ` [PATCH 2/2] net: stmmac: drop no longer variable priv member Holger Assmann
2020-12-17 1:13 ` [PATCH 1/2] net: stmmac: retain PTP-clock at hwtstamp_set Jakub Kicinski
2020-12-17 2:22 ` Richard Cochran
2020-12-17 8:25 ` Ahmad Fatoum [this message]
2020-12-17 17:59 ` Jakub Kicinski
2020-12-17 19:58 ` Ahmad Fatoum
2021-01-11 8:13 ` Holger Assmann
2020-12-27 7:08 ` kernel test robot
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=ae5371c0-ea53-6885-a25b-b44e9fe0b615@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=Jose.Abreu@synopsys.com \
--cc=alexandre.torgue@st.com \
--cc=davem@davemloft.net \
--cc=h.assmann@pengutronix.de \
--cc=joabreu@synopsys.com \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=m.olbrich@pengutronix.de \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
--cc=rayagond@vayavyalabs.com \
--cc=richardcochran@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).