Commit 83b06d60 authored by Ben Collins's avatar Ben Collins

ieee1394: Handle swsusp better in kernel threads.

Submitted-by: default avatarPavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarBen Collins <bcollins@debian.org>
parent 128b3af4
......@@ -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>
......@@ -1033,6 +1034,11 @@ static int hpsbpkt_thread(void *__hi)
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;
......
......@@ -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 @@ static int nodemgr_host_thread(void *__hi)
/* 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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment