Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 941f4134 authored by Vijay Viswanath's avatar Vijay Viswanath
Browse files

mmc: block: Unhalt the command queue before releasing mmc host



In the IOCTL path, the command queue is halted before servicing
the ioctl requests. Once the ioctl request is serviced, the ioctl
context releases mmc host and then unhalts the controller. This can
cause race conditions where mmc driver would end up in a bad state.
If another context B, which wants to send a legacy command, comes up
between the time ioctl releases the host and unhalts the controller.
Then the context B will see that cmdq is already halted and will prepare
a legacy command. Once context B sends the legacy command, the ioctl
context may unhalt the cmdq. This will mask the legacy interrupts and
context B will never receive interrupts for the command it sent.

To prevent this, unhalt the controller before the ioctl context releases
the host.

Change-Id: I65d3b4a709813549e7e5d48d94065a753164f9d0
Signed-off-by: default avatarVijay Viswanath <vviswana@codeaurora.org>
parent e3950ebc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment