mirror of https://gitee.com/openkylin/linux.git
Merge branch 'phy_stop-synchronous'
Heiner Kallweit says: ==================== net: phy: make phy_stop() synchronous There have been few not that successful attempts in the past to make phy_stop() a synchronous call instead of just changing the state. Patch 1 of this series addresses an issue which prevented this change. At least for me it works fine now. Would appreciate if Geert could re-test as well that suspend doesn't throw an error. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
f46f33a679
|
@ -861,6 +861,8 @@ void phy_stop(struct phy_device *phydev)
|
|||
out_unlock:
|
||||
mutex_unlock(&phydev->lock);
|
||||
|
||||
phy_state_machine(&phydev->state_queue.work);
|
||||
|
||||
/* Cannot call flush_scheduled_work() here as desired because
|
||||
* of rtnl_lock(), but PHY_HALTED shall guarantee phy_change()
|
||||
* will not reenable interrupts.
|
||||
|
|
|
@ -155,7 +155,7 @@ static void linkwatch_do_dev(struct net_device *dev)
|
|||
clear_bit(__LINK_STATE_LINKWATCH_PENDING, &dev->state);
|
||||
|
||||
rfc2863_policy(dev);
|
||||
if (dev->flags & IFF_UP) {
|
||||
if (dev->flags & IFF_UP && netif_device_present(dev)) {
|
||||
if (netif_carrier_ok(dev))
|
||||
dev_activate(dev);
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue