aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-04-11 16:28:05 -0400
committerDavid S. Miller <davem@davemloft.net>2014-04-11 16:28:05 -0400
commit45cdf9f3f359fb3c59987fd49cdacefa53040a4c (patch)
tree03aa9f5740a33f39d7ccd643048e63e94097b73b
parent676d23690fb62b5d51ba5d659935e9f7d9da9f8e (diff)
parentf63a975e8f07a75dbf0386402788330d0bebd8d8 (diff)
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.c14
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)
687 687
688 cpsw_dual_emac_src_port_detect(status, priv, ndev, skb); 688 cpsw_dual_emac_src_port_detect(status, priv, ndev, skb);
689 689
690 if (unlikely(status < 0)) { 690 if (unlikely(status < 0) || unlikely(!netif_running(ndev))) {
691 /* the interface is going down, skbs are purged */ 691 /* the interface is going down, skbs are purged */
692 dev_kfree_skb_any(skb); 692 dev_kfree_skb_any(skb);
693 return; 693 return;
@@ -1252,6 +1252,12 @@ static int cpsw_ndo_open(struct net_device *ndev)
1252 cpsw_set_coalesce(ndev, &coal); 1252 cpsw_set_coalesce(ndev, &coal);
1253 } 1253 }
1254 1254
1255 napi_enable(&priv->napi);
1256 cpdma_ctlr_start(priv->dma);
1257 cpsw_intr_enable(priv);
1258 cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_RX);
1259 cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_TX);
1260
1255 prim_cpsw = cpsw_get_slave_priv(priv, 0); 1261 prim_cpsw = cpsw_get_slave_priv(priv, 0);
1256 if (prim_cpsw->irq_enabled == false) { 1262 if (prim_cpsw->irq_enabled == false) {
1257 if ((priv == prim_cpsw) || !netif_running(prim_cpsw->ndev)) { 1263 if ((priv == prim_cpsw) || !netif_running(prim_cpsw->ndev)) {
@@ -1260,12 +1266,6 @@ static int cpsw_ndo_open(struct net_device *ndev)
1260 } 1266 }
1261 } 1267 }
1262 1268
1263 napi_enable(&priv->napi);
1264 cpdma_ctlr_start(priv->dma);
1265 cpsw_intr_enable(priv);
1266 cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_RX);
1267 cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_TX);
1268
1269 if (priv->data.dual_emac) 1269 if (priv->data.dual_emac)
1270 priv->slaves[priv->emac_port].open_stat = true; 1270 priv->slaves[priv->emac_port].open_stat = true;
1271 return 0; 1271 return 0;