bcm2835-mmc: Prevent DMA race condition
authorPhil Elwell <phil@raspberrypi.org>
Tue, 18 Jul 2017 14:30:48 +0000 (15:30 +0100)
committerRaspbian kernel package updater <root@raspbian.org>
Sun, 23 Jul 2017 03:09:35 +0000 (03:09 +0000)
commita5d104e0d646f5acb7f68311ee840839b00e36e5
tree2a39cc368e59e2fe613a8547af682189b84c78fd
parent5e637a0c1d646e68f22faac74ba05e8c72ce7c99
bcm2835-mmc: Prevent DMA race condition

The end of a read operation is triggered by the completion of the DMA
transfer, but writes are complete when the data IRQ is raised. The
bcm2835-mmc driver contains a race between the handling of the DMA
completion interrupt and the submission of the next request. Fix the
race by deferring the completion of the request until the DMA
transfer finishes.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
drivers/mmc/host/bcm2835-mmc.c