Patch "tmio_mmc: don't clear unhandled pending interrupts" has been added to the 2.6.32-stable tree
Subsystems (2)
[email protected]
AppliedThis is a note to let you know that I've just added the patch titled
tmio_mmc: don't clear unhandled pending interrupts
to the 2.6.32-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
tmio_mmc-don-t-clear-unhandled-pending-interrupts.patch
and it can be found in the queue-2.6.32 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
b78d6c5f51935ba89df8db33a57bacb547aa7325Mon Sep 17 00:00:00 2001
From: Yusuke Goda <[email protected]>
Date: Thu, 9 Sep 2010 16:37:39 -0700
Subject: tmio_mmc: don't clear unhandled pending interrupts
From: Yusuke Goda <[email protected]>
commit b78d6c5f51935ba89df8db33a57bacb547aa7325 upstream.
Previously, it was possible for ack_mmc_irqs() to clear pending interrupt bits in the CTL_STATUS register, even though the interrupt handler had not been called. This was because of a race that existed when doing a read-modify-write sequence on CTL_STATUS. After the read step in this sequence, if an interrupt occurred (causing one of the bits in CTL_STATUS to be set) the write step would inadvertently clear it.
Observed with the TMIO_STAT_RXRDY bit together with CMD53 on AR6002 and BCM4318 SDIO cards in polled mode.
This patch eliminates this race by only writing to CTL_STATUS and clearing the interrupts that were passed as an argument to ack_mmc_irqs()."
--- drivers/mmc/host/tmio_mmc.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/mmc/host/tmio_mmc.h +1 -4
@@ -102,10 +102,7 @@#define ack_mmc_irqs (host, i) \ do { \ - u32 mask;\ - mask = sd_ctrl_read32((host), CTL_STATUS); \ - mask &= ~((i) & TMIO_MASK_IRQ); \ - sd_ctrl_write32((host), CTL_STATUS, mask); \ + sd_ctrl_write32((host), CTL_STATUS, ~(i)); \ } while (0)
Patches currently in stable-queue which might be from [email protected] are
queue-2.6.32/tmio_mmc-don-t-clear-unhandled-pending-interrupts.patch