提交 2d6ee8e7 编写于 作者: J Juergen Lock 提交者: Aurelien Jarno

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: NJuergen Lock <nox@jelal.kn-bremen.de>
Acked-by: NJan Kiszka <jan.kiszka@web.de>
Acked-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
上级 e5934d33
......@@ -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)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册