Subject: Re: Suspending interrupts
To: None <tech-kern@netbsd.org>
From: Andrew Doran <ad@netbsd.org>
List: tech-kern
Date: 07/05/2007 00:58:49
On Tue, Jul 03, 2007 at 09:32:49PM +0200, Joerg Sonnenberger wrote:

> during a discuss with Jared about the ACPI suspend/resume code in some
> drivers and the comment about failing pci_intr_establish triggered some
> thinking about how to do this better.
> 
> The attached patch can be considered a PoC. It introduces two new
> functions pci_intr_disable and pci_intr_reenable meant to temporary
> disable an interrupt handler. The backend implement just sets them to a
> void handler. The idea is that the handler won't be called again, the
> hardware was shutdown already and that the interrupt can always be
> enabled again later.

Why not mask the interrupt instead of dummying it?

> This is helpful in a number of other cases beside suspend/resume, where
> the driver knows that no interrupt will occur (e.g. NICs that are down).

Can you really depend on that?

Andrew