net: phy: handle state correctly in phy_stop_machine