mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mikael Pettersson <mikpe@csd.uu.se>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com.br>
Cc: linux-kernel@vger.kernel.org, jgarzik@pobox.com
Subject: [PATCH][2.4.23-pre3] fix networking hangs at suspend/resume
Date: Tue, 9 Sep 2003 12:30:13 +0200	[thread overview]
Message-ID: <16221.43957.387148.283518@gargle.gargle.HOWL> (raw)
In-Reply-To: <Pine.LNX.4.44.0309031851310.30503-100000@logos.cnet>

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.

      parent reply	other threads:[~2003-09-09 10:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-03 21:53 Linux 2.4.23-pre3 Marcelo Tosatti
2003-09-03 22:58 ` Eyal Lebedinsky
2003-09-03 23:12 ` Chris Wright
2003-09-04  0:10   ` FIX: 2.4.23-pre3 missing Makefile change Marcelo Tosatti
2003-09-04  2:00 ` Linux 2.4.23-pre3 Mike Fedyk
2003-09-04 11:30   ` Marcelo Tosatti
2003-09-04 14:23     ` Andrea Arcangeli
2003-09-04  3:18 ` Supphachoke Suntiwichaya
2003-09-04  6:52   ` [PATCH 2.4.23-pre4] Fixup 'make xconfig' (was Re: Linux 2.4.23-pre3) Marc-Christian Petersen
2003-09-04  6:47 ` [PATCH 2.4.23-pre4] Remove bogus SysKonnect config stuff " Marc-Christian Petersen
2003-09-04  7:28   ` Andre Tomt
2003-09-04  8:03     ` Andre Tomt
2003-09-04  8:18       ` Marc-Christian Petersen
2003-09-05  6:31 ` 2.4.23-pre3: bttv-cards.c doesn't compile with CONFIG_FW_LOADER Adrian Bunk
2003-09-09 10:30 ` Mikael Pettersson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16221.43957.387148.283518@gargle.gargle.HOWL \
    --to=mikpe@csd.uu.se \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.com.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®