mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: bcollins@debian.org, linux1394-devel@lists.sourceforge.net,
	kernel list <linux-kernel@vger.kernel.org>
Subject: firewire problems with suspend
Date: Sun, 6 Jun 2004 20:09:25 +0200	[thread overview]
Message-ID: <20040606180925.GA4542@elf.ucw.cz> (raw)

Hi!

There are some bad problems with firewire & swsusp. This fixes some,
but other remain. If ohci1394 is removed before suspend, then
reinserted, then rmmod hangs.

This is certainly better better than what was there, what about
applying?

								Pavel

--- clean/drivers/ieee1394/ieee1394_core.c	2004-05-20 23:08:14.000000000 +0200
+++ linux/drivers/ieee1394/ieee1394_core.c	2004-06-01 23:33:48.000000000 +0200
@@ -32,6 +32,7 @@
 #include <linux/bitops.h>
 #include <linux/kdev_t.h>
 #include <linux/skbuff.h>
+#include <linux/suspend.h>
 
 #include <asm/byteorder.h>
 #include <asm/semaphore.h>
@@ -1024,6 +1025,11 @@
 		if (khpsbpkt_kill)
 			break;
 
+		if (current->flags & PF_FREEZE) {
+			refrigerator(0);
+			continue;
+		}
+
 		while ((skb = skb_dequeue(&hpsbpkt_queue)) != NULL) {
 			packet = (struct hpsb_packet *)skb->data;
 
--- clean/drivers/ieee1394/nodemgr.c	2004-05-20 23:08:14.000000000 +0200
+++ linux/drivers/ieee1394/nodemgr.c	2004-06-06 19:34:56.000000000 +0200
@@ -19,6 +19,7 @@
 #include <linux/delay.h>
 #include <linux/pci.h>
 #include <linux/moduleparam.h>
+#include <linux/suspend.h>
 #include <asm/atomic.h>
 
 #include "ieee1394_types.h"
@@ -1474,11 +1475,20 @@
 
 	/* Sit and wait for a signal to probe the nodes on the bus. This
 	 * happens when we get a bus reset. */
-	while (!down_interruptible(&hi->reset_sem) &&
-	       !down_interruptible(&nodemgr_serialize)) {
+	while (1) {
 		unsigned int generation = 0;
 		int i;
 
+		if (down_interruptible(&hi->reset_sem) ||
+		    down_interruptible(&nodemgr_serialize)) {
+			if (current->flags & PF_FREEZE) {
+				refrigerator(0);
+				continue;
+			}
+			printk("nodemgr: received unexpected signal?!\n" );
+			break;
+		}
+
 		if (hi->kill_me)
 			break;
 
@@ -1532,6 +1542,7 @@
 
 		up(&nodemgr_serialize);
 	}
+	printk("nodemgr: Exiting due to no down\n");
 
 caught_signal:
 	HPSB_VERBOSE("NodeMgr: Exiting thread");

-- 
934a471f20d6580d5aad759bf0d97ddc

             reply	other threads:[~2004-06-06 18:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-06 18:09 Pavel Machek [this message]
2004-06-06 19:20 ` Ben Collins

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=20040606180925.GA4542@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=bcollins@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    /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®