Re: [RFC net-next 2/4] gianfar: Clear ievent from interrupt handler for [RT]x int
From: Claudiu Manoil <hidden>
Date: 2012-08-09 16:04:45
On 8/8/2012 7:11 PM, Paul Gortmaker wrote:
[[RFC net-next 2/4] gianfar: Clear ievent from interrupt handler for [RT]x int] On 08/08/2012 (Wed 15:26) Claudiu Manoil wrote:quoted
It's the interrupt handler's job to clear ievent for the Tx/Rx paths, as soon as the corresponding interrupt sources have been masked.What wasn't clear to me was whether we'd ever have an instance of gfar_poll run without RTX_MASK being cleared (in less normal conditions, like netconsole, KGDBoE etc), since the gfar_schedule_cleanup is only called from rx/tx IRQ threads, and neither of those are used by gfar_poll, it seems.
Hi Paul, As I see it, netconsole has the ndo_poll_controller hook, which points to gfar_netpoll() -> gfar_interrupt() -> gfar_receive|transmit() -> gfar_schedule_cleanup(), so it passes through schedule_cleanup. My understanding is that gfar_poll() is scheduled for execution only by "__napi_schedule(&gfargrp->napi);" from the Rx/Tx interrupt handler (gfar_receive/transmit()->gfar_schedule_cleanup()), and that it will be executed sometimes after the interrupt handler returns, which means RTX_MASK has been cleared (and the interrupt sources are already masked). I think that we might have an issue if we don't clear IEVENT right away in the interrupt handler, as this register might cause additional hw interrupts to the PIC upon returning from the interrupt handler.