lkml.org 
[lkml]   [2003]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH][2.4.23-pre3] fix networking hangs at suspend/resume
Since upgrading my laptop from 2.4.23-pre2 to -pre3 it started
hanging hard in conjunction with APM suspend or resume. Typically
the hang occurs after 2-3 suspend/resume cycles.

After two days of working through the 2.4.23-pre2 -> 2.4.23-pre3
patch piece by piece, I traced it to this change:

> Jeff Garzik:
> o [NET] move netif_* helpers from tg3 driver to linux/netdevice.h

A while-test_bit in net/core/dev.c was replaced (indirectly via a
new inline function) by a while-test_and_set_bit. This is not correct
in general, and in this code triggers semi-random hangs at suspend
or resume. I've not seen any hangs at other times, however.

This patch reverts the broken part of the cleanup.

/Mikael

--- linux-2.4.23-pre3/net/core/dev.c.~1~ 2003-09-09 02:01:08.000000000 +0200
+++ linux-2.4.23-pre3/net/core/dev.c 2003-09-09 02:02:00.000000000 +0200
@@ -851,7 +851,11 @@
* engine, but this requires more changes in devices. */

smp_mb__after_clear_bit(); /* Commit netif_running(). */
- netif_poll_disable(dev);
+ while (test_bit(__LINK_STATE_RX_SCHED, &dev->state)) {
+ /* No hurry. */
+ current->state = TASK_INTERRUPTIBLE;
+ schedule_timeout(1);
+ }

/*
* Call the device specific close. This cannot fail.
-
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/
\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.098 / U:0.768 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site