[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a962b46c-343d-411b-9152-514b35aa4f00@lunn.ch>
Date: Fri, 26 Jan 2024 14:15:39 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
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
> > + *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.
Andrew
Powered by blists - more mailing lists