[alsa-devel] [PATCH] fm801: move to pcim_* and devm_* functions

Takashi Iwai tiwai at suse.de
Tue Jan 20 14:48:02 CET 2015


At Tue, 20 Jan 2015 15:46:13 +0200,
Andy Shevchenko wrote:
> 
> On Tue, Jan 20, 2015 at 2:42 PM, Takashi Iwai <tiwai at suse.de> wrote:
> > At Wed, 07 Jan 2015 15:59:35 +0100,
> > Takashi Iwai wrote:
> 
> []
> 
> 
> > I recalled finally why I didn't want this sort of changes.  Namely,
> > devm_request_irq() can't be used safely for the shared PCI
> > interrupts.
> >
> > There is a small open window between the driver's remove call
> > (i.e. card's private_free or device free calls) and the call of
> > devres_release_all().  The registered irq handler still remains during
> > this window.  When an irq is triggered from another shared device
> > during this, it goes to the remaining irq handler and accesses the
> > hardware unexpectedly.  In the case of snd_fm801_interrupt(), it's not
> > too bad, though.
> 
> Don't we have interrupts disabled on ->remove() stage?

It's a shared irq, so it doesn't help even if your device disables the
irq.  The other device can trigger the irq line at any time.


Takashi


More information about the Alsa-devel mailing list