> phy_resume call phydrv->resume without take mutex.
> if phy driver implement resume function, for example marvell_resume, then
>
> static int marvell_resume(struct phy_device *phydev)
> {
> int err;
>
> /* Resume the fiber mode first */
> if (!(phydev->supported & SUPPORTED_FI
On 2017/6/24 11:40, Yunsheng Lin wrote:
> Hi, Andrew
>
> On 2017/6/24 11:12, Andrew Lunn wrote:
>>> +int phy_loopback(struct phy_device *phydev, bool enable)
>>> +{
>>> + struct phy_driver *phydrv = to_phy_driver(phydev->mdio.dev.driver);
>>> + int ret = 0;
>>> +
>>> + if (enable && phydev
Hi, Andrew
On 2017/6/24 11:12, Andrew Lunn wrote:
>> +int phy_loopback(struct phy_device *phydev, bool enable)
>> +{
>> +struct phy_driver *phydrv = to_phy_driver(phydev->mdio.dev.driver);
>> +int ret = 0;
>> +
>> +if (enable && phydev->loopback_enabled)
>> +return -EBUSY;
> +int phy_loopback(struct phy_device *phydev, bool enable)
> +{
> + struct phy_driver *phydrv = to_phy_driver(phydev->mdio.dev.driver);
> + int ret = 0;
> +
> + if (enable && phydev->loopback_enabled)
> + return -EBUSY;
> +
> + if (!enable && !phydev->loopback_enabled)
This patch add set_loopback in phy_driver, which is used by Mac
driver to enable or disable a phy. it also add a generic
genphy_loopback function, which use BMCR loopback bit to enable
or disable a phy.
Signed-off-by: Lin Yun Sheng
---
drivers/net/phy/marvell.c| 1 +
drivers/net/phy/phy_dev