提交 8e0b1bf6 编写于 作者: L Lennert Buytenhek 提交者: Lennert Buytenhek

mv643xx_eth: fix inconsistent lock semantics

Nicolas Pitre noted that mv643xx_eth_poll was incorrectly using
non-IRQ-safe locks while checking whether to wake up the netdevice's
transmit queue.  Convert the locking to *_irq() variants, since we
are running from softirq context where interrupts are enabled.
Signed-off-by: NLennert Buytenhek <buytenh@marvell.com>
上级 92c70f27
...@@ -634,9 +634,9 @@ static int mv643xx_eth_poll(struct napi_struct *napi, int budget) ...@@ -634,9 +634,9 @@ static int mv643xx_eth_poll(struct napi_struct *napi, int budget)
txq_reclaim(mp->txq + i, 0); txq_reclaim(mp->txq + i, 0);
if (netif_carrier_ok(mp->dev)) { if (netif_carrier_ok(mp->dev)) {
spin_lock(&mp->lock); spin_lock_irq(&mp->lock);
__txq_maybe_wake(mp->txq + mp->txq_primary); __txq_maybe_wake(mp->txq + mp->txq_primary);
spin_unlock(&mp->lock); spin_unlock_irq(&mp->lock);
} }
} }
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册