Bläddra i källkod

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.
tags/v0.9.3
Michael Brown 17 år sedan
förälder
incheckning
6a3c76c8e0
1 ändrade filer med 12 tillägg och 4 borttagningar
  1. 12
    4
      src/arch/i386/drivers/net/undinet.c

+ 12
- 4
src/arch/i386/drivers/net/undinet.c Visa fil

@@ -390,19 +390,27 @@ static void undinet_poll ( struct net_device *netdev, unsigned int rx_quota ) {
390 390
 		/* Do nothing unless ISR has been triggered */
391 391
 		if ( ! undinet_isr_triggered() )
392 392
 			return;
393
-		
393
+
394 394
 		/* See if this was our interrupt */
395 395
 		memset ( &undi_isr, 0, sizeof ( undi_isr ) );
396 396
 		undi_isr.FuncFlag = PXENV_UNDI_ISR_IN_START;
397 397
 		if ( ( rc = undinet_call ( undinic, PXENV_UNDI_ISR, &undi_isr,
398 398
 					   sizeof ( undi_isr ) ) ) != 0 )
399 399
 			return;
400
+
401
+		/* Send EOI to the PIC.  In an ideal world, we'd do
402
+		 * this only for interrupts which the UNDI stack
403
+		 * reports as "ours".  However, since we don't (can't)
404
+		 * chain to the previous interrupt handler, we have to
405
+		 * acknowledge all interrupts.  See undinet_hook_isr()
406
+		 * for more background.
407
+		 */
408
+		send_eoi ( undinic->irq );
409
+
410
+		/* If this wasn't our interrupt, exit now */
400 411
 		if ( undi_isr.FuncFlag != PXENV_UNDI_ISR_OUT_OURS )
401 412
 			return;
402 413
 		
403
-		/* Send EOI */
404
-		send_eoi ( undinic->irq );
405
-
406 414
 		/* Start ISR processing */
407 415
 		undinic->isr_processing = 1;
408 416
 		undi_isr.FuncFlag = PXENV_UNDI_ISR_IN_PROCESS;

Laddar…
Avbryt
Spara