2021-08-17 06:34:00

by Sherry Sun

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

From: Andy Duan <[email protected]>

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 <[email protected]>
Acked-by: Fugang Duan <[email protected]>
Signed-off-by: Adriana Reus <[email protected]>
Signed-off-by: Sherry Sun <[email protected]>
---
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


2021-08-18 14:06:31

by Greg Kroah-Hartman

[permalink] [raw]
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:
> From: Andy Duan <[email protected]>
>
> 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 <[email protected]>
> Acked-by: Fugang Duan <[email protected]>
> Signed-off-by: Adriana Reus <[email protected]>
> Signed-off-by: Sherry Sun <[email protected]>
> ---

Why is there no signed-off-by from the author?

Please fix up.

thanks,

greg k-h

2021-08-19 01:32:39

by Sherry Sun

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

Hi Greg,

> -----Original Message-----
> From: Greg KH <[email protected]>
> Sent: 2021??8??18?? 22:05
> To: Sherry Sun <[email protected]>
> Cc: [email protected]; [email protected]; linux-
> [email protected]; dl-linux-imx <[email protected]>
> 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:
> > From: Andy Duan <[email protected]>
> >
> > 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 <[email protected]>
> > Acked-by: Fugang Duan <[email protected]>
> > Signed-off-by: Adriana Reus <[email protected]>
> > Signed-off-by: Sherry Sun <[email protected]>
> > ---
>
> Why is there no signed-off-by from the author?
>
> Please fix up.

Sure, will add it in V2, thanks!

>
> thanks,
>
> greg k-h

2021-08-19 01:55:50

by Fabio Estevam

[permalink] [raw]
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 <[email protected]> wrote:
>
> From: Andy Duan <[email protected]>
>
> 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 <[email protected]>
> Acked-by: Fugang Duan <[email protected]>
> Signed-off-by: Adriana Reus <[email protected]>
> Signed-off-by: Sherry Sun <[email protected]>

You probably should add a Fixes tag.

2021-08-19 02:07:38

by Sherry Sun

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

Hi Fabio,

> -----Original Message-----
> From: Fabio Estevam <[email protected]>
> Sent: 2021年8月19日 9:55
> To: Sherry Sun <[email protected]>
> Cc: Greg Kroah-Hartman <[email protected]>; Jiri Slaby
> <[email protected]>; [email protected]; linux-kernel <linux-
> [email protected]>; dl-linux-imx <[email protected]>
> 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 <[email protected]> wrote:
> >
> > From: Andy Duan <[email protected]>
> >
> > 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 <[email protected]>
> > Acked-by: Fugang Duan <[email protected]>
> > Signed-off-by: Adriana Reus <[email protected]>
> > Signed-off-by: Sherry Sun <[email protected]>
>
> You probably should add a Fixes tag.

That's reasonable, I will add it. Thanks!

Best regards
Sherry