irqchip/sg2042-msi: Fix broken affinity setting
authorInochi Amaoto <inochiama@gmail.com>
Wed, 13 Aug 2025 23:28:33 +0000 (07:28 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 23 Aug 2025 19:21:13 +0000 (21:21 +0200)
commit9d8c41816bac518b4824f83b346ae30a1be83f68
tree37315c6a9b8b2df19f969c325c5039e5ab3875b8
parent54f45a30c0d0153d2be091ba2d683ab6db6d1d5b
irqchip/sg2042-msi: Fix broken affinity setting

When using NVME on SG2044, the NVME drvier always complains about "I/O tag
XXX (XXX) QID XX timeout, completion polled", which is caused by the broken
affinity setting mechanism of the sg2042-msi driver.

The PLIC driver can only the set the affinity when enabled, but the
sg2042-msi driver invokes the affinity setter in disabled state, which
causes the change to be lost.

Cure this by implementing the irq_startup()/shutdown() callbacks, which
allow to startup (enabled) the underlying PLIC first.

Fixes: e96b93a97c90 ("irqchip/sg2042-msi: Add the Sophgo SG2044 MSI interrupt controller")
Reported-by: Han Gao <rabenda.cn@gmail.com>
Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Chen Wang <unicorn_wang@outlook.com> # Pioneerbox
Reviewed-by: Chen Wang <unicorn_wang@outlook.com>
Link: https://lore.kernel.org/all/20250813232835.43458-4-inochiama@gmail.com
drivers/irqchip/irq-sg2042-msi.c