Commit 2d161817 authored by Michael Büsch's avatar Michael Büsch Committed by John W. Linville
Browse files

p54spi: Fix workqueue deadlock

priv->work must not be synced while priv->mutex is locked, because
the mutex is taken in the work handler.
Move cancel_work_sync down to after the device shutdown code.
This is safe, because the work handler checks fw_state and bails out
early in case of a race.
Signed-off-by: default avatarMichael Buesch <>
Cc: <>
Acked-by: default avatarChristian Lamparter <>
Signed-off-by: default avatarJohn W. Linville <>
parent 32d3a392
......@@ -588,8 +588,6 @@ static void p54spi_op_stop(struct ieee80211_hw *dev)
WARN_ON(priv->fw_state != FW_STATE_READY);
spin_lock_irqsave(&priv->tx_lock, flags);
......@@ -597,6 +595,8 @@ static void p54spi_op_stop(struct ieee80211_hw *dev)
priv->fw_state = FW_STATE_OFF;
static int __devinit p54spi_probe(struct spi_device *spi)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment