> I've decided to solve this by changing it to:
>
> + * phy_restore_page() must always be called after this, irrespective
> + * of success or failure of this call.
>
> iow, not explaining /why/.
Hi Russell
That is fine by my. A quick read of the code makes it clear why.
Andrew
On Sun, Dec 31, 2017 at 10:07:14AM +, Russell King - ARM Linux wrote:
> On Sun, Dec 31, 2017 at 09:10:39AM +0100, Andrew Lunn wrote:
> > > +/**
> > > + * phy_save_page() - take the bus lock and save the current page
> > > + * @phydev: a pointer to a &struct phy_device
> > > + *
> > > + * Take t
On Sun, Dec 31, 2017 at 09:10:39AM +0100, Andrew Lunn wrote:
> > +/**
> > + * phy_save_page() - take the bus lock and save the current page
> > + * @phydev: a pointer to a &struct phy_device
> > + *
> > + * Take the MDIO bus lock, and return the current page number. On error,
> > + * returns a nega
> +/**
> + * phy_save_page() - take the bus lock and save the current page
> + * @phydev: a pointer to a &struct phy_device
> + *
> + * Take the MDIO bus lock, and return the current page number. On error,
> + * returns a negative errno. phy_restore_page() must be called after this
> + * to release
Add a set of paged phy register accessors which are inherently safe in
their design against other accesses interfering with the paged access.
Signed-off-by: Russell King
---
drivers/net/phy/phy-core.c | 157 +
include/linux/phy.h| 11
2 f