From: Lino Sanfilippo <LinoSanfilippo@gmx.de>
To: Manikanta Guntupalli <manikanta.guntupalli@amd.com>,
git@amd.com, michal.simek@amd.com, gregkh@linuxfoundation.org,
robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
conor+dt@kernel.org, linux-serial@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
jirislaby@kernel.org, linux-arm-kernel@lists.infradead.org
Cc: radhey.shyam.pandey@amd.com, srinivas.goud@amd.com,
shubhrajyoti.datta@amd.com, manion05gk@gmail.com
Subject: Re: [PATCH V5 3/3] tty: serial: uartps: Add rs485 support to uartps driver
Date: Thu, 14 Dec 2023 10:00:00 +0100 [thread overview]
Message-ID: <e8cf9ed3-e2d3-4764-b1c3-87e38e99b4a5@gmx.de> (raw)
In-Reply-To: <20231213130023.606486-4-manikanta.guntupalli@amd.com>
Hi,
On 13.12.23 14:00, Manikanta Guntupalli wrote:
>
> +/**
> + * cdns_rs485_rx_callback - Timer rx callback handler for rs485.
> + * @t: Handle to the timer list structure
> + */
> +static void cdns_rs485_rx_callback(struct timer_list *t)
> +{
> + struct cdns_uart *cdns_uart = from_timer(cdns_uart, t, timer);
> +
> + /*
> + * Default Rx should be setup, because Rx signaling path
> + * need to enable to receive data.
> + */
> + cdns_rs485_rx_setup(cdns_uart);
> +}
> +
> +/**
> + * cdns_rs485_tx_callback - Timer tx callback handler for rs485.
> + * @t: Handle to the timer list structure
> + */
> +static void cdns_rs485_tx_callback(struct timer_list *t)
> +{
> + struct cdns_uart *cdns_uart = from_timer(cdns_uart, t, timer);
> +
> + cdns_uart_handle_tx(cdns_uart->port);
This is called without holding the port lock now. Are you sure the lock is not
needed? AFAIK the port lock is needed at least for accessing the circular
buffer.
> +
> + /* Enable the TX Empty interrupt */
> + writel(CDNS_UART_IXR_TXEMPTY, cdns_uart->port->membase + CDNS_UART_IER);
> +
> + if (uart_circ_empty(&cdns_uart->port->state->xmit) ||
> + uart_tx_stopped(cdns_uart->port)) {
> + timer_setup(&cdns_uart->timer, cdns_rs485_rx_callback, 0);
> + mod_timer(&cdns_uart->timer, jiffies +
> + msecs_to_jiffies(cdns_uart->port->rs485.delay_rts_after_send));
> + }
> +}
Regards,
Lino
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2023-12-14 9:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-13 13:00 [PATCH V5 0/3] Add rs485 support to uartps driver Manikanta Guntupalli
2023-12-13 13:00 ` [PATCH V5 1/3] dt-bindings: Add reference to rs485.yaml Manikanta Guntupalli
2023-12-13 16:02 ` Conor Dooley
2023-12-13 13:00 ` [PATCH V5 2/3] tty: serial: uartps: Relocate cdns_uart_tx_empty to facilitate rs485 Manikanta Guntupalli
2023-12-13 13:00 ` [PATCH V5 3/3] tty: serial: uartps: Add rs485 support to uartps driver Manikanta Guntupalli
2023-12-13 13:57 ` Ilpo Järvinen
2023-12-14 9:00 ` Lino Sanfilippo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e8cf9ed3-e2d3-4764-b1c3-87e38e99b4a5@gmx.de \
--to=linosanfilippo@gmx.de \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=git@amd.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=manikanta.guntupalli@amd.com \
--cc=manion05gk@gmail.com \
--cc=michal.simek@amd.com \
--cc=radhey.shyam.pandey@amd.com \
--cc=robh+dt@kernel.org \
--cc=shubhrajyoti.datta@amd.com \
--cc=srinivas.goud@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox