[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 7 Jul 2009 13:09:30 +0900
From: Mike McCormack <mikem@...g3k.org>
To: Stephen Hemminger <shemminger@...ux-foundation.org>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] sky2: Fix a race condition in sky2_poll
Hi Stephen,
2009/7/7 Stephen Hemminger <shemminger@...ux-foundation.org>:
> Have you actually seen this race, or are you hypothesizing based
> on code review?
Based on code review prompted by seeing "receiver hang detected"
messages in the log.
> I think the original works fine. There is a race where interrupt is cleared early,
> and the poll processing runs an extra time but that is harmless.
There also appears to be a logic problem where the interrupt will not
be cleared until another packet is received, which is the case I was
originally trying to fix. It looks like if just enough packets are
received (so work_done >= to_do and we go through exit_loop) in
sky2_status_intr(), the interrupt may not be cleared even though no
packets remain.
> Now the driver misses the status interrupt.
My interpretation was that the interrupt condition must be cleared at
least once before acknowledging it.
In any case, the receiver hang detection logic will restart the
driver. I see this happening quite a bit, and it seems to happen most
commonly after sky2_up is called.
thanks,
Mike
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists