summaryrefslogtreecommitdiff
path: root/drivers/mfd
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2013-12-02 11:20:36 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-15 23:31:42 (GMT)
commita0f7028b1c093b02d2a482e6da536ef7e2d24f50 (patch)
treeab3c464147f8e6db1a480a47ae340a04c83d5476 /drivers/mfd
parentac4de081312a65427e847157f46ea35cab2d7b82 (diff)
downloadlinux-fsl-qoriq-a0f7028b1c093b02d2a482e6da536ef7e2d24f50.tar.xz
mfd: rtsx_pcr: Disable interrupts before cancelling delayed works
commit 73beb63d290f961c299526852884846b0d868840 upstream. This fixes a kernel panic when resuming from suspend to RAM. Without this fix an interrupt hits after the delayed work is canceled and thus requeues it. So we end up freeing an armed timer. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/rtsx_pcr.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c
index e6ae772..6ed83fe 100644
--- a/drivers/mfd/rtsx_pcr.c
+++ b/drivers/mfd/rtsx_pcr.c
@@ -1230,8 +1230,14 @@ static void rtsx_pci_remove(struct pci_dev *pcidev)
pcr->remove_pci = true;
- cancel_delayed_work(&pcr->carddet_work);
- cancel_delayed_work(&pcr->idle_work);
+ /* Disable interrupts at the pcr level */
+ spin_lock_irq(&pcr->lock);
+ rtsx_pci_writel(pcr, RTSX_BIER, 0);
+ pcr->bier = 0;
+ spin_unlock_irq(&pcr->lock);
+
+ cancel_delayed_work_sync(&pcr->carddet_work);
+ cancel_delayed_work_sync(&pcr->idle_work);
mfd_remove_devices(&pcidev->dev);