Linux Could Experience Unexpected System Reboots When Pairing AMD Ryzen With Firewire

Written by Michael Larabel in AMD on 5 January 2024 at 04:15 PM EST. 32 Comments
AMD
In the land of odd hardware bugs and interesting Linux kernel behavior, a fix was merged today for Linux 6.7 and to be back-ported to existing stable kernel series for dealing with a situation where unexpected system reboots could happen primarily on AMD Ryzen systems when using Firewire (IEEE-1394).

Firewire thankfully hasn't been common in years and would be a rather niche digital video and/or audio hardware setup to be using Firewire with a modern AMD Ryzen system, but in any event such a combination has been causing problems for Linux users with unexpected reboots when plugging in a Firewire device or similar.

AMD Ryzen with Firewire DV camera


There's been a handful of bug reports in recent times around Firewire problems with modern Linux kernel versions and it's been found to be particularly bad for AMD Ryzen hardware. A fix was merged this afternoon by SUSE's Takashi Sakamoto. He explained of the troubles:
"VIA VT6306/6307/6308 provides PCI interface compliant to 1394 OHCI. When the hardware is combined with Asmedia ASM1083/1085 PCIe-to-PCI bus bridge, it appears that accesses to its 'Isochronous Cycle Timer' register (offset 0xf0 on PCI memory space) often causes unexpected system reboot in any type of AMD Ryzen machine (both 0x17 and 0x19 families). It does not appears in the other type of machine (AMD pre-Ryzen machine, Intel machine, at least), or in the other OHCI 1394 hardware (e.g. Texas Instruments).

The issue explicitly appears at a commit dcadfd7f7c74 ("firewire: core: use union for callback of transaction completion") added to v6.5 kernel. It changed 1394 OHCI driver to access to the register every time to dispatch local asynchronous transaction. However, the issue exists in older version of kernel as long as it runs in AMD Ryzen machine, since the access to the register is required to maintain bus time. It is not hard to imagine that users experience the unexpected system reboot when generating bus reset by plugging any devices in, or reading the register by time-aware application programs; e.g. audio sample processing.

This commit suppresses the unexpected system reboot in the combination of hardware. It avoids the access itself. As a result, the software stack can not provide the hardware time anymore to unit drivers, userspace applications, and nodes in the same IEEE 1394 bus. It brings apparent disadvantage since time-aware application programs require it, while time-unaware applications are available again; e.g. sbp2."

So should you be running AMD Ryzen and happen to still be using Firewire devices, a fix is on the way for Linux 6.7 ahead of its debut this Sunday and in the days ahead will be making its way to the maintained stable/LTS kernel versions.

In case you missed the news from last year, the Linux kernel has a new Firewire IEEE-1394 subsystem maintainer who intends to keep supporting Firewire on Linux until 2029.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week