On Thu, 22 Feb 2024, Rengarajan S wrote: > Updated the TX Burst implementation by changing the circular buffer > processing with the pre-existing APIs in kernel. Also updated conditional > statements and alignment issues for better readability. > > Signed-off-by: Rengarajan S <rengarajan.s@xxxxxxxxxxxxx> > --- > @@ -434,16 +435,7 @@ static void pci1xxxx_tx_burst(struct uart_port *port, u32 uart_status) > > xmit = &port->state->xmit; > > - if (port->x_char) { > - writeb(port->x_char, port->membase + UART_TX); > - port->icount.tx++; > - port->x_char = 0; > - return; > - } > - > - if ((uart_tx_stopped(port)) || (uart_circ_empty(xmit))) { > - port->ops->stop_tx(port); > - } else { > + if (!(port->x_char)) { > data_empty_count = (pci1xxxx_read_burst_status(port) & > UART_BST_STAT_TX_COUNT_MASK) >> 8; > do { > @@ -453,15 +445,22 @@ static void pci1xxxx_tx_burst(struct uart_port *port, u32 uart_status) > &data_empty_count, > &valid_byte_count); > > - port->icount.tx++; > if (uart_circ_empty(xmit)) > break; > } while (data_empty_count && valid_byte_count); > + } else { > + writeb(port->x_char, port->membase + UART_TX); > + port->icount.tx++; > + port->x_char = 0; > + return; Why you made this reorganization for x_char handling?? It seems entirely wrong thing to do, x_char should have precendence over sending normal chars. This patch would have been some much simpler to review if it would have not attempted to n things in one go, please try to split into sensible changes. -- i.