blob: 2533c46fc0e9590597ec435901adcf2e886a94d4 [file] [log] [blame]
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Tue, 25 Mar 2014 18:34:20 +0100
Subject: net: gianfar: Do not disable interrupts
each per-queue lock is taken with spin_lock_irqsave() except in the case
where all of them are taken for some kind of serialisation. As an
optimisation local_irq_save() is used so that lock_tx_qs() and
lock_rx_qs() can use just the spin_lock() variant instead.
On RT local_irq_save() behaves differently so we use the nort()
variant.
Lockdep screems easily by "ethtool -K eth0 rx off tx off"
What remains is missing lockdep annotation that makes lockdep think
lock_tx_qs() may cause a dead lock.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
drivers/net/ethernet/freescale/gianfar.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -1540,7 +1540,7 @@ static int gfar_suspend(struct device *d
if (netif_running(ndev)) {
- local_irq_save(flags);
+ local_irq_save_nort(flags);
lock_tx_qs(priv);
gfar_halt_nodisable(priv);
@@ -1556,7 +1556,7 @@ static int gfar_suspend(struct device *d
gfar_write(&regs->maccfg1, tempval);
unlock_tx_qs(priv);
- local_irq_restore(flags);
+ local_irq_restore_nort(flags);
disable_napi(priv);
@@ -1598,7 +1598,7 @@ static int gfar_resume(struct device *de
/* Disable Magic Packet mode, in case something
* else woke us up.
*/
- local_irq_save(flags);
+ local_irq_save_nort(flags);
lock_tx_qs(priv);
tempval = gfar_read(&regs->maccfg2);
@@ -1608,7 +1608,7 @@ static int gfar_resume(struct device *de
gfar_start(priv);
unlock_tx_qs(priv);
- local_irq_restore(flags);
+ local_irq_restore_nort(flags);
netif_device_attach(ndev);
@@ -3418,14 +3418,14 @@ static irqreturn_t gfar_error(int irq, v
dev->stats.tx_dropped++;
atomic64_inc(&priv->extra_stats.tx_underrun);
- local_irq_save(flags);
+ local_irq_save_nort(flags);
lock_tx_qs(priv);
/* Reactivate the Tx Queues */
gfar_write(&regs->tstat, gfargrp->tstat);
unlock_tx_qs(priv);
- local_irq_restore(flags);
+ local_irq_restore_nort(flags);
}
netif_dbg(priv, tx_err, dev, "Transmit Error\n");
}