LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Robert Crocombe <rcrocomb@gmail.com>
Cc: linux1394-devel <linux1394-devel@lists.sourceforge.net>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: ohci1394 broke 2.6.19 -> 2.6.20-rc1
Date: Tue, 6 Feb 2007 01:39:59 +0100 (CET)	[thread overview]
Message-ID: <tkrat.f2510ec744e6b5c8@s5r6.in-berlin.de> (raw)
In-Reply-To: <tkrat.c39467d7194502c4@s5r6.in-berlin.de>

On  6 Feb, Stefan Richter wrote:
> Robert Crocombe wrote:
>> moving to anything more recent than 2.6.19
>> means ohci1394 is non-functional (no 1394 hosts are detected) and the
>> module cannot be removed.

Not using the option disable_nodemgr=1 should avoid the bug.

>> I have narrowed it down to 2.6.19 works, 2.6.20-rc1 doesn't.  Lots of detail at:
>> 
>> http://bugzilla.kernel.org/show_bug.cgi?id=7942
> 
> I get a spinlock lockup on 2.6.20-rc6 + some 1394 updates with a similar
> trace to what Robert posted at bugzilla --- *if* I use ieee1394's option
> disable_nodemgr=1. (Never used it before.) The key appears to be how
> hpsb_alloc_host interacts with the driver core. I don't know if hosts.c
> is at fault or some change in the driver core.

It's my oversight, see patch.


From: Stefan Richter <stefanr@s5r6.in-berlin.de>
Subject: ieee1394: fix host device registering when nodemgr disabled

Since my commit 8252bbb1363b7fe963a3eb6f8a36da619a6f5a65 in 2.6.20-rc1,
host devices have a dummy driver attached.  Alas the driver was not
registered before use if ieee1394 was loaded with disable_nodemgr=1.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
 drivers/ieee1394/ieee1394_core.c |    1 +
 drivers/ieee1394/nodemgr.c       |    3 +--
 drivers/ieee1394/nodemgr.h       |    4 +---
 3 files changed, 3 insertions(+), 5 deletions(-)

Index: linux-2.6.20-rc6/drivers/ieee1394/ieee1394_core.c
===================================================================
--- linux-2.6.20-rc6.orig/drivers/ieee1394/ieee1394_core.c	2007-02-03 18:04:50.000000000 +0100
+++ linux-2.6.20-rc6/drivers/ieee1394/ieee1394_core.c	2007-02-06 01:28:04.000000000 +0100
@@ -1132,6 +1132,7 @@ static int __init ieee1394_init(void)
 		}
 	}
 
+	ret = driver_register(&nodemgr_mid_layer_driver);
 	ret = class_register(&hpsb_host_class);
 	if (ret < 0)
 		goto release_all_bus;
Index: linux-2.6.20-rc6/drivers/ieee1394/nodemgr.c
===================================================================
--- linux-2.6.20-rc6.orig/drivers/ieee1394/nodemgr.c	2007-01-27 14:07:00.000000000 +0100
+++ linux-2.6.20-rc6/drivers/ieee1394/nodemgr.c	2007-02-06 01:29:21.000000000 +0100
@@ -249,7 +249,7 @@ static struct device nodemgr_dev_templat
  * useful drivers for them yet, and there would be a deadlock possible if the
  * driver core scans the host device while the host's low-level driver (i.e.
  * the host's parent device) is being removed. */
-static struct device_driver nodemgr_mid_layer_driver = {
+struct device_driver nodemgr_mid_layer_driver = {
 	.bus		= &ieee1394_bus_type,
 	.name		= "nodemgr",
 	.owner		= THIS_MODULE,
@@ -1857,7 +1857,6 @@ int init_ieee1394_nodemgr(void)
 		class_unregister(&nodemgr_ne_class);
 		return error;
 	}
-	error = driver_register(&nodemgr_mid_layer_driver);
 	hpsb_register_highlevel(&nodemgr_highlevel);
 	return 0;
 }
Index: linux-2.6.20-rc6/drivers/ieee1394/nodemgr.h
===================================================================
--- linux-2.6.20-rc6.orig/drivers/ieee1394/nodemgr.h	2007-01-27 14:07:00.000000000 +0100
+++ linux-2.6.20-rc6/drivers/ieee1394/nodemgr.h	2007-02-06 01:30:27.000000000 +0100
@@ -181,10 +181,8 @@ int nodemgr_for_each_host(void *__data, 
 int init_ieee1394_nodemgr(void);
 void cleanup_ieee1394_nodemgr(void);
 
-/* The template for a host device */
+extern struct device_driver nodemgr_mid_layer_driver;
 extern struct device nodemgr_dev_template_host;
-
-/* Bus attributes we export */
 extern struct bus_attribute *const fw_bus_attrs[];
 
 #endif /* _IEEE1394_NODEMGR_H */



-- 
Stefan Richter
-=====-=-=== --=- --==-
http://arcgraph.de/sr/



  reply	other threads:[~2007-02-06  0:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-05 23:21 Robert Crocombe
2007-02-06  0:03 ` Stefan Richter
2007-02-06  0:39   ` Stefan Richter [this message]
2007-02-06  0:48     ` Stefan Richter
2007-02-06  1:20       ` [PATCH update] ieee1394: fix host device registering when nodemgr disabled Stefan Richter
2007-02-06  1:04     ` ohci1394 broke 2.6.19 -> 2.6.20-rc1 Robert Crocombe

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=tkrat.f2510ec744e6b5c8@s5r6.in-berlin.de \
    --to=stefanr@s5r6.in-berlin.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=rcrocomb@gmail.com \
    --subject='Re: ohci1394 broke 2.6.19 -> 2.6.20-rc1' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).