Hello,
Ok,I know the thing in my email title should be avoided but I have this basic 
question (I'm still a newbie).
I'm modifying smsc911x Ethernet driver so that writing to/readng from the FIFO 
can be done by our own DMA controller.
Since FIFO should not be messed up, the original driver uses spinlock during 
the FIFO burst access. I wanted to do this FIFO access using DMA, so I changed 
some code of the FIFO access code to use DMA and inserted 
wait_event_interruptible to go to sleep (that's bad) and this caused BUG : 
scheduling while atomic.
I could separate it before holding the spinlock to avoid this(DMA and PIO 
loop). But what if during the DMA, some other process tries to access FIFO? 
(other network processes can access the network anyway). How do people prevent 
this 'FIFO access by other process while in DMA' ? I have to sleep during DMA. 
Any standard method? Any help will be appreciated.
Best regards,
Chan Kim



_______________________________________________
Kernelnewbies mailing list
[email protected]
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to