Re: [PATCH] serial: 8250: Store to lsr_save_flags after lsr read

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

 



On Fri, May 20, 2022 at 01:35:41PM +0300, Ilpo Järvinen wrote:
> Not all LSR register flags are preserved across reads. Therefore, LSR
> readers must store the non-preserved bits into lsr_save_flags.
> 
> This fix was initially mixed into feature commit f6f586102add ("serial:
> 8250: Handle UART without interrupt on TEMT using em485"). However,
> that feature change had a flaw and it was reverted to make room for
> simpler approach providing the same feature. The embedded fix got
> reverted with the feature change.
> 
> Re-add the lsr_save_flags fix and properly mark it's a fix.
> 
> Fixes: e490c9144cfa ("tty: Add software emulated RS485 support for 8250")
> Link: https://lore.kernel.org/all/1d6c31d-d194-9e6a-ddf9-5f29af829f3@xxxxxxxxxxxxxxx/T/#m1737eef986bd20cf19593e344cebd7b0244945fc
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
> 
> ---
> Since Uwe didn't follow up with this fix in an isolated patch, I'm sending 
> it now so that it doesn't end up falling through cracks.

Great, thanks. I completely obliterate that one.

Maybe it would be sensible to wrap reading + updating saved_flags in an
inline helper?

Other than that:

Acked-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>

> tg: (4419da5d5d4b..) fix/lsr-save-flags (depends on: tty-next)

Oh wow, you're using topgit? I would be interested in your pain points
and what made you choose topgit anyhow. Since a longer time I have a few
ideas for a git helper that uses the good ideas in topgit, but never
came around to implement it.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux