diff options
author | David S. Miller <davem@davemloft.net> | 2014-04-12 00:28:05 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-04-12 00:28:05 +0400 |
commit | 45cdf9f3f359fb3c59987fd49cdacefa53040a4c (patch) | |
tree | 03aa9f5740a33f39d7ccd643048e63e94097b73b | |
parent | 676d23690fb62b5d51ba5d659935e9f7d9da9f8e (diff) | |
parent | f63a975e8f07a75dbf0386402788330d0bebd8d8 (diff) | |
download | linux-45cdf9f3f359fb3c59987fd49cdacefa53040a4c.tar.xz |
Merge branch 'cpsw'
Mugunthan V N says:
====================
This patch series fixes the cpsw issue with interface up/dpwn with high
ethernet traffic.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/ti/cpsw.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 6133e4af9975..36aa109416c4 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -687,7 +687,7 @@ static void cpsw_rx_handler(void *token, int len, int status) cpsw_dual_emac_src_port_detect(status, priv, ndev, skb); - if (unlikely(status < 0)) { + if (unlikely(status < 0) || unlikely(!netif_running(ndev))) { /* the interface is going down, skbs are purged */ dev_kfree_skb_any(skb); return; @@ -1252,6 +1252,12 @@ static int cpsw_ndo_open(struct net_device *ndev) cpsw_set_coalesce(ndev, &coal); } + napi_enable(&priv->napi); + cpdma_ctlr_start(priv->dma); + cpsw_intr_enable(priv); + cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_RX); + cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_TX); + prim_cpsw = cpsw_get_slave_priv(priv, 0); if (prim_cpsw->irq_enabled == false) { if ((priv == prim_cpsw) || !netif_running(prim_cpsw->ndev)) { @@ -1260,12 +1266,6 @@ static int cpsw_ndo_open(struct net_device *ndev) } } - napi_enable(&priv->napi); - cpdma_ctlr_start(priv->dma); - cpsw_intr_enable(priv); - cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_RX); - cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_TX); - if (priv->data.dual_emac) priv->slaves[priv->emac_port].open_stat = true; return 0; |