RE: [PATCH V9 2/3] tty: serial: uartps: Relocate cdns_uart_tx_empty to facilitate rs485

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Manikanta Guntupalli <manikanta.guntupalli@xxxxxxx>
> Sent: Thursday, 18 January 2024 08:40
> Subject: [PATCH V9 2/3] tty: serial: uartps: Relocate cdns_uart_tx_empty to
> facilitate rs485
> 
> Relocate cdns_uart_tx_empty function to avoid prototype statement in
> rs485 changes.
> Update return check with uart_tx_stopped() in cdns_uart_handle_tx().
> 
> Signed-off-by: Manikanta Guntupalli <manikanta.guntupalli@xxxxxxx>
> ---
> --- a/drivers/tty/serial/xilinx_uartps.c
> +++ b/drivers/tty/serial/xilinx_uartps.c
> @@ -316,7 +331,7 @@ static void cdns_uart_handle_tx(void *dev_id)
>  	struct circ_buf *xmit = &port->state->xmit;
>  	unsigned int numbytes;
> 
> -	if (uart_circ_empty(xmit)) {
> +	if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {

Can you please also insert a comment here?
+ 		/* Disable the TX Empty interrupt */

>  		writel(CDNS_UART_IXR_TXEMPTY, port->membase +
> CDNS_UART_IDR);
>  		return;
>  	}
 
Kind regards,
Maarten Brock





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux