Commit c24c5f83 authored by Lino Sanfilippo's avatar Lino Sanfilippo Committed by Lipeng Sang
Browse files

serial: core: move RS485 configuration tasks from drivers into core

stable inclusion
from stable-v5.10.153
commit 4a230f65d6a80c6658860c899f14f1d0bd0ca65b
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I64YCA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=4a230f65d6a80c6658860c899f14f1d0bd0ca65b



--------------------------------

commit 0ed12afa upstream.

Several drivers that support setting the RS485 configuration via userspace
implement one or more of the following tasks:

- in case of an invalid RTS configuration (both RTS after send and RTS on
  send set or both unset) fall back to enable RTS on send and disable RTS
  after send

- nullify the padding field of the returned serial_rs485 struct

- copy the configuration into the uart port struct

- limit RTS delays to 100 ms

Move these tasks into the serial core to make them generic and to provide
a consistent behaviour among all drivers.

Signed-off-by: default avatarLino Sanfilippo <LinoSanfilippo@gmx.de>
Link: https://lore.kernel.org/r/20220410104642.32195-2-LinoSanfilippo@gmx.de


Signed-off-by: default avatarDaisuke Mizobuchi <mizo@atmark-techno.com>
Signed-off-by: default avatarDominique Martinet <dominique.martinet@atmark-techno.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarLipeng Sang <sanglipeng1@jd.com>
parent a7cef951
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment