Subject: Re: [PATCH] Prevent netpoll hanging when link is down

From: Colin Leroy <[email-masked]>
Date: Fri, 8 Oct 2004 08:54:11 +0200

On 07 Oct 2004 at 15h10, David S. Miller wrote:

Hi, 

> > However, it doesn't fix the hang. it looks like this hang is really
> > coming from sungem.
> 
> Is it hanging inside of the ->hard_start_xmit() call 

I think so, but my way of discovering it may not be very good: I tested
by replacing 

status = np->dev->hard_start_xmit(...);

by 
status = NETDEV_TX_OK, then status = NETDEV_TX_BUSY, then status =
NETDEV_TX_LOCKED 

in netpoll.c (avoiding to call hard_start_xmit()), and it didn't hang. 

> or somewhere else?  Do you have a way to determine this without adding
> printk()'s and thus causing recursion as you mentioned earlier? :-)

Well, that's my big problem :-) I can't use the spinlock debugging
neither, because I'm on uniprocessor and on PPC.

I tried removing printk()s from gem_start_xmit() codepath, but it didn't
help either, so I don't think the lock comes from a printk()
recursion... 

(It's really hard to debug that kind of stuff! I'm learning quite a few
things :))

-- 
Colin