If the netif_device_attach() is called earlier, the state of dev_queue is
waked, txtimer might be modified, and the txtimer is added at same time.
It might make run_timer_softirq crashed, because the timer is be detached
twice together.
Change-Id: I31dde4e940bddcc36372ca1f4a8313c0389d4e6b
Signed-off-by: David Wu <david.wu@rock-chips.com>
stmmac_mdio_reset(priv->mii);
}
- netif_device_attach(ndev);
-
spin_lock_irqsave(&priv->lock, flags);
priv->cur_rx = 0;
netif_start_queue(ndev);
+ netif_device_attach(ndev);
+
spin_unlock_irqrestore(&priv->lock, flags);
if (priv->phydev)