Skip to content

Commit

Permalink
Merge branch 'cpsw'
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller committed Apr 11, 2014
2 parents 676d236 + f63a975 commit 45cdf9f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions drivers/net/ethernet/ti/cpsw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)) {
Expand All @@ -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;
Expand Down

0 comments on commit 45cdf9f

Please sign in to comment.