summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--hw/i8259.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/hw/i8259.c b/hw/i8259.c
index bb257e642c..31962c0f93 100644
--- a/hw/i8259.c
+++ b/hw/i8259.c
@@ -393,7 +393,13 @@ static uint64_t pic_ioport_read(void *opaque, target_phys_addr_t addr1,
     int ret;
 
     if (s->poll) {
-        ret = pic_poll_read(s);
+        ret = pic_get_irq(s);
+        if (ret >= 0) {
+            pic_intack(s, ret);
+            ret |= 0x80;
+        } else {
+            ret = 0;
+        }
         s->poll = 0;
     } else {
         if (addr == 0) {