[PATCH 1/2] net: stmmac: retain PTP-clock at hwtstamp_set

Holger Assmann h.assmann at pengutronix.de
Mon Jan 11 03:13:17 EST 2021


On Thu, 17.12.20 um 02:13 Jakub Kicinski wrote:
> 
> Thanks for the patch, minor nits below.

Thanks for the Feedback! I will work it in for my v2.

>> +
>> +	if (!(priv->dma_cap.time_stamp || priv->dma_cap.atime_stamp))
> 
> !a && !b reads better IMHO

We've chosen this variant because it is already used this way in
stmmac_main (e.g. in stmmac_hwtstamp_set(), stmmac_hwtstamp_get(), or
stmmac_validate()).

>> @@ -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?

This was not intended. Will be fixed in v2 to be optional again.

Regards,
Holger



More information about the linux-arm-kernel mailing list