[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c554f7e6-7ed9-4298-b9f3-3f49a331fd07@linux.dev>
Date: Fri, 26 Jan 2024 15:26:00 +0000
From: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
To: Andrew Lunn <andrew@...n.ch>
Cc: Horatiu Vultur <horatiu.vultur@...rochip.com>, hkallweit1@...il.com,
linux@...linux.org.uk, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, richardcochran@...il.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
UNGLinuxDriver@...rochip.com,
Maxime Chevallier <maxime.chevallier@...tlin.com>,
Divya Koppera <divya.koppera@...rochip.com>
Subject: Re: [PATCH net-next] net: micrel: Fix set/get PHC time for lan8814
On 26/01/2024 13:15, Andrew Lunn wrote:
>>> + *sec |= lanphy_read_page_reg(phydev, 4, PTP_CLOCK_READ_SEC_MID);
>>
>> lanphy_read_page_reg returns int, but only 16 bits have meanings here.
>> Is it safe to assume that other 16 bits will be zeros always?
>
> Yes. __phy_read() should only return a negative error code, or a value
> which fits in a u16. If any of the top bits are set, its a bug in the
> MDIO driver which needs finding and fixing.
Got it. Thanks Andrew
Powered by blists - more mailing lists