msm: sdio_dmux: do subsystem restart client notification earlier
Perform the receive_cb(NULL) notification before cleaning
up any pending write skb's. This allows clients to update
their cached reset status based upon the
receive_cb(NULL) in case they need to do special
handling of the cancelled write skb's.
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
diff --git a/arch/arm/mach-msm/sdio_dmux.c b/arch/arm/mach-msm/sdio_dmux.c
index 6377c58..c998403 100644
--- a/arch/arm/mach-msm/sdio_dmux.c
+++ b/arch/arm/mach-msm/sdio_dmux.c
@@ -867,6 +867,11 @@
sdio_ch[i].status |= SDIO_CH_IN_RESET;
sdio_ch[i].status &= ~SDIO_CH_REMOTE_OPEN;
+ /* notify client so it can update its status */
+ if (sdio_ch[i].receive_cb)
+ sdio_ch[i].receive_cb(
+ sdio_ch[i].priv, NULL);
+
/* cancel any pending writes */
spin_lock_irqsave(&sdio_mux_write_lock,
write_lock_flags);
@@ -879,11 +884,6 @@
}
spin_unlock_irqrestore(&sdio_mux_write_lock,
write_lock_flags);
-
- /* notify client so it can update its status */
- if (sdio_ch[i].receive_cb)
- sdio_ch[i].receive_cb(
- sdio_ch[i].priv, NULL);
}
spin_unlock_irqrestore(&sdio_ch[i].lock, ch_lock_flags);
}