John, I've been fighting with this as well. So far 
what I've done is the following:

void interrupt_handler( int irq, struct pt_regs *regs ) {

   if( board_being_used ) {

        irqs = test_board_for_pending_irqs();
        if( irqs ) {
                clear_irqs_on_board();
                /* handle interrupt */
                rtl_hard_enable_irq( irq );
        }
   }
   else
           clear_irqs_on_board();

   rtl_gloabl_pend_irq( irq );
   
}

The above works for a little while, but I still get lock-ups 
every now and then. However, I'm not 100% sure that my interrupt 
handler is the cause (any comments on the above code?). 

I think what you're missing in the rtl_global_pend_irq(). 

> -----Original Message-----
> From: Seybold, John B [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 19, 2002 4:08 PM
> To: '[EMAIL PROTECTED]'
> Subject: [Rtl]shared IRQ and RTLinux interrupt handlers
> 
> 
> For reasons we don't understand, the plug & play system moved 
> the IRQ for
> our custom board to share an IRQ with the Ethernet 
> controller. Now when we
> try to install our custom RTLinux module the Ethernet interface dies. 
> 
> We looked in ...MAN\rtl_request_irq.3.html, which says "If it 
> is necessary
> to receive further interrupts from this device, you must reenable the
> interrupt line with the rtl_hard_enable_irq(3) function."; 
> after the reply
> by Yodaiken on 9/12, it sounds like this sentence was meant 
> to cover only
> highly unusual cases, and a normal RTLinux interrupt handler 
> should just
> handle and clear the associated interrupt source and then 
> return. Right??
> 
> Even if we leave the interrupts on our custom board disabled 
> and install an
> interrupt handler that just executes a return 0, installing 
> the module with
> a shared IRQ still kills the Ethernet interface that shares the IRQ.
> 
> Do we need to do anything in our interrupt handler to support shared
> interrupts?
> 
> Is there anything that we can do to force a unique IRQ for 
> our plug and play
> board?
> 
>  Thanks 
>    John
> _______________________________________________
> Rtl mailing list
> [EMAIL PROTECTED]
> http://www2.fsmlabs.com/mailman/listinfo.cgi/rtl
> 
_______________________________________________
Rtl mailing list
[EMAIL PROTECTED]
http://www2.fsmlabs.com/mailman/listinfo.cgi/rtl

Reply via email to