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 @@ ...@@ -32,6 +32,7 @@
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/kdev_t.h> #include <linux/kdev_t.h>
#include <linux/skbuff.h> #include <linux/skbuff.h>
#include <linux/suspend.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
#include <asm/semaphore.h> #include <asm/semaphore.h>
...@@ -1033,6 +1034,11 @@ static int hpsbpkt_thread(void *__hi) ...@@ -1033,6 +1034,11 @@ static int hpsbpkt_thread(void *__hi)
if (khpsbpkt_kill) if (khpsbpkt_kill)
break; break;
if (current->flags & PF_FREEZE) {
refrigerator(0);
continue;
}
while ((skb = skb_dequeue(&hpsbpkt_queue)) != NULL) { while ((skb = skb_dequeue(&hpsbpkt_queue)) != NULL) {
packet = (struct hpsb_packet *)skb->data; packet = (struct hpsb_packet *)skb->data;
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
#include <linux/suspend.h>
#include <asm/atomic.h> #include <asm/atomic.h>
#include "ieee1394_types.h" #include "ieee1394_types.h"
...@@ -1474,11 +1475,20 @@ static int nodemgr_host_thread(void *__hi) ...@@ -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 /* Sit and wait for a signal to probe the nodes on the bus. This
* happens when we get a bus reset. */ * happens when we get a bus reset. */
while (!down_interruptible(&hi->reset_sem) && while (1) {
!down_interruptible(&nodemgr_serialize)) {
unsigned int generation = 0; unsigned int generation = 0;
int i; 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) if (hi->kill_me)
break; 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