linux-stable/drivers/misc/cardreader
Kai-Heng Feng 0edeb8992d misc: rtsx: Avoid mangling IRQ during runtime PM
After commit 5b4258f672 ("misc: rtsx: rts5249 support runtime PM"), when the
rtsx controller is runtime suspended, bring CPUs offline and back online, the
runtime resume of the controller will fail:

[   47.319391] smpboot: CPU 1 is now offline
[   47.414140] x86: Booting SMP configuration:
[   47.414147] smpboot: Booting Node 0 Processor 1 APIC 0x2
[   47.571334] smpboot: CPU 2 is now offline
[   47.686055] smpboot: Booting Node 0 Processor 2 APIC 0x4
[   47.808174] smpboot: CPU 3 is now offline
[   47.878146] smpboot: Booting Node 0 Processor 3 APIC 0x6
[   48.003679] smpboot: CPU 4 is now offline
[   48.086187] smpboot: Booting Node 0 Processor 4 APIC 0x1
[   48.239627] smpboot: CPU 5 is now offline
[   48.326059] smpboot: Booting Node 0 Processor 5 APIC 0x3
[   48.472193] smpboot: CPU 6 is now offline
[   48.574181] smpboot: Booting Node 0 Processor 6 APIC 0x5
[   48.743375] smpboot: CPU 7 is now offline
[   48.838047] smpboot: Booting Node 0 Processor 7 APIC 0x7
[   48.965447] __common_interrupt: 1.35 No irq handler for vector
[   51.174065] mmc0: error -110 doing runtime resume
[   54.978088] I/O error, dev mmcblk0, sector 21479 op 0x1:(WRITE) flags 0x0 phys_seg 11 prio class 0
[   54.978108] Buffer I/O error on dev mmcblk0p1, logical block 19431, lost async page write
[   54.978129] Buffer I/O error on dev mmcblk0p1, logical block 19432, lost async page write
[   54.978134] Buffer I/O error on dev mmcblk0p1, logical block 19433, lost async page write
[   54.978137] Buffer I/O error on dev mmcblk0p1, logical block 19434, lost async page write
[   54.978141] Buffer I/O error on dev mmcblk0p1, logical block 19435, lost async page write
[   54.978145] Buffer I/O error on dev mmcblk0p1, logical block 19436, lost async page write
[   54.978148] Buffer I/O error on dev mmcblk0p1, logical block 19437, lost async page write
[   54.978152] Buffer I/O error on dev mmcblk0p1, logical block 19438, lost async page write
[   54.978155] Buffer I/O error on dev mmcblk0p1, logical block 19439, lost async page write
[   54.978160] Buffer I/O error on dev mmcblk0p1, logical block 19440, lost async page write
[   54.978244] mmc0: card aaaa removed
[   54.978452] FAT-fs (mmcblk0p1): FAT read failed (blocknr 4257)

There's interrupt immediately raised on rtsx_pci_write_register() in
runtime resume routine, but the IRQ handler hasn't registered yet.

So we can either move rtsx_pci_write_register() after rtsx_pci_acquire_irq(),
or just stop mangling IRQ on runtime PM. Choose the latter to save some
CPU cycles.

Fixes: 5b4258f672 ("misc: rtsx: rts5249 support runtime PM")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1951784
Link: https://lore.kernel.org/r/20211126003246.1068770-1-kai.heng.feng@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-12-03 14:32:00 +01:00
..
alcor_pci.c misc: alcor_pci: fix inverted branch condition 2021-05-22 10:34:48 +02:00
Kconfig
Makefile misc: rtsx: Add support new chip rts5228 mmc: rtsx: Add support MMC_CAP2_NO_MMC 2020-07-10 14:58:47 +02:00
rtl8411.c misc: rtsx: separate aspm mode into MODE_REG and MODE_CFG 2021-06-09 19:10:22 +02:00
rts5209.c misc: rtsx: separate aspm mode into MODE_REG and MODE_CFG 2021-06-09 19:10:22 +02:00
rts5227.c misc: rtsx: separate aspm mode into MODE_REG and MODE_CFG 2021-06-09 19:10:22 +02:00
rts5228.c misc: rtsx: separate aspm mode into MODE_REG and MODE_CFG 2021-06-09 19:10:22 +02:00
rts5228.h misc: rtsx: Add support new chip rts5228 mmc: rtsx: Add support MMC_CAP2_NO_MMC 2020-07-10 14:58:47 +02:00
rts5229.c misc: rtsx: separate aspm mode into MODE_REG and MODE_CFG 2021-06-09 19:10:22 +02:00
rts5249.c misc: rtsx: separate aspm mode into MODE_REG and MODE_CFG 2021-06-09 19:10:22 +02:00
rts5260.c misc: rtsx: separate aspm mode into MODE_REG and MODE_CFG 2021-06-09 19:10:22 +02:00
rts5260.h
rts5261.c misc: rtsx: separate aspm mode into MODE_REG and MODE_CFG 2021-06-09 19:10:22 +02:00
rts5261.h misc: rtsx: Check mmc support for RTS5261 2020-11-16 11:59:30 +01:00
rtsx_pcr.c misc: rtsx: Avoid mangling IRQ during runtime PM 2021-12-03 14:32:00 +01:00
rtsx_pcr.h misc: rtsx: rts5249 support runtime PM 2020-12-09 19:42:18 +01:00
rtsx_usb.c misc: rtsx_usb: Constify struct usb_device_id 2020-06-29 18:39:45 +02:00