
From: Colin Leroy <colin@colino.net>

This patch fixes a (quite big) problem with netpoll: when link is down, it
hangs.

This patch fixes it.  Tested with no carrier (no more hang) and with
carrier (same behaviour as before).

Signed-off-by: Colin Leroy <colin@colino.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/net/core/netpoll.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -puN net/core/netpoll.c~prevent-netpoll-hanging-when-link-is-down net/core/netpoll.c
--- 25/net/core/netpoll.c~prevent-netpoll-hanging-when-link-is-down	Wed Oct  6 16:30:37 2004
+++ 25-akpm/net/core/netpoll.c	Wed Oct  6 16:30:37 2004
@@ -183,7 +183,8 @@ void netpoll_send_skb(struct netpoll *np
 	int status;
 
 repeat:
-	if(!np || !np->dev || !netif_running(np->dev)) {
+	if(!np || !np->dev || !netif_running(np->dev) ||
+	   !netif_carrier_ok(np->dev)) {
 		__kfree_skb(skb);
 		return;
 	}
_
