lkml.org 
[lkml]   [2003]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectsystem hangs on wake_up call from IRQ handler
Hello,

I am busy on writing a driver for a PCI Card. Amongst others my driver
includes an IOCTL command for starting a DMA transfer (user-->PCI card or
PCI card-->user). In my handler for this command I instruct the PciCard to
start a DMA transfer and than wait (sleep) for the DMA to complete. I wait
using the wait_event function, which waits for an event that is 'fired'
(wake_up) from the DMA done interrupt handler. As soon as I make the call to
wake_up, from the DMA done interrupt handler, my system hangs completely.

Does anyone have any idea why the system hangs on the wake-up from the
interrupt handler?

Below you will find some pseudo code for with the wait_event and the
wake_up:

// wait from DMA IOCTL handler
void Dta1xxTxIoCtlDma()
{
startdma();

wait_event(my_wait_queue, ( 1==dma_done_flag) );

return;
}

// wake_up from interrupt handler
void Dta1xxIRQ()
{
if ( IsDmaDoneInterruptSet() ) {
dma_done_flag = 1;
wake_up(&my_wait_queue);
}
}

I am using linux kernel version 2.4.18.

Regards,
 
Maarten


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.024 / U:5.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site