Skip to content

Commit

Permalink
mfd: rtsx_pcr: Disable interrupts before cancelling delayed works
Browse files Browse the repository at this point in the history
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.

Cc: stable@vger.kernel.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Thomas Gleixner authored and Samuel Ortiz committed Dec 10, 2013
1 parent 78fd822 commit 73beb63
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions drivers/mfd/rtsx_pcr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1228,8 +1228,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);

Expand Down

0 comments on commit 73beb63

Please sign in to comment.