forked from mirrors/linux
		
	net: phy: call state machine synchronously in phy_stop
phy_stop() may be called e.g. when suspending, therefore all needed actions should be performed synchronously. Therefore add a synchronous call to the state machine. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
		
							parent
							
								
									124eee3f69
								
							
						
					
					
						commit
						e8cfd9d6c7
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
					@ -861,6 +861,8 @@ void phy_stop(struct phy_device *phydev)
 | 
				
			||||||
out_unlock:
 | 
					out_unlock:
 | 
				
			||||||
	mutex_unlock(&phydev->lock);
 | 
						mutex_unlock(&phydev->lock);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						phy_state_machine(&phydev->state_queue.work);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Cannot call flush_scheduled_work() here as desired because
 | 
						/* Cannot call flush_scheduled_work() here as desired because
 | 
				
			||||||
	 * of rtnl_lock(), but PHY_HALTED shall guarantee phy_change()
 | 
						 * of rtnl_lock(), but PHY_HALTED shall guarantee phy_change()
 | 
				
			||||||
	 * will not reenable interrupts.
 | 
						 * will not reenable interrupts.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue