- the trigger mode is edge at first
- During initializatoin, the interrupt is raised as edge which is masked.
The corresponding bit of irr is set.
- Then the mode is switched to level and it's unmasked.
- the bit of irr is set, so the interrupt is raised repeatedly by
ioapic_service().
- OS considers that the irq line is broken and falls back to polling mode.
This patch fixes the issues.
After raising edige, clear the bit of irr.