nuport-mac: disable MAC RX and TX during interface close
Fixes sporadic crashes while reconfiguring the network interface. SVN-Revision: 33312
This commit is contained in:
parent
088a126240
commit
e88e20d975
@ -829,9 +829,14 @@ out_emac_clk:
|
|||||||
|
|
||||||
static int nuport_mac_close(struct net_device *dev)
|
static int nuport_mac_close(struct net_device *dev)
|
||||||
{
|
{
|
||||||
|
u32 reg;
|
||||||
struct nuport_mac_priv *priv = netdev_priv(dev);
|
struct nuport_mac_priv *priv = netdev_priv(dev);
|
||||||
|
|
||||||
spin_lock_irq(&priv->lock);
|
spin_lock_irq(&priv->lock);
|
||||||
|
reg = nuport_mac_readl(CTRL_REG);
|
||||||
|
reg &= ~(RX_ENABLE | TX_ENABLE);
|
||||||
|
nuport_mac_writel(reg, CTRL_REG);
|
||||||
|
|
||||||
napi_disable(&priv->napi);
|
napi_disable(&priv->napi);
|
||||||
netif_stop_queue(dev);
|
netif_stop_queue(dev);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user