Re: [PATCH v1 3/4] spi/xilinx: Simplify irq allocation

From: Mark Brown
Date: Tue Jul 09 2013 - 10:47:15 EST


On Tue, Jul 09, 2013 at 04:15:13PM +0200, Michal Simek wrote:

> 4. spi_master_release()
> 5. devres_release() with irq

> If interrupt happends between 4 and 5 than it can be the problem.
> Do I understand you correctly?

Yes.

> If this is problematic case we can disable local and global interrupts
> and add it between 2 and 3 or 3-4.
> /* Disable all the interrupts just in case */
> xspi->write_fn(0, regs_base + XIPIF_V123B_IIER_OFFSET);
> /* Disable the global IPIF interrupt */
> xspi->write_fn(0, regs_base + XIPIF_V123B_DGIER_OFFSET);

> What do you think about this solution?

That's fine, though if just manually freeing the IRQ works that's also
OK...

> I have also tried to run one thing with and without this patch
> and the results are below.

> When I add this irq disable function between 1 and 2 then
> module removing stucks.

You'll need to wait until the device is quiesced at least if it's
relying on the interrupt to complete operations.

Attachment: signature.asc
Description: Digital signature