From: Matt Mackall <mpm@selenic.com>

Here's the first of the broken out patch set.  This puts the check for
netif_queue_stopped back into netpoll_send_skb.  Network drivers are not
designed to have their hard_start_xmit routines called when the queue is
stopped.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/net/core/netpoll.c      |   12 ++++++++++++
 25-akpm/net/core/netpoll.c.orig |   11 ++++++-----
 2 files changed, 18 insertions(+), 5 deletions(-)

diff -puN net/core/netpoll.c~netpoll-revert-queue-stopped-change net/core/netpoll.c
--- 25/net/core/netpoll.c~netpoll-revert-queue-stopped-change	Thu Aug 26 16:34:22 2004
+++ 25-akpm/net/core/netpoll.c	Thu Aug 26 16:34:22 2004
@@ -170,6 +170,18 @@ repeat:
 	spin_lock(&np->dev->xmit_lock);
 	np->dev->xmit_lock_owner = smp_processor_id();
 
+	/*
+	 * network drivers do not expect to be called if the queue is
+	 * stopped.
+	 */
+	if (netif_queue_stopped(np->dev)) {
+		np->dev->xmit_lock_owner = -1;
+		spin_unlock(&np->dev->xmit_lock);
+
+		netpoll_poll(np);
+		goto repeat;
+	}
+
 	status = np->dev->hard_start_xmit(skb, np->dev);
 	np->dev->xmit_lock_owner = -1;
 	spin_unlock(&np->dev->xmit_lock);