Software suspend and RTL 8139too in 2.6.0-test1

Peter Osterlund (petero2@telia.com)
14 Jul 2003 14:37:47 +0200


Hi!

This patch is needed to make software suspend work with the 8139too
driver loaded.

--- linux/drivers/net/8139too.c.old Mon Jul 14 14:28:27 2003
+++ linux/drivers/net/8139too.c Mon Jul 14 13:23:07 2003
@@ -110,6 +110,7 @@
#include <linux/mii.h>
#include <linux/completion.h>
#include <linux/crc32.h>
+#include <linux/suspend.h>
#include <asm/io.h>
#include <asm/uaccess.h>

@@ -1597,6 +1598,9 @@
timeout = next_tick;
do {
timeout = interruptible_sleep_on_timeout (&tp->thr_wait, timeout);
+ /* make swsusp happy with our thread */
+ if (current->flags & PF_FREEZE)
+ refrigerator(PF_IOTHREAD);
} while (!signal_pending (current) && (timeout > 0));

if (signal_pending (current)) {

-- 
Peter Osterlund - petero2@telia.com
http://w1.894.telia.com/~u89404340
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/