lkml.org 
[lkml]   [2004]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.6.10-rc1-mm1
James Morris <jmorris@redhat.com> wrote:
>
> On Tue, 26 Oct 2004, Andrew Morton wrote:
>
> > My guess would be that you died here:
> >
> > list_add_tail(&driver->node, &acpi_bus_drivers);
> >
> > in acpi_bus_register_driver(). Which means that some _other_ acpi driver
> > structure on that list is scrogged. Perhaps it was marked __init or
> > something.
> >
> > Can you debug it a bit? Maybe print the addresses and names of the drivers
> > as they get registered in acpi_bus_register_driver() and also print out
> > acpi_bus_drivers.prev. If we can get the name of the offending driver
> > we'll be able to find the bug.
>
> Interestingly, the debug printks are not showing up in
> acpi_bus_register_driver() before the oops, and they should be if that's
> where it's happening. Compiling with debug info makes the oops go away.
>
> Here's some debugging of the last few drivers to be registered before the
> oops is seen:
>
> name=hpet node=c03ee9a0 acpi_bus_drivers.prev=c03ea6a0
> name=i8042 node=c03eeda0 acpi_bus_drivers.prev=c03ee9a0
> name=floppy node=c03f24c0 acpi_bus_drivers.prev=c03ee9a0
>
>
> Note acpi_bus_drivers.prev for floppy was not set to c03eeda0, which you
> would normally expect?

Not too sure what I'm looking at there.

ah. the acpi floppy scanning code seems to be misinterpreting the
acpi_bus_register_driver() return value, so if it returns zero we think
that the driver was registered, only it wasn't. floppy_init() then
proceeds to unregister a not-registered driver. I think. Does this help?

--- 25/drivers/block/floppy.c~add-acpi-based-floppy-controller-enumeration-fix-fix 2004-10-27 02:14:33.567295256 -0700
+++ 25-akpm/drivers/block/floppy.c 2004-10-27 02:15:13.415237448 -0700
@@ -4379,7 +4379,7 @@ static int acpi_floppy_init(void)
return -ENODEV;
}
err = acpi_bus_register_driver(&acpi_floppy_driver);
- if (err >= 0)
+ if (err > 0)
acpi_floppy_registered = 1;
return err;
}
@@ -4401,7 +4401,7 @@ int __init floppy_init(void)
int i, unit, drive;
int err, dr;

- if (acpi_floppy_init() == 0) {
+ if (acpi_floppy_init() <= 0) {
err = -ENODEV;
goto out_put_acpi;
}
_
If so, I wonder why acpi_bus_register_driver() is returning zero.

Bjorn, do I remember hearing that we can drop all that code anyway? That
it'll be done in another way?

-
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/

\
 
 \ /
  Last update: 2005-03-22 14:07    [from the cache]
©2003-2011 Jasper Spaans