device returned IRQ_WAKE_THREAD but no thread function avable error

김찬 ckim at etri.re.kr
Wed May 20 00:28:03 EDT 2015


The reason I received “IRQ 2 device ald_dmac returned IRQ_WAKE_THREAD but no thread function available” was that in the interrupt handler, I didn’t return IRQ_HANDLED properly.
I guess if I don’t return IRQ_HANDLED, the basic handler interprets it as having returned IRQ_WAKE_THREAD and tries to run the thread given by the thread_fn argument of the request_threaded_irq function. (which is NULL in my case).
So when I made the interrupt handler return IRQ_HANDLED, that message is gone.
Chan Kim

From: kernelnewbies-bounces+ckim=etri.re.kr at kernelnewbies.org [mailto:kernelnewbies-bounces+ckim=etri.re.kr at kernelnewbies.org] On Behalf Of Cha
Sent: Monday, May 18, 2015 6:46 PM
To: kernelnewbies at kernelnewbies.org
Subject: device returned IRQ_WAKE_THREAD but no thread function avable error


In the smsc911x Ethernet chip driver, I'm changing the FIFO write and read to DMA write and read.
By the way, this driver uses loopback test during initialization using a simple test packet.
I registered the DMA controller irq using request_irq(irq, handler, flags, name, dev) which calls request_threaded_irq(irq, handler, NULL, flags, name, dev).

The process goes into sleep using wait_event_interruptible() after DMA command and I've seen the ISR handler is called by the DMA completion, and during the ISR, wake_up_interruptible() is called to wake up the process.

But when the program runs I get this error message below during the first interrupt processing.
"IRQ 2 device ald_dmac returned IRQ_WAKE_THREAD but no thread function available"
I don't know why ald_dmac returned IRQ_WAKE_THREAD (because my interrupt handler only returns IRQ_HANDLED), and I have a feeling that in this case (processing going to sleep and woken up by the ISR), I should use some other method to register my interrupt.
Can anybody give me some advice?

Thanks a lot in advance.
Chan Kim


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150520/7166978f/attachment.html 


More information about the Kernelnewbies mailing list