summaryrefslogtreecommitdiffstats
path: root/src/arch/i386/drivers/net/undinet.c
diff options
context:
space:
mode:
authorMichael Brown2007-01-13 15:45:26 +0100
committerMichael Brown2007-01-13 15:45:26 +0100
commit6a3c76c8e042efeac72b3385356316bc33ffb47d (patch)
treee58bcfdd1e697aa97b79be750ae9abc4e816da8a /src/arch/i386/drivers/net/undinet.c
parentDamn Broadcom and their damned incorrect assumptions about x86 memory (diff)
downloadipxe-6a3c76c8e042efeac72b3385356316bc33ffb47d.tar.gz
ipxe-6a3c76c8e042efeac72b3385356316bc33ffb47d.tar.xz
ipxe-6a3c76c8e042efeac72b3385356316bc33ffb47d.zip
Always send EOI. We can't feasibly share interrupts (since we have no
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.
Diffstat (limited to 'src/arch/i386/drivers/net/undinet.c')
-rw-r--r--src/arch/i386/drivers/net/undinet.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/arch/i386/drivers/net/undinet.c b/src/arch/i386/drivers/net/undinet.c
index 2e7c13af..a98d09d6 100644
--- a/src/arch/i386/drivers/net/undinet.c
+++ b/src/arch/i386/drivers/net/undinet.c
@@ -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;