]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: resume phydev when going to RESUMING
authorZhangfei Gao <zhangfei.gao@linaro.org>
Thu, 15 May 2014 05:35:34 +0000 (13:35 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 May 2014 19:17:58 +0000 (15:17 -0400)
commit877995efd49dd93791b68f6e0a362976b6d745c4
tree729b51179e2cf5a3616b5520684219052722616f
parent48c9243f1520d5d8945a0ed3893441803d81c743
net: phy: resume phydev when going to RESUMING

With commit 0818fb4d651d37a7c ("net: phy: suspend phydev when going
to HALTED"), an unused PHY device will be put in a low-power mode
using BMCR_PDOWN. Some Ethernet drivers might be calling phy_start()
and phy_stop() from ndo_open and ndo_close() respectively, while
calling phy_connect() and phy_disconnect() from probe and remove.
In such a case, the PHY will be powered down during the phy_stop()
call, but will fail to be powered up in phy_start().
This patch fixes this scenario.

Signed-off-by: Jiancheng Xue <xuejiancheng@huawei.com>
Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy.c