Since kernel 5.3.4, my system with an ASUS PRIME B350M-A mainboard does not properly shutdown or reboot any more, after a "shutdown -f"/"reboot -f" it just hangs indefinitely. Interestingly SysRq+B is still able to reboot the system (even after the shutdown/reboot got stuck), while the normal reboot system call is not.
Kernel 5.3.2 (=5.3.3) is the last version that works fine, the problem still persists with the latest 5.4-rc5.
I have bisected the problem down to
Author: Chris Wilson <firstname.lastname@example.org>
Date: Sat Jul 20 12:33:37 2019 +0100
ALSA: hda: Flush interrupts on disabling
[ Upstream commit caa8422d01e983782548648e125fd617cadcec3f ]
Reverting this commit restores the normal shutdown/reboot behaviour on kernel 5.4-rc5.
The culprit appears to be the added synchronize_irq(bus->irq) in sound/hda/hdac_controller.c, removing it restores the normal behaviour. The reordering of azx_stop_chip(chip) in sound/pci/hda/hda_intel.c does not necessarily need to be reverted, at least it does not seem to have any negative effect on my system.
Thanks for the report and the analysis.
I think the whole commit is bogus, even the azx_stop_chip() calls looks suspicious although it didn't break much, so far. (If any, we should reorder the call sequence there.)
I'm going to revert the commit.
The revert was included in kernel 5.4-rc6 (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1a7f60b9df614bb36d14dc0c0bc898a31b2b506f) and backported to 4.4.199, 4.9.199, 4.14.152, 4.19.82 and 5.3.9. I tested version 5.3.9 on my system and confirm that shutdown and reboot work as expected once again. Thank you for your quick fix!