mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* firewire problems with suspend
@ 2004-06-06 18:09 Pavel Machek
  2004-06-06 19:20 ` Ben Collins
  0 siblings, 1 reply; 2+ messages in thread
From: Pavel Machek @ 2004-06-06 18:09 UTC (permalink / raw)
  To: bcollins, linux1394-devel, kernel list

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

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

* Re: firewire problems with suspend
  2004-06-06 18:09 firewire problems with suspend Pavel Machek
@ 2004-06-06 19:20 ` Ben Collins
  0 siblings, 0 replies; 2+ messages in thread
From: Ben Collins @ 2004-06-06 19:20 UTC (permalink / raw)
  To: Pavel Machek; +Cc: linux1394-devel, kernel list

On Sun, Jun 06, 2004 at 08:09:25PM +0200, Pavel Machek wrote:
> 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?

Applied, thanks.

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

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

end of thread, other threads:[~2004-06-06 20:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-06 18:09 firewire problems with suspend Pavel Machek
2004-06-06 19:20 ` Ben Collins

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®