Changeset 33312


Ignore:
Timestamp:
2012-09-03T12:26:01+02:00 (4 years ago)
Author:
florian
Message:

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

Fixes sporadic crashes while reconfiguring the network interface.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/mcs814x/files-3.3/drivers/net/ethernet/mcs8140/nuport_mac.c

    r33079 r33312  
    830830static int nuport_mac_close(struct net_device *dev) 
    831831{ 
     832        u32 reg; 
    832833        struct nuport_mac_priv *priv = netdev_priv(dev); 
    833834 
    834835        spin_lock_irq(&priv->lock); 
     836        reg = nuport_mac_readl(CTRL_REG); 
     837        reg &= ~(RX_ENABLE | TX_ENABLE); 
     838        nuport_mac_writel(reg, CTRL_REG); 
     839 
    835840        napi_disable(&priv->napi); 
    836841        netif_stop_queue(dev); 
Note: See TracChangeset for help on using the changeset viewer.