netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <michael@ellerman.id.au>
To: Jeff Garzik <jgarzik@pobox.com>, Andrew Morton <akpm@osdl.org>
Cc: netdev@oss.sgi.com
Subject: [PATCH] iseries_veth: Supress spurious WARN_ON() at module unload
Date: Thu, 9 Jun 2005 16:11:59 +1000	[thread overview]
Message-ID: <200506091611.59648.michael@ellerman.id.au> (raw)

Hi Andrew, Jeff,

My patch from a few weeks back (now in mainline), called
"Cleanup skbs to prevent unregister_netdevice() hanging", can cause
our TX timeout code to fire on machines with lots of VLANs (because
it takes > 2 seconds between when we stop the queues and when we're
finished stopping the connections).

When that happens the TX timeout code freaks out and does a WARN_ON()
because as far as it's concerned there shouldn't be a TX timeout
happening, which is fair enough.

I have a "proper" fix for this, which is to a) do refcounting on
connections and b) implement a proper ack timer so we don't keep unacked
skbs lying around for ever. But for 2.6.12 I propose just supressing
the WARN_ON(). Users will still see the "NETDEV WATCHDOG" warning,
but that's not nearly as bad as a WARN_ON() which users interpret
as an Oops.

cheers

--

Supress a spurious WARN_ON() in the iseries_veth driver which can
occur at module unload on machines with many VLANs.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>


--- a/drivers/net/iseries_veth.c 
+++ b/drivers/net/iseries_veth.c 
@@ -802,12 +802,13 @@
 
 	spin_lock_irqsave(&port->pending_gate, flags);
 
+	if (! port->pending_lpmask) {
+		spin_unlock_irqrestore(&port->pending_gate, flags);
+		return;
+	}
+
 	printk(KERN_WARNING "%s: Tx timeout!  Resetting lp connections: %08x\n",
 	       dev->name, port->pending_lpmask);
-
-	/* If we've timed out the queue must be stopped, which should
-	 * only ever happen when there is a pending packet. */
-	WARN_ON(! port->pending_lpmask);
 
 	for (i = 0; i < HVMAXARCHITECTEDLPS; i++) {
 		struct veth_lpar_connection *cnx = veth_cnx[i];

                 reply	other threads:[~2005-06-09  6:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200506091611.59648.michael@ellerman.id.au \
    --to=michael@ellerman.id.au \
    --cc=akpm@osdl.org \
    --cc=jgarzik@pobox.com \
    --cc=netdev@oss.sgi.com \
    /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;
as well as URLs for NNTP newsgroup(s).