2004-06-06 18:09:52

by Pavel Machek

[permalink] [raw]
Subject: firewire problems with suspend

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


2004-06-06 20:05:52

by Ben Collins

[permalink] [raw]
Subject: Re: firewire problems with suspend

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/