Re: [PATCH 2.6.30-rc4] r8169: avoid losing MSI interrupts
From: David Dillow <dave@thedillows.org>
Date: 2009-08-25 21:54:58
Also in:
lkml
On Tue, 2009-08-25 at 14:37 -0700, Eric W. Biederman wrote:
David Dillow [off-list ref] writes:quoted
Here's a possible patch to mask the NAPI events while we're running in NAPI mode. I'm not sure it is going to help, since the intr_mask was 0xffff when you hit the loop guard, so I left it in for now.Ok. I now get what your patch was trying to do and that does look like a reasonable test. I prefer: while ((status != 0xffff) && (status & tp->intr_mask))
I had thought of going that route first, but if you have any interrupt event sources set, you want to enter the loop at least once to clear them, otherwise you never see another MSI interrupt. If the masking is the way things play out, then I'd put it where I had it and put in a comment as to why it is there.
The presence of TxDescUnavail suggests as is usually the case that the interrupt status bits are independent of which interrupts are actually enabled to fire.
Yes, but I seem to recall the MSI's edge detection being especially oddly done -- I did tests with various masks and using the ability to have it generate an interrupt on user demand, and IIRC it was handled before the mask was applied, so we really did care about the events that were active -- but I may misremember.
I will take a moment and give that a try. I still like the idea of masking everything having poll do all of the work and then unmasking everything. That seems a little less fragile to me.
I wouldn't object if you did it, but I don't have time for it right now. And it may make Francois's life harder when he does his periodic sweep of the vendor driver, looking for differences.