From 0203f1ed505d6ad4000ce32a79e10b3d2d86e68a Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Sun, 27 Jul 2014 08:41:25 +0200 Subject: [PATCH] inmates: pci-demo: Clear STATESTS before triggering the MSI STATESTS may still have pending events which could prevent a MSI delivery after controller reset. That reset doesn't clear them, so do this explicitly. Signed-off-by: Jan Kiszka --- inmates/demos/x86/pci-demo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/inmates/demos/x86/pci-demo.c b/inmates/demos/x86/pci-demo.c index 195f154..8412793 100644 --- a/inmates/demos/x86/pci-demo.c +++ b/inmates/demos/x86/pci-demo.c @@ -74,6 +74,8 @@ void inmate_main(void) asm volatile("sti"); + mmio_write16(hdbar + HDA_STATESTS, mmio_read16(hdbar + HDA_STATESTS)); + mmio_write16(hdbar + HDA_GCTL, 0); delay_us(7000); mmio_write16(hdbar + HDA_GCTL, 1); -- 2.39.2