mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: Len Brown <len.brown@intel.com>
Cc: Adrian Bunk <bunk@fs.tum.de>, Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: Re: 2.6.8-rc4-mm1 doesn't boot
Date: Fri, 13 Aug 2004 15:15:56 -0600	[thread overview]
Message-ID: <200408131515.56322.bjorn.helgaas@hp.com> (raw)
In-Reply-To: <1092350580.7765.190.camel@dhcppc4>

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;
 

  parent reply	other threads:[~2004-08-13 21:16 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <566B962EB122634D86E6EE29E83DD808182C2B33@hdsmsx403.hd.intel.com>
2004-08-11 21:32 ` Len Brown
2004-08-11 21:37   ` Bjorn Helgaas
2004-08-11 21:51   ` Adrian Bunk
2004-08-11 22:22     ` Len Brown
2004-08-11 23:15       ` Adrian Bunk
2004-08-12 21:50   ` Bjorn Helgaas
2004-08-12 22:43     ` Len Brown
2004-08-13  0:23       ` Adrian Bunk
2004-08-13 21:15       ` Bjorn Helgaas [this message]
2004-08-13 23:55         ` Adrian Bunk
2004-08-14  2:22           ` Len Brown
2004-08-17 23:11             ` Adrian Bunk
2004-08-17 23:48               ` Len Brown
2004-08-10  7:21 2.6.8-rc4-mm1 Andrew Morton
2004-08-10 15:09 ` 2.6.8-rc4-mm1 doesn't boot Adrian Bunk
2004-08-10 15:59   ` Bjorn Helgaas
2004-08-10 17:32     ` Adrian Bunk
2004-08-10 22:46       ` Bjorn Helgaas
2004-08-10 23:56         ` Adrian Bunk
2004-08-11 20:33           ` Bjorn Helgaas
2004-08-11 23:23             ` Adrian Bunk
2004-08-11  9:56         ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200408131515.56322.bjorn.helgaas@hp.com \
    --to=bjorn.helgaas@hp.com \
    --cc=akpm@osdl.org \
    --cc=bunk@fs.tum.de \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®