I have emerge and compile gentoo-dev-sources-2.6.8-r3, but the floppy driver does not work. On boot appear this: ........... ........... acpi_floppy_resource: 6 ioports at 0x3f0 acpi_floppy_resource: 1 ioports at 0x3f7 floppy: controller ACPI FDC0 at I/O 0x3f0-0x3f5, 0x3f7-0x3f7 irq 6 dma channel 2 RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize .......... .......... /dev/fd0 does not exist. With kernel gentoo-dev-sources-2.6.7-r14 floppy work well Reproducible: Always Steps to Reproduce: 1. 2. 3.
Hmm.. floppy was broke for many in 2.6.8, we introduced a patch in -r3 to fix it. Would you mind trying gentoo-dev-sources-2.6.8-r2 ?
On kernel gentoo-dev-sources-2.6.8-r2 i have /dev/fd0, but *not* on -r3.
I'm having the same problem... 2.6.8-gentoo-r3 --> floppy doesn't work 2.6.8.1 (vanilla) --> it works 2.6.9-rc1-mm1 --> it works I've noticed that 2.6.8-gentoo-r3 adds ACPI floppy detection (or something like that) as 2.6.9-rc1-mm1 does: "drivers/block/floppy.c" is the same for both. The only difference is that -mm1 works, so it seems that -mm1 has some useful patches that -gentoo-r3 wants ;-)
Created attachment 38375 [details, diff] differences between Gentoo's drivers/acpi/scan.c and "-mm" one
I have found where the problem comes from... "drivers/block/floppy.c" ########################## static int acpi_floppy_init(void) { if (no_acpi) return -ENODEV; return acpi_bus_register_driver(&acpi_floppy_driver); } [...] int __init floppy_init(void) { int i, unit, drive; int err, dr; #ifdef CONFIG_ACPI_BUS if (acpi_floppy_init() == 0) return -ENODEV; #endif ########################## floppy_init() return -ENODEV... why? because acpi_floppy_init() returns 0... why? because acpi_bus_register_driver(&acpi_floppy_driver) resturn 0... why? look at this attached diff: diff -up 2.6.8-gentoo-r3/drivers/acpi/scan.c 2.6.9-rc1-mm1/drivers/acpi/scan.c and focus on this: ####################### static int acpi_driver_detach(struct acpi_driver * drv) @@ -328,28 +424,30 @@ static int acpi_driver_detach(struct acp * acpi_bus_register_driver * ------------------------ * Registers a driver with the ACPI bus. Searches the namespace for all - * devices that match the driver's criteria and binds. + * devices that match the driver's criteria and binds. Returns the + * number of devices that were claimed by the driver, or a negative + * error status for failure. */ int acpi_bus_register_driver ( struct acpi_driver *driver) { - int error = 0; + int count; [....] - return_VALUE(error); + spin_lock(&acpi_device_lock); + list_add_tail(&driver->node, &acpi_bus_drivers); + spin_unlock(&acpi_device_lock); + count = acpi_driver_attach(driver); + + return_VALUE(count); ######################### In the previous version the function acpi_driver_detach() returned the error code (0 on success) while in the new one it returns "the number of devices that were claimed by the driver". In other words: new code in "drivers/block/floppy.c" depends on these changes in "drivers/acpi/scan.c". :)
But changing drivers/block/scan.c is bound to break many other drivers that rely on its old behaviour. I think a quick hack to our floppy.c patch would be the best bet here. I'll look into this once I'm back home after the weekend.
Created attachment 38417 [details, diff] Quick hack to get floppy working with ACPI enabled This patch fix floppy for gentoo-dev-sources-2.6.8-r3... another workaround for users: append "floppy=no_acpi" to kernel command line
With append "floppy=no_acpi" to kernel command line floppy work well
> With append "floppy=no_acpi" to kernel command line floppy work well of course, because with that option the driver simply avoid to use the new code (the new code is correct, but depends on a new "acpi_bus_register_driver" function)
On my system, (2.6.8r3), patching the floppy.c with the attached patch file above results in the following situation: floppy.c compiled as module after restart, "modprobe floppy" -> error on system console: "Inserting floppy driver for 2.6.8-gentoo-r3 floppy0: no floppy controllers found" after I try a second time, it works as usual "modprobe floppy": "Inserting floppy driver blabla FDC 0 is a post-1991 82077" Any idea how to fix that? Is annoying always to run modprobe twice ...
Confirm that the problem is with -r3 only. On -r1 it works fine.
Nothing changed after append "floppy=no_acpi" to kernel command line on my Dual PIII box, "acpi=off" does work :(
Created attachment 38967 [details, diff] 2310_fix-floppy-v2.patch Here's a patch which I'm about to send to get merged into g-d-s. It replaces the current 2310_fix-floppy.patch, so if you test it, make sure you reverse that one first. Again its a resync to -mm with an ACPI hack applied.
Created attachment 38968 [details, diff] acpi-hack.patch Here's the ACPI hack I put in place. This doesn't need to be applied, I just put it here for reference and incase anyone is interested. Paolo, thanks a lot for the research and patching you did into this problem, it's been very helpful.
> Paolo, thanks a lot for the research and patching you did into this problem, > it's been very helpful. Please ;)
I just tried to "patch floppy.c 2310_fix-floppy-v2.patch" and it wouldn't work - floppy.c is from gentoo-dev-sources 2.6.8-gentoo-r3. What am I doing wrong? Result is: patching file floppy.c Hunk #1 succeeded at 188 with fuzz 2 (offset 7 lines). Hunk #2 FAILED at 4164. Hunk #3 FAILED at 4239. Hunk #4 succeeded at 4733 (offset 152 lines). Hunk #5 succeeded at 4951 (offset 152 lines). 2 out of 5 hunks FAILED -- saving rejects to file floppy.c.rej
You have to revert the old 2310 patch first (i.e. patch -R). You can find that in one of the genpatches tarball.
Thanks Daniel, I wasn't aware that the first patch was already applied to and distributed with the "generic" 2.6.8-r3 sources.
This doesn't appear to have been included in r4. I still get the same problem.
Please retry with gentoo-dev-sources-2.6.8-r5 .. i dropped this patching altogether, should work like the original 2.6.8.1 now