Linux Regressed Its Floppy Disk Driver - Someone Actually Noticed Just A Few Months Later
Written by Michael Larabel in Hardware on 26 July 2021 at 02:05 PM EDT. 42 Comments
HARDWARE --
It turns out there is actually people running modern versions of the Linux kernel in 2021 that also are using floppy disks.

There remains a lot of vintage hardware code within the Linux kernel like enthusiasts maintaining the Motorola 68000 series support, among a lot of other older hardware and many drivers for peripherals that haven't been sold new in many years -- including the floppy disk code. But as is often the case, besides it becoming increasingly rare for users of old hardware in general, it's increasingly rare to find vintage computer owners running modern versions of the Linux kernel. But some still do, with the latest example being a regression report over the Linux floppy driver.

Back in February I wrote about the Linux kernel still seeing occasional work on its floppy disk support after thirty years. That patch was subsequently mainlined and also back-ported to prior kernel stable series.

Fast forward nearly a half-year, it turns out that the latest floppy code regressed the existing driver behavior. There is a bug report that the floppy driver regressed on the Linux 5.10 LTS kernel following that change being back-ported. The floppy driver still largely works but some behavior was unintentionally/silently altered. Most notably, not being able to open a floppy disk that is write-protected. The issue noted, "Since FOREVER before the patch, when using O_NDELAY, one could open the floppy device with no media inserted or even with write protected media without error. "Read-only file system" status is returned only when we actually tried to write to it. We have software still in use today that relies on this functionality. After the patch, if no media is in the drive the open fails with "no such device or address". If the floppy media is write protected the open fails with "Read-only file system"."

The offending commit changing the floppy disk handling behavior is the change from February. Unfortunately, there isn't a clean fix as the code change does address an issue with libblkid. So now a new solution needs to be figured out for maintaining the Linux floppy code in 2021 with recent kernels.
Related News
About The Author
Author picture

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 or contacted via MichaelLarabel.com.

Popular News This Week