linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Collins <bcollins@debian.org>
To: Tony Spinillo <tspinillo@yahoo.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: IEEE-1394 problem on init [ was Re: Linux 2.4.21-rc1 ]
Date: Wed, 23 Apr 2003 09:46:00 -0400	[thread overview]
Message-ID: <20030423134600.GH354@phunnypharm.org> (raw)
In-Reply-To: <20030423133256.GG354@phunnypharm.org>

> Tony, you are seeing a different problem. I'll get you a patch soon (for
> the record, I'm not even subscribed to linux1394-user, but to
> linux1394-devel).

Give this patch a try. It's only a workaround, but this check needs to
be there anyway for sanity. Seems cameras cause this problem more than
anything else. Has never happeneed to me with my DV camera and DCAM) so
I haven't been able to pin down the problem yet.


Index: nodemgr.c
===================================================================
--- nodemgr.c	(revision 899)
+++ nodemgr.c	(working copy)
@@ -1264,7 +1264,7 @@
 /* We need to ensure that if we are not the IRM, that the IRM node is capable of
  * everything we can do, otherwise issue a bus reset and try to become the IRM
  * ourselves. */
-static int nodemgr_check_irm_capability(struct hpsb_host *host)
+static int nodemgr_check_irm_capability(struct hpsb_host *host, int cycles)
 {
 	quadlet_t bc;
 	int status;
@@ -1281,10 +1281,19 @@
 		/* The current irm node does not have a valid BROADCAST_CHANNEL
 		 * register and we do, so reset the bus with force_root set */
 		HPSB_DEBUG("Current remote IRM is not 1394a-2000 compliant, resetting...");
+
+		if (cycles >= 5) {
+			/* Oh screw it! Just leave the bus as it is */
+			HPSB_DEBUG("Stopping reset loop for IRM sanity");
+			return 1;
+		}
+
 		hpsb_send_phy_config(host, host->node_id, -1);
 		hpsb_reset_bus(host, LONG_RESET_FORCE_ROOT);
+
 		return 0;
 	}
+
 	return 1;
 }
 
@@ -1292,6 +1301,7 @@
 {
 	struct host_info *hi = (struct host_info *)__hi;
 	struct hpsb_host *host = hi->host;
+	int reset_cycles = 0;
 
 	/* No userlevel access needed */
 	daemonize();
@@ -1324,12 +1334,14 @@
 				i = HZ/4;
 		}
 
-		if (!nodemgr_check_irm_capability(host)) {
+		if (!nodemgr_check_irm_capability(host, reset_cycles++)) {
 			/* Do nothing, we are resetting */
 			up(&nodemgr_serialize);
 			continue;
 		}
 
+		reset_cycles = 0;
+
 		nodemgr_node_probe(hi, generation);
 		nodemgr_do_irm_duties(host);
 

  reply	other threads:[~2003-04-23 13:47 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-23 12:29 IEEE-1394 problem on init [ was Re: Linux 2.4.21-rc1 ] Tony Spinillo
2003-04-23 12:53 ` Stelian Pop
2003-04-23 13:01   ` Ben Collins
2003-04-23 13:22     ` Stelian Pop
2003-04-23 13:32       ` Ben Collins
2003-04-23 13:46         ` Ben Collins [this message]
2003-04-23 13:58         ` Stelian Pop
2003-04-23 13:54           ` Ben Collins
2003-04-23 14:21             ` Stelian Pop
2003-04-23 14:23               ` Ben Collins
2003-04-23 14:51                 ` Stelian Pop
2003-04-23 14:44                   ` Ben Collins
2003-04-23 14:48                   ` Ben Collins
2003-04-23 15:29                     ` Stelian Pop
2003-04-23 19:13                       ` Marcelo Tosatti
2003-04-23 19:05                         ` Ben Collins
2003-04-23 19:27                           ` Marcelo Tosatti
2003-04-23 20:20                         ` Stelian Pop
2003-04-23 20:24                           ` Ben Collins
2003-04-23 20:42                             ` Stelian Pop
2003-04-26  8:29                               ` The IEEE-1394 saga continued... [ was: IEEE-1394 problem on init ] Stelian Pop
2003-04-26 14:34                                 ` Ben Collins
2003-04-26 16:10                                   ` Stelian Pop
2003-04-26 16:12                                     ` Ben Collins
2003-04-26 17:00                                       ` Stelian Pop
2003-04-26 16:59                                         ` Ben Collins
2003-04-26 14:40                                 ` Ben Collins
2003-04-26 16:23                                   ` Stelian Pop
2003-04-26 16:25                                     ` Ben Collins
2003-04-26 17:15                                       ` Stelian Pop
2003-04-24 21:44                         ` IEEE-1394 problem on init [ was Re: Linux 2.4.21-rc1 ] Bill Davidsen
2003-04-24 21:41                           ` Ben Collins
2003-04-25 18:06                             ` Bill Davidsen
2003-04-25 18:16                               ` Ben Collins
2003-04-26 10:36                                 ` Bill Davidsen
  -- strict thread matches above, loose matches on Subject: below --
2003-04-21 18:47 Linux 2.4.21-rc1 Marcelo Tosatti
2003-04-23  7:59 ` IEEE-1394 problem on init [ was Re: Linux 2.4.21-rc1 ] Stelian Pop

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=20030423134600.GH354@phunnypharm.org \
    --to=bcollins@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tspinillo@yahoo.com \
    /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;
as well as URLs for NNTP newsgroup(s).