Takashi Iwai wrote:
Patrick May reported that his sound card with CMI8378 chip causes a crash / reboot when accessing the MIDI port that isn't actually present on the board. [...] Although fixing the unexpected reboot would be the best solution, it's not so trivial to identify the cause.
There was a similar problem in the CMI8788 driver: https://git.kernel.org/linus/f1bc07af9a9e https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4496 (does this still exist?)
When reading a register repeatedly, the chip sometimes does not complete the PCI transaction. Apparently, mainboard PCI chipsets ignore this error, but PCIe/PCI bridges generate a machine check exception in this case.
When writing MIDI data to a MPU-401-like device, the driver regularly polls the status register. I expect that this will blow up with any C-Media chip on a card with a PCIe/PCI bridge, regardless of whether a MIDI port exists.
(I wonder if this can be triggered with snd_pcm_avail() in a loop. Maybe it happens only for byte accesses, or nobody has yet found out.)
As default, the MPU port is still enabled
It might be a good idea to disable it by default if the parent bridge is an ASM1083.
Regards, Clemens