diff options
author | Mugunthan V N <mugunthanvnm@ti.com> | 2013-05-01 21:52:11 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-05-02 16:52:04 -0400 |
commit | af5c6df704af46f2cfebea329887f3d70ccb7b3d (patch) | |
tree | 1c7a55c1c4f52644467bd29f57b0079d5e021434 | |
parent | 376414945d15aa636e65f7e773c1e398b7a21cb9 (diff) |
drivers: net: cpsw: irq not disabled in cpsw isr in particular sequence
In CPSW NAPI, after processing all interrupts IRQ is enabled and then book
keeping irq_enabled is updated. In random cases when a packet is transmitted
or received between processing packets and IRQ enabled, then just after
enabled IRQ and before irq_enabled is updated, ISR is called so IRQs are
not disabled as irq_enabled is still false and CPU gets locked in CPSW ISR.
By changing the sequence as update the irq_enabled and then enable IRQ
fixes the issue. This issue is not captured always as it is a timing issue
whether Tx or Rx IRQ is invoked between packet processing and enable IRQ.
Cc: Sebastian Siewior <bigeasy@linutronix.de>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/ti/cpsw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 59c43918883e..21a5b291b4b3 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c | |||
@@ -555,8 +555,8 @@ static int cpsw_poll(struct napi_struct *napi, int budget) | |||
555 | cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_RX); | 555 | cpdma_ctlr_eoi(priv->dma, CPDMA_EOI_RX); |
556 | prim_cpsw = cpsw_get_slave_priv(priv, 0); | 556 | prim_cpsw = cpsw_get_slave_priv(priv, 0); |
557 | if (prim_cpsw->irq_enabled == false) { | 557 | if (prim_cpsw->irq_enabled == false) { |
558 | cpsw_enable_irq(priv); | ||
559 | prim_cpsw->irq_enabled = true; | 558 | prim_cpsw->irq_enabled = true; |
559 | cpsw_enable_irq(priv); | ||
560 | } | 560 | } |
561 | } | 561 | } |
562 | 562 | ||