[PATCH] tty: serial: fsl_lpuart: fix the wrong mapbase value

Subsystems: the rest, tty layer and serial drivers

STALE1847d REVIEWED: 2 (0M)

2 review trailers.

5 messages, 3 authors, 2021-08-19 · open the first message on its own page

[PATCH] tty: serial: fsl_lpuart: fix the wrong mapbase value

From: Sherry Sun <hidden>
Date: 2021-08-17 06:32:13

From: Andy Duan <redacted>

Register offset needs to be applied on mapbase also.
dma_tx/rx_request use the physical address of UARTDATA.
Register offset is currently only applied to membase (the
corresponding virtual addr) but not on mapbase.

Reviewed-by: Leonard Crestez <redacted>
Acked-by: Fugang Duan <redacted>
Signed-off-by: Adriana Reus <redacted>
Signed-off-by: Sherry Sun <redacted>
---
 drivers/tty/serial/fsl_lpuart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index f0e5da77ed6d..460e428b7592 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -2611,7 +2611,7 @@ static int lpuart_probe(struct platform_device *pdev)
 		return PTR_ERR(sport->port.membase);
 
 	sport->port.membase += sdata->reg_off;
-	sport->port.mapbase = res->start;
+	sport->port.mapbase = res->start + sdata->reg_off;
 	sport->port.dev = &pdev->dev;
 	sport->port.type = PORT_LPUART;
 	sport->devtype = sdata->devtype;
-- 
2.17.1

Re: [PATCH] tty: serial: fsl_lpuart: fix the wrong mapbase value

From: Greg KH <gregkh@linuxfoundation.org>
Date: 2021-08-18 14:05:20

On Tue, Aug 17, 2021 at 02:30:58PM +0800, Sherry Sun wrote:
From: Andy Duan <redacted>

Register offset needs to be applied on mapbase also.
dma_tx/rx_request use the physical address of UARTDATA.
Register offset is currently only applied to membase (the
corresponding virtual addr) but not on mapbase.

Reviewed-by: Leonard Crestez <redacted>
Acked-by: Fugang Duan <redacted>
Signed-off-by: Adriana Reus <redacted>
Signed-off-by: Sherry Sun <redacted>
---
Why is there no signed-off-by from the author?

Please fix up.

thanks,

greg k-h

RE: [PATCH] tty: serial: fsl_lpuart: fix the wrong mapbase value

From: Sherry Sun <hidden>
Date: 2021-08-19 01:27:58

Hi Greg,
-----Original Message-----
From: Greg KH <gregkh@linuxfoundation.org>
Sent: 2021年8月18日 22:05
To: Sherry Sun <redacted>
Cc: jirislaby@kernel.org; linux-serial@vger.kernel.org; linux-
kernel@vger.kernel.org; dl-linux-imx [off-list ref]
Subject: Re: [PATCH] tty: serial: fsl_lpuart: fix the wrong mapbase value

On Tue, Aug 17, 2021 at 02:30:58PM +0800, Sherry Sun wrote:
quoted
From: Andy Duan <redacted>

Register offset needs to be applied on mapbase also.
dma_tx/rx_request use the physical address of UARTDATA.
Register offset is currently only applied to membase (the
corresponding virtual addr) but not on mapbase.

Reviewed-by: Leonard Crestez <redacted>
Acked-by: Fugang Duan <redacted>
Signed-off-by: Adriana Reus <redacted>
Signed-off-by: Sherry Sun <redacted>
---
Why is there no signed-off-by from the author?

Please fix up.
Sure, will add it in V2, thanks!
thanks,

greg k-h

Re: [PATCH] tty: serial: fsl_lpuart: fix the wrong mapbase value

From: Fabio Estevam <festevam@gmail.com>
Date: 2021-08-19 01:54:59

Hi Sherry,

On Tue, Aug 17, 2021 at 3:32 AM Sherry Sun [off-list ref] wrote:
From: Andy Duan <redacted>

Register offset needs to be applied on mapbase also.
dma_tx/rx_request use the physical address of UARTDATA.
Register offset is currently only applied to membase (the
corresponding virtual addr) but not on mapbase.

Reviewed-by: Leonard Crestez <redacted>
Acked-by: Fugang Duan <redacted>
Signed-off-by: Adriana Reus <redacted>
Signed-off-by: Sherry Sun <redacted>
You probably should add a Fixes tag.

RE: [PATCH] tty: serial: fsl_lpuart: fix the wrong mapbase value

From: Sherry Sun <hidden>
Date: 2021-08-19 02:03:20

Hi Fabio,
-----Original Message-----
From: Fabio Estevam <festevam@gmail.com>
Sent: 2021年8月19日 9:55
To: Sherry Sun <redacted>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Jiri Slaby
[off-list ref]; linux-serial@vger.kernel.org; linux-kernel <linux-
kernel@vger.kernel.org>; dl-linux-imx [off-list ref]
Subject: Re: [PATCH] tty: serial: fsl_lpuart: fix the wrong mapbase value

Hi Sherry,

On Tue, Aug 17, 2021 at 3:32 AM Sherry Sun [off-list ref] wrote:
quoted
From: Andy Duan <redacted>

Register offset needs to be applied on mapbase also.
dma_tx/rx_request use the physical address of UARTDATA.
Register offset is currently only applied to membase (the
corresponding virtual addr) but not on mapbase.

Reviewed-by: Leonard Crestez <redacted>
Acked-by: Fugang Duan <redacted>
Signed-off-by: Adriana Reus <redacted>
Signed-off-by: Sherry Sun <redacted>
You probably should add a Fixes tag.
That's reasonable, I will add it. Thanks!

Best regards
Sherry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help