>>> On 19.09.17 at 15:38, <awais.mas...@vadion.com> wrote: > --- a/xen/drivers/char/ns16550.c > +++ b/xen/drivers/char/ns16550.c > @@ -521,6 +521,18 @@ static void ns16550_interrupt( > serial_tx_interrupt(port, regs); > if ( lsr & UART_LSR_DR ) > serial_rx_interrupt(port, regs); > + if ( uart->dw_usr_bsy && > + (ns_read_reg(uart, UART_IIR) & UART_IIR_BSY) == UART_IIR_BSY ) > + { > + /* If DesignWare 8250 UART became busy again when LCR was written > + * earlier, it can raise a "busy detect" again. > + * Read the UART Status Register to clear this state or we'll > end up > + * in an infinte loop because UART_IIR_NOINT is not true. > + * Placing this check in setup_preirq after LCR write does not > work > + * probably due to a delayed interrupt. > + */ > + ns_read_reg(uart, UART_USR); > + }
This same code already exists in ns16550_setup_preirq() - please introduce a helper function. It would also help if you referred to the commit introducing that other instance of the code, explaining why what was done there was not enough (because pretty clearly the author must have assumed that change to be sufficient). Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel