Hi,
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
http://permalink.gmane.org/gmane.linux.kernel.mmc/8338
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_claim_host();
sdio_claim_irq():
...
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];
...
sdio_release_host();
Since we woke up sdio_irq_thread(), while this thread get a chance to run:
...
__mmc_claim_host()
process_sdio_pending_irqs() -> since sdio_single_irq is non NULL the
func->handler is directly called without checking pending interrupt bit
CCCR_INTx.
mmc_release_host()
...
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:
http://permalink.gmane.org/gmane.linux.kernel.mmc/10871
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 http://vger.kernel.org/majordomo-info.html