On Tue, Nov 11, 2014 at 09:47:29AM +0200, Peter Ujfalusi wrote:
On 11/10/2014 08:58 PM, Mark Brown wrote:
This will unconditionally report that any interrupt that gets delivered is handled and acknowledged regardles of what was reported. This isn't ideal, I'd at least expect a warning to be printed if we're handling interrupts we don't understand.
The setup code only enable interrupt generation for XUNDRN for tx or ROVRN for rx. If we receive the interrupt it is because either of these happened. We are not yet interested on the other bits in the status register and not all bits are signaling error.
Sure, I'm sure it's fine now - the goal here is to be robust against future changes.
If we would have prints for other bits, we should have at least strategy to deal with them.
The strategy I'm suggesting is to either log them so people know what's happening if they do go off and can go look at the code or not handle them so that the generic interrupt handing code can provide a default implementation of that.
At the end of the function we ack the interrupt to the HW.
This is the problem - it means that if they do go off they're silently ignored, and if they start screaming for some reason we don't have anything in place that will handle that.