All of lore.kernel.org
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] serial: mvebu-uart: fix calculation of clock divisor" failed to apply to 4.19-stable tree
@ 2021-07-11 13:02 gregkh
  2021-07-12  8:48 ` Pali Rohár
  0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2021-07-11 13:02 UTC (permalink / raw)
  To: pali, gregkh; +Cc: stable


The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 9078204ca5c33ba20443a8623a41a68a9995a70d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
Date: Fri, 25 Jun 2021 00:49:00 +0200
Subject: [PATCH] serial: mvebu-uart: fix calculation of clock divisor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The clock divisor should be rounded to the closest value.

Signed-off-by: Pali Rohár <pali@kernel.org>
Fixes: 68a0db1d7da2 ("serial: mvebu-uart: add function to change baudrate")
Cc: stable@vger.kernel.org # 0e4cf69ede87 ("serial: mvebu-uart: clarify the baud rate derivation")
Link: https://lore.kernel.org/r/20210624224909.6350-2-pali@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

diff --git a/drivers/tty/serial/mvebu-uart.c b/drivers/tty/serial/mvebu-uart.c
index 04c41689d81c..f3ecbcf495ee 100644
--- a/drivers/tty/serial/mvebu-uart.c
+++ b/drivers/tty/serial/mvebu-uart.c
@@ -463,7 +463,7 @@ static int mvebu_uart_baud_rate_set(struct uart_port *port, unsigned int baud)
 	 * makes use of D to configure the desired baudrate.
 	 */
 	m_divisor = OSAMP_DEFAULT_DIVISOR;
-	d_divisor = DIV_ROUND_UP(port->uartclk, baud * m_divisor);
+	d_divisor = DIV_ROUND_CLOSEST(port->uartclk, baud * m_divisor);
 
 	brdv = readl(port->membase + UART_BRDV);
 	brdv &= ~BRDV_BAUD_MASK;


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: FAILED: patch "[PATCH] serial: mvebu-uart: fix calculation of clock divisor" failed to apply to 4.19-stable tree
  2021-07-11 13:02 FAILED: patch "[PATCH] serial: mvebu-uart: fix calculation of clock divisor" failed to apply to 4.19-stable tree gregkh
@ 2021-07-12  8:48 ` Pali Rohár
  2021-07-15 11:49   ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Pali Rohár @ 2021-07-12  8:48 UTC (permalink / raw)
  To: gregkh; +Cc: stable

On Sunday 11 July 2021 15:02:41 gregkh@linuxfoundation.org wrote:
> The patch below does not apply to the 4.19-stable tree.

Hello Greg!

I have tested this it and it applies cleanly. I have just called
following commands on top of linux-4.19.y branch without any manual
backporting and there were no issues.

git cherry-pick 0e4cf69ede87
git cherry-pick 9078204ca5c3

Could you look at it, why it is failing for you?

> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@vger.kernel.org>.
> 
> thanks,
> 
> greg k-h
> 
> ------------------ original commit in Linus's tree ------------------
> 
> From 9078204ca5c33ba20443a8623a41a68a9995a70d Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
> Date: Fri, 25 Jun 2021 00:49:00 +0200
> Subject: [PATCH] serial: mvebu-uart: fix calculation of clock divisor
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
> 
> The clock divisor should be rounded to the closest value.
> 
> Signed-off-by: Pali Rohár <pali@kernel.org>
> Fixes: 68a0db1d7da2 ("serial: mvebu-uart: add function to change baudrate")
> Cc: stable@vger.kernel.org # 0e4cf69ede87 ("serial: mvebu-uart: clarify the baud rate derivation")
> Link: https://lore.kernel.org/r/20210624224909.6350-2-pali@kernel.org
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> 
> diff --git a/drivers/tty/serial/mvebu-uart.c b/drivers/tty/serial/mvebu-uart.c
> index 04c41689d81c..f3ecbcf495ee 100644
> --- a/drivers/tty/serial/mvebu-uart.c
> +++ b/drivers/tty/serial/mvebu-uart.c
> @@ -463,7 +463,7 @@ static int mvebu_uart_baud_rate_set(struct uart_port *port, unsigned int baud)
>  	 * makes use of D to configure the desired baudrate.
>  	 */
>  	m_divisor = OSAMP_DEFAULT_DIVISOR;
> -	d_divisor = DIV_ROUND_UP(port->uartclk, baud * m_divisor);
> +	d_divisor = DIV_ROUND_CLOSEST(port->uartclk, baud * m_divisor);
>  
>  	brdv = readl(port->membase + UART_BRDV);
>  	brdv &= ~BRDV_BAUD_MASK;
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: FAILED: patch "[PATCH] serial: mvebu-uart: fix calculation of clock divisor" failed to apply to 4.19-stable tree
  2021-07-12  8:48 ` Pali Rohár
@ 2021-07-15 11:49   ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2021-07-15 11:49 UTC (permalink / raw)
  To: Pali Rohár; +Cc: stable

On Mon, Jul 12, 2021 at 10:48:02AM +0200, Pali Rohár wrote:
> On Sunday 11 July 2021 15:02:41 gregkh@linuxfoundation.org wrote:
> > The patch below does not apply to the 4.19-stable tree.
> 
> Hello Greg!
> 
> I have tested this it and it applies cleanly. I have just called
> following commands on top of linux-4.19.y branch without any manual
> backporting and there were no issues.
> 
> git cherry-pick 0e4cf69ede87
> git cherry-pick 9078204ca5c3
> 
> Could you look at it, why it is failing for you?

Ah, my fault, I forgot to grab the first commit here.

Now queued up, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-15 11:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-11 13:02 FAILED: patch "[PATCH] serial: mvebu-uart: fix calculation of clock divisor" failed to apply to 4.19-stable tree gregkh
2021-07-12  8:48 ` Pali Rohár
2021-07-15 11:49   ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.