]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
Always send EOI. We can't feasibly share interrupts (since we have no
authorMichael Brown <mcb30@etherboot.org>
Sat, 13 Jan 2007 14:45:26 +0000 (14:45 +0000)
committerMichael Brown <mcb30@etherboot.org>
Sat, 13 Jan 2007 14:45:26 +0000 (14:45 +0000)
clue what the "previous" interrupt handler will do, which could range
from "just an iret" to "disable the interrupt"), and that means that
we have to take responsibility for ACKing all interrupts.  Joy.

src/arch/i386/drivers/net/undinet.c

index 2e7c13af15842bb706827f8ffb4145c665060739..a98d09d6453c07b718771f6a6385634c2f122b3b 100644 (file)
@@ -390,19 +390,27 @@ static void undinet_poll ( struct net_device *netdev, unsigned int rx_quota ) {
                /* Do nothing unless ISR has been triggered */
                if ( ! undinet_isr_triggered() )
                        return;
-               
+
                /* See if this was our interrupt */
                memset ( &undi_isr, 0, sizeof ( undi_isr ) );
                undi_isr.FuncFlag = PXENV_UNDI_ISR_IN_START;
                if ( ( rc = undinet_call ( undinic, PXENV_UNDI_ISR, &undi_isr,
                                           sizeof ( undi_isr ) ) ) != 0 )
                        return;
+
+               /* Send EOI to the PIC.  In an ideal world, we'd do
+                * this only for interrupts which the UNDI stack
+                * reports as "ours".  However, since we don't (can't)
+                * chain to the previous interrupt handler, we have to
+                * acknowledge all interrupts.  See undinet_hook_isr()
+                * for more background.
+                */
+               send_eoi ( undinic->irq );
+
+               /* If this wasn't our interrupt, exit now */
                if ( undi_isr.FuncFlag != PXENV_UNDI_ISR_OUT_OURS )
                        return;
                
-               /* Send EOI */
-               send_eoi ( undinic->irq );
-
                /* Start ISR processing */
                undinic->isr_processing = 1;
                undi_isr.FuncFlag = PXENV_UNDI_ISR_IN_PROCESS;