mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Collins <bcollins@debian.org>
To: Dmitry Torokhov <dtor_core@ameritech.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.6.4-rc1: OOPS when daisy-chaining ieee1394 devices
Date: Mon, 1 Mar 2004 23:18:49 -0500	[thread overview]
Message-ID: <20040302041849.GQ1078@phunnypharm.org> (raw)
In-Reply-To: <200403012229.35742.dtor_core@ameritech.net>

On Mon, Mar 01, 2004 at 10:29:34PM -0500, Dmitry Torokhov wrote:
> Hi,
> 
> Got the following oops when trying to power up DVD burner daisy chained to
> a WD hard drive. Reproducible with latest -bk as well as with ieee1394 patch
> from -mm tree. This is a regression as it was somewhat worked with earlier
> 2.6 kernels (well, earlier kernels could only log in into the last powered
> device, reconnecting to devices sitting earlier in chain was always failing),
> but there was no oopses.

Let me know if this patch works for you.

===== drivers/ieee1394/nodemgr.c 1.51 vs edited =====
--- 1.51/drivers/ieee1394/nodemgr.c	Wed Feb 25 09:41:45 2004
+++ edited/drivers/ieee1394/nodemgr.c	Mon Mar  1 23:15:10 2004
@@ -1286,18 +1286,19 @@
 }
 
 
-static void nodemgr_ud_update_pdrv(struct unit_directory *ud)
+static void nodemgr_update_pdrv(struct node_entry *ne)
 {
-	struct device *dev;
+	struct unit_directory *ud;
 	struct hpsb_protocol_driver *pdrv;
+	struct class *class = &nodemgr_ud_class;
+	struct class_device *cdev;
 
-	if (!get_device(&ud->device))
-		return;
-
-	list_for_each_entry(dev, &ud->device.children, node)
-		nodemgr_ud_update_pdrv(container_of(dev, struct unit_directory, device));
+	down_read(&class->subsys.rwsem);
+	list_for_each_entry(cdev, &class->children, node) {
+		ud = container_of(cdev, struct unit_directory, class_dev);
+		if (ud->ne != ne || !ud->device.driver)
+			continue;
 
-	if (ud->device.driver) {
 		pdrv = container_of(ud->device.driver, struct hpsb_protocol_driver, driver);
 
 		if (pdrv->update && pdrv->update(ud)) {
@@ -1306,14 +1307,13 @@
 			up_write(&ud->device.bus->subsys.rwsem);
 		}
 	}
-
-	put_device(&ud->device);
+	up_read(&class->subsys.rwsem);
 }
 
 
 static void nodemgr_probe_ne(struct host_info *hi, struct node_entry *ne, int generation)
 {
-	struct device *dev, *udev;
+	struct device *dev;
 
 	if (ne->host != hi->host || ne->in_limbo)
 		return;
@@ -1330,8 +1330,7 @@
 	if (ne->needs_probe)
 		nodemgr_process_root_directory(hi, ne);
 	else if (ne->generation == generation)
-		list_for_each_entry(udev, &dev->children, node)
-			nodemgr_ud_update_pdrv(container_of(udev, struct unit_directory, device));
+		nodemgr_update_pdrv(ne);
 	else
 		nodemgr_suspend_ne(ne);
 

-- 
Debian     - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
Subversion - http://subversion.tigris.org/
WatchGuard - http://www.watchguard.com/

  reply	other threads:[~2004-03-02  4:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-02  3:29 Dmitry Torokhov
2004-03-02  4:18 ` Ben Collins [this message]
2004-03-03  1:01   ` Dmitry Torokhov

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=20040302041849.GQ1078@phunnypharm.org \
    --to=bcollins@debian.org \
    --cc=dtor_core@ameritech.net \
    --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®