Subject: Re: [PATCH net-next 1/1] net: phy: unbind phy device from generic and specifical driver

From: Florian Fainelli <[email-masked]>
Date: Mon, 26 Jan 2015 09:47:03 -0800

On 26/01/15 09:14, Florian Fainelli wrote:
> On 26/01/15 00:14, Fugang Duan wrote:
>> The current .phy_detach() function only unbind generic phy driver, which causes
>> specifical driver suspend/resume function still work like Atheros AT803X PHYs.
>>
>> For example:
>> ifconfig eth0 down
>> echo mem > /sys/power/status
>>
>> After eth0 interface down, driver call phy_detach to unbind phy driver, and then
>> do suspend/resume operation, at803x_suspend()/at803x_resume() functions still get
>> called that call mdio bus read/write function. When eth0 interface down, MAC driver
>> may close all clocks and mdio bus cannot work. So the issue happens.
> 
> I was just hitting this problem on Friday evening and was about to
> submit a similar change. Thanks!
> 
>>
>> The patch can unbind generic and specifical driver.
>>
>> Signed-off-by: Fugang Duan <[email-masked]>
> 
> Acked-by: Florian Fainelli <[email-masked]>
> Tested-by: Florian Fainelli <[email-masked]>

Humm, this breaks a sequence of ifconfig down then up, the driver is
removed, and we never get to probe it again, does this work for you
using the FEC driver?

Another way to solve this double suspend problem is to make sure that we
track whether the PHY has already been suspended.
-- 
Florian