1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-24 03:58:35 +02:00

[mcs814x] nuport-mac: disable MAC RX and TX during interface close

Fixes sporadic crashes while reconfiguring the network interface.

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33312 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
florian 2012-09-03 10:26:01 +00:00
parent 1f8154c1de
commit cfcb04f63c

View File

@ -829,9 +829,14 @@ out_emac_clk:
static int nuport_mac_close(struct net_device *dev)
{
u32 reg;
struct nuport_mac_priv *priv = netdev_priv(dev);
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);
netif_stop_queue(dev);