Re: 2.6.8-rc4-mm1 doesn't boot

From: Bjorn Helgaas (bjorn.helgaas_at_hp.com)
Date: 08/13/04

  • Next message: Martin J. Bligh: "Re: [PATCH] allocate page caches pages in round robin fasion"
    To: Len Brown <len.brown@intel.com>
    Date:	Fri, 13 Aug 2004 15:15:56 -0600
    
    

    On Thursday 12 August 2004 4:43 pm, Len Brown wrote:
    > I expect that the the bug is that floppy.c, like other motherboard
    > devices, should take advantage of ACPI for device resource
    > enumeration.

    Adrian, can you try the following patch? This is very sketchy start
    at using ACPI to enumerate floppies. This patch only checks for
    a floppy controller (PNP0700) in the ACPI namespace. If ACPI has
    been disabled, or we actually find a controller, we probe blindly
    for the floppy controller as we did in the past. If ACPI is enabled
    and we DON'T find a controller, we just exit with -ENODEV.

    A more ambitious patch would actually look at the _CRS of the
    controller and use the IRQ and DMA information from there instead
    of the current hard-coded defaults. But that's a lot more invasive
    and likely to break things. And since floppies are nearly extinct,
    I'm not sure there's enough benefit to justify that.

    ===== drivers/block/floppy.c 1.103 vs edited =====
    --- 1.103/drivers/block/floppy.c 2004-08-02 02:00:45 -06:00
    +++ edited/drivers/block/floppy.c 2004-08-13 15:09:13 -06:00
    @@ -180,6 +180,9 @@
     #include <linux/devfs_fs_kernel.h>
     #include <linux/device.h>
     #include <linux/buffer_head.h> /* for invalidate_buffers() */
    +#include <linux/acpi.h>
    +
    +#include <acpi/acpi_bus.h>
     
     /*
      * PS/2 floppies have much slower step rates than regular floppies.
    @@ -4222,10 +4225,41 @@
             return get_disk(disks[drive]);
     }
     
    +#ifdef CONFIG_ACPI_BUS
    +static int acpi_floppies_found = 0;
    +
    +static int acpi_floppy_add(struct acpi_device *device)
    +{
    + printk("%s: found a controller at ACPI %s\n", DEVICE_NAME,
    + device->pnp.bus_id);
    + acpi_floppies_found++;
    + return 0;
    +}
    +
    +static struct acpi_driver acpi_floppy_driver = {
    + .name = "floppy",
    + .ids = "PNP0700",
    + .ops = {
    + .add = acpi_floppy_add,
    + },
    +};
    +
    +static int acpi_floppy_init(void)
    +{
    + return acpi_bus_register_driver(&acpi_floppy_driver);
    +}
    +#endif
    +
     int __init floppy_init(void)
     {
             int i, unit, drive;
             int err, dr;
    +
    +#ifdef CONFIG_ACPI_BUS
    + err = acpi_floppy_init();
    + if (err >= 0 && acpi_floppies_found == 0)
    + return -ENODEV;
    +#endif
     
             raw_cmd = NULL;
     
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Martin J. Bligh: "Re: [PATCH] allocate page caches pages in round robin fasion"

    Relevant Pages

    • Re: intel-iommu: CONFIG_DMAR*=y kills my box
      ... It hangs very early on boot and not even the reset button works anymore, all I get is an black screen, no message or alike and the box hangs. ... 00:02.0 VGA compatible controller: Intel Corporation Integrated Graphics Controller ... ACPI: IRQ0 used by override. ... raid0: EQUAL ...
      (Linux-Kernel)
    • Re: intel-iommu: CONFIG_DMAR*=y kills my box
      ... It hangs very early on boot and not even the reset button works anymore, all I get is an black screen, no message or alike and the box hangs. ... 00:02.0 VGA compatible controller: Intel Corporation Integrated Graphics Controller ... ACPI: IRQ0 used by override. ... raid0: EQUAL ...
      (Linux-Kernel)
    • Bug: get EXT3-fs error Allocating block in system zone
      ... In bios I have the sata controller in pure AHCI mode. ... Allocating block in system zone - blocks from 74907667, ... Or a problem with acpi and memory management? ... MEM window: disabled. ...
      (Linux-Kernel)
    • Re: [PATCH] blacklist NCQ on Seagate Barracuda ST380817AS
      ... 00:02.0 VGA compatible controller: Intel Corporation Integrated Graphics Controller ... ACPI: IRQ0 used by override. ... MEM window: disabled. ...
      (Linux-Kernel)
    • [2.6.20-rc3] PATA_MARVELL: total machine freeze
      ... ACPI: IRQ0 used by override. ... registered new interface driver usbfs ... PREFETCH window: disabled. ... USB Universal Host Controller Interface driver v3.0 ...
      (Linux-Kernel)