From e3fc26bc3d24cf3a3ec0572d87716b0554ccd89b Mon Sep 17 00:00:00 2001 Message-Id: <e3fc26bc3d24cf3a3ec0572d87716b0554ccd89b.1344846654.git.minovotn@redhat.com> In-Reply-To: <89ba111b83befefb8fef781cb34c41b1e392eb37.1344846654.git.minovotn@redhat.com> References: <89ba111b83befefb8fef781cb34c41b1e392eb37.1344846654.git.minovotn@redhat.com> From: Amit Shah <amit.shah@redhat.com> Date: Thu, 2 Aug 2012 09:31:39 +0200 Subject: [PATCH 3/3] hw/serial.c: fix THRE interrupt clearing RH-Author: Amit Shah <amit.shah@redhat.com> Message-id: <5633a1c3f72e403844c4e54dfc63edd119fdc819.1343899573.git.amit.shah@redhat.com> Patchwork-id: 40507 O-Subject: [RHEL5 kvm-userspace PATCH 3/3] hw/serial.c: fix THRE interrupt clearing Bugzilla: 843683 RH-Acked-by: Juan Quintela <quintela@redhat.com> RH-Acked-by: Laszlo Ersek <lersek@redhat.com> RH-Acked-by: Markus Armbruster <armbru@redhat.com> RH-Acked-by: Gerd Hoffmann <kraxel@redhat.com> UART_IIR_THRI is not a mask, but a possible value for the IIR ID. Use UART_IIR_ID to extract this value. Broken by commit 71e605f80313a632cc6714cde7bd240042dbdd95. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (manually cherry-picked from cdee7bdfee37b774c80f698d2d4338670db7c6cb) Signed-off-by: Amit Shah <amit.shah@redhat.com> --- qemu/hw/serial.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Signed-off-by: Michal Novotny <minovotn@redhat.com> --- qemu/hw/serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu/hw/serial.c b/qemu/hw/serial.c index cca702a..763710b 100644 --- a/qemu/hw/serial.c +++ b/qemu/hw/serial.c @@ -529,7 +529,7 @@ static uint32_t serial_ioport_read(void *opaque, uint32_t addr) break; case 2: ret = s->iir; - if (ret & UART_IIR_THRI) { + if ((ret & UART_IIR_ID) == UART_IIR_THRI) { s->thr_ipending = 0; serial_update_irq(s); } -- 1.7.11.2