aboutsummaryrefslogtreecommitdiff
path: root/hw/serial.c
diff options
context:
space:
mode:
authorJuergen Lock <nox@jelal.kn-bremen.de>2009-09-12 18:52:22 +0200
committerAurelien Jarno <aurelien@aurel32.net>2009-09-16 20:58:56 +0200
commit2d6ee8e7e17227d5eb8c6e9a054dd88d5b37c5ae (patch)
tree21303174f38b3483c7a8df4df989a79eed21b4c0 /hw/serial.c
parente5934d333f0a1a8d1a3f05c0b4a6447b01e21bef (diff)
qemu serial: lost tx irqs (affecting FreeBSD's new uart(4) driver)
Well one problem seems to be the rx condition, ... if ((s->ier & UART_IER_RDI) && (s->lsr & UART_LSR_DR)) is not enough to trigger an irq, yet still causes the following conditions not to be checked anymore at all. Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de> Acked-by: Jan Kiszka <jan.kiszka@web.de> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'hw/serial.c')
-rw-r--r--hw/serial.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/hw/serial.c b/hw/serial.c
index 1f4ce77191..a22770fbbc 100644
--- a/hw/serial.c
+++ b/hw/serial.c
@@ -197,12 +197,10 @@ static void serial_update_irq(SerialState *s)
* this is not in the specification but is observed on existing
* hardware. */
tmp_iir = UART_IIR_CTI;
- } else if ((s->ier & UART_IER_RDI) && (s->lsr & UART_LSR_DR)) {
- if (!(s->fcr & UART_FCR_FE)) {
- tmp_iir = UART_IIR_RDI;
- } else if (s->recv_fifo.count >= s->recv_fifo.itl) {
- tmp_iir = UART_IIR_RDI;
- }
+ } else if ((s->ier & UART_IER_RDI) && (s->lsr & UART_LSR_DR) &&
+ (!(s->fcr & UART_FCR_FE) ||
+ s->recv_fifo.count >= s->recv_fifo.itl)) {
+ tmp_iir = UART_IIR_RDI;
} else if ((s->ier & UART_IER_THRI) && s->thr_ipending) {
tmp_iir = UART_IIR_THRI;
} else if ((s->ier & UART_IER_MSI) && (s->msr & UART_MSR_ANY_DELTA)) {