ref: 2a946b24a6b9ff38a33e27d54b46dbb898373267
parent: 0c846e605b33e86a35dd6562df168a8b1a6beeae
author: cinap_lenrek <[email protected]>
date: Sun Nov 15 09:34:17 EST 2020
audiohda: do not enable interrupts before intrenable() When using /dev/reboot, the MSI vecor might have already been setup causing interrupts to fire on the designated cpu while we send the commands to the card.
--- a/sys/src/9/pc/audiohda.c
+++ b/sys/src/9/pc/audiohda.c
@@ -1752,9 +1752,6 @@
waitup8(ctlr, Rirbctl, Rirbdma, Rirbdma);
- /* enable interrupts */
- csr32(ctlr, Intctl) |= Gie | Cie;
-
return 0;
}
@@ -1958,6 +1955,9 @@
adev->ctl = hdactl;
intrenable(irq, hdainterrupt, adev, tbdf, "hda");
+
+ /* enable interrupts */
+ csr32(ctlr, Intctl) |= Gie | Cie;
ctlr->q = qopen(256, 0, 0, 0);