SDIO single irq optimization - Spurious interrupt notification to function driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


While I was debugging an issue where the sdio function driver panics upon receiving a spurious interrupt notification which is similar to the one found on libertas sdio

I can confirm that my hardware not buggy and is not generating any interrupts during initialization and CCCR_INTx is all zero's.

After some analysis, I found that there is a notification of interrupt to function handler by sdio_irq_thread() even though there is no interrupt. The sequence is as follows.


sdio_card_irq_get() -> kthread_run(sdio_irq_thread) -> wake_up_sdio_irq_thread
	sdio_single_irq_set() -> card->sdio_single_irq = func = sdio_func[i];


Since we woke up sdio_irq_thread(), while this thread get a chance to run:
process_sdio_pending_irqs() -> since sdio_single_irq is non NULL the func->handler is directly called without checking pending interrupt bit CCCR_INTx.

Irrespective of the function driver state, sdio driver should not call func->handler() if it is not real interrupt. I knew that function handler should be able to handle these interrupts gracefully. But it is just not the right thing for sdio driver to generate spurious interrupts.

I see this notification issue during mmc_sdio_resume() also explained by Nicolas:

This leads me to think of reverting commit 06e8935feb "optimized SDIO IRQ handling for single irq" instead of hacking every function driver to handle spurious interrupt notification gracefully.

Let me know your thoughts on this or suggest any alternate way instead of reverting it.

Thanks & Regards,
Sujit Reddy Thumma
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [XFree86]

Add to Google Powered by Linux