ioapic: Disable unused GSI instead of leaving it in unknown state
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 22 Jul 2011 02:37:00 +0000 (10:37 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 22 Jul 2011 08:44:53 +0000 (16:44 +0800)
sys/platform/pc32/apic/ioapic.c
sys/platform/pc64/apic/ioapic.c

index c3f6316..a83f670 100644 (file)
@@ -374,7 +374,12 @@ ioapic_gsi_setup(int gsi)
                                 * don't do the default configuration.
                                 * The configuration of the target GSI
                                 * will finally setup this IRQ.
+                                *
+                                * This GSI is not used, disable it.
                                 */
+                               ioapic_pin_setup(ioapic_gsi_ioaddr(gsi),
+                                   ioapic_gsi_pin(gsi), 0,
+                                   INTR_TRIGGER_EDGE, INTR_POLARITY_HIGH);
                                return;
                        }
                        trig = INTR_TRIGGER_EDGE;
index ad0dd2c..53adbfa 100644 (file)
@@ -371,7 +371,12 @@ ioapic_gsi_setup(int gsi)
                                 * don't do the default configuration.
                                 * The configuration of the target GSI
                                 * will finally setup this IRQ.
+                                *
+                                * This GSI is not used, disable it.
                                 */
+                               ioapic_pin_setup(ioapic_gsi_ioaddr(gsi),
+                                   ioapic_gsi_pin(gsi), 0,
+                                   INTR_TRIGGER_EDGE, INTR_POLARITY_HIGH);
                                return;
                        }
                        trig = INTR_TRIGGER_EDGE;