firewire problems with suspend
From: Pavel Machek
Date: Sun Jun 06 2004 - 13:12:03 EST
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/