mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: Fw: Re: 2.6.10-rc1-mm1
       [not found] <20041027022059.0341cc3e.akpm@osdl.org>
@ 2004-10-27 23:02 ` Bjorn Helgaas
  2004-10-28  6:25   ` James Morris
  0 siblings, 1 reply; 5+ messages in thread
From: Bjorn Helgaas @ 2004-10-27 23:02 UTC (permalink / raw)
  To: Andrew Morton, James Morris; +Cc: linux-kernel, linux-acpi

[-- Attachment #1: Type: text/plain, Size: 1636 bytes --]

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

The i8042 driver unregisters if it doesn't fine hardware, so the
above looks OK to me.  You might add similar debug to the
acpi_bus_unregister_driver() path just to be sure.

The problem is definitely something to do with the acpi driver
list maintenance, so I'm interested in all your debug output.

I did find a couple places that unregister the driver even when
acpi_bus_register_driver() fails, which could cause this.  But I
really doubt that this is the problem, because the only error
returns there are for "acpi_disabled" and "!driver".  Patch is
attached anyway if you want to try it.

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

I don't think so.  acpi_bus_register_driver() returns <0 for error
(driver not registered), or >=0 if it was registered.  The count is
the number of devices found.  So I think the floppy code is OK.

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

There's talk about making PNP smart enough to use info from ACPI.
But that doesn't seem to be cooked yet, and floppy doesn't use PNP
yet in any case.

[-- Attachment #2: diffs --]
[-- Type: text/x-diff, Size: 971 bytes --]

--- 2.6.10-rc1-mm1/drivers/acpi/asus_acpi.c.orig	2004-10-27 12:41:07.642080571 -0600
+++ 2.6.10-rc1-mm1/drivers/acpi/asus_acpi.c	2004-10-27 12:41:48.714345693 -0600
@@ -1213,7 +1213,8 @@
 
 	result = acpi_bus_register_driver(&asus_hotk_driver);
 	if (result < 1) {
-		acpi_bus_unregister_driver(&asus_hotk_driver);
+		if (result >= 0)
+			acpi_bus_unregister_driver(&asus_hotk_driver);
 		remove_proc_entry(PROC_ASUS, acpi_root_dir);
 		return -ENODEV;
 	}
--- 2.6.10-rc1-mm1/drivers/acpi/thinkpad_acpi.c.orig	2004-10-27 12:42:14.422353190 -0600
+++ 2.6.10-rc1-mm1/drivers/acpi/thinkpad_acpi.c	2004-10-27 12:43:40.715320883 -0600
@@ -247,8 +247,11 @@
 		return -ENODEV;
 
 	result = acpi_bus_register_driver(&acpi_thinkpad_driver);
-	if (result != 1)
+	if (result != 1) {
+		if (result >= 0)
+			acpi_bus_unregister_driver(&acpi_thinkpad_driver);
 		return -ENODEV;
+	}
 
 	printk(KERN_INFO LOGPREFIX "ACPI IBM Thinkpad Fn+Fx key driver version %s\n", DRIVER_VERSION);
 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Fw: Re: 2.6.10-rc1-mm1
  2004-10-27 23:02 ` Fw: Re: 2.6.10-rc1-mm1 Bjorn Helgaas
@ 2004-10-28  6:25   ` James Morris
  2004-10-28 17:14     ` Bjorn Helgaas
  2004-11-02  7:38     ` Len Brown
  0 siblings, 2 replies; 5+ messages in thread
From: James Morris @ 2004-10-28  6:25 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: Andrew Morton, linux-kernel, linux-acpi

On Wed, 27 Oct 2004, Bjorn Helgaas wrote:

> I did find a couple places that unregister the driver even when
> acpi_bus_register_driver() fails, which could cause this.  But I
> really doubt that this is the problem, because the only error
> returns there are for "acpi_disabled" and "!driver".  Patch is
> attached anyway if you want to try it.

This looks to have fixed the problem.


- James
-- 
James Morris
<jmorris@redhat.com>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Fw: Re: 2.6.10-rc1-mm1
  2004-10-28  6:25   ` James Morris
@ 2004-10-28 17:14     ` Bjorn Helgaas
  2004-11-02  7:38     ` Len Brown
  1 sibling, 0 replies; 5+ messages in thread
From: Bjorn Helgaas @ 2004-10-28 17:14 UTC (permalink / raw)
  To: James Morris; +Cc: Andrew Morton, linux-kernel, linux-acpi

On Thursday 28 October 2004 12:25 am, James Morris wrote:
> On Wed, 27 Oct 2004, Bjorn Helgaas wrote:
> > I did find a couple places that unregister the driver even when
> > acpi_bus_register_driver() fails, which could cause this.  But I
> > really doubt that this is the problem, because the only error
> > returns there are for "acpi_disabled" and "!driver".  Patch is
> > attached anyway if you want to try it.
> 
> This looks to have fixed the problem.

Hmmm.  Can you add a little more debug (i.e., the printk in
acpi_bus_unregister_driver(), and some in the acpi_bus_register_driver()
failure paths)?  I really don't understand how that patch could
have fixed the problem, and I hate to paper over a problem without
understanding it better.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Fw: Re: 2.6.10-rc1-mm1
  2004-10-28  6:25   ` James Morris
  2004-10-28 17:14     ` Bjorn Helgaas
@ 2004-11-02  7:38     ` Len Brown
  2004-11-02 15:56       ` James Morris
  1 sibling, 1 reply; 5+ messages in thread
From: Len Brown @ 2004-11-02  7:38 UTC (permalink / raw)
  To: James Morris; +Cc: Bjorn Helgaas, Andrew Morton, linux-kernel, linux-acpi

On Thu, 2004-10-28 at 02:25, James Morris wrote:
> On Wed, 27 Oct 2004, Bjorn Helgaas wrote:
> 
> > I did find a couple places that unregister the driver even when
> > acpi_bus_register_driver() fails, which could cause this.  But I
> > really doubt that this is the problem, because the only error
> > returns there are for "acpi_disabled" and "!driver".  Patch is
> > attached anyway if you want to try it.
> 
> This looks to have fixed the problem.

James,
I had a similar problem, until I cleaned the tree and re-built from
scratch.  I'm wondering if you do the same if the tree w/o any patches
works for you.

thanks,
-Len



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Fw: Re: 2.6.10-rc1-mm1
  2004-11-02  7:38     ` Len Brown
@ 2004-11-02 15:56       ` James Morris
  0 siblings, 0 replies; 5+ messages in thread
From: James Morris @ 2004-11-02 15:56 UTC (permalink / raw)
  To: Len Brown; +Cc: Bjorn Helgaas, Andrew Morton, linux-kernel, linux-acpi

On 2 Nov 2004, Len Brown wrote:

> James,
> I had a similar problem, until I cleaned the tree and re-built from
> scratch.  I'm wondering if you do the same if the tree w/o any patches
> works for you.

Nope, still seeing it in rc1-mm1


-- 
James Morris
<jmorris@redhat.com>



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-11-02 16:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20041027022059.0341cc3e.akpm@osdl.org>
2004-10-27 23:02 ` Fw: Re: 2.6.10-rc1-mm1 Bjorn Helgaas
2004-10-28  6:25   ` James Morris
2004-10-28 17:14     ` Bjorn Helgaas
2004-11-02  7:38     ` Len Brown
2004-11-02 15:56       ` James Morris

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®