lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <68b3481e-7a4d-4070-a711-709021154412@kernel.org>
Date: Mon, 8 Jul 2024 08:28:10 +0200
From: Jiri Slaby <jirislaby@...nel.org>
To: Stefan Eichenberger <eichest@...il.com>, gregkh@...uxfoundation.org,
 shawnguo@...nel.org, s.hauer@...gutronix.de, kernel@...gutronix.de,
 festevam@...il.com, cniedermaier@...electronics.com,
 stefan.eichenberger@...adex.com, l.sanfilippo@...bus.com,
 tglx@...utronix.de, rickaran@...s.com, francesco.dolcini@...adex.com
Cc: linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org,
 imx@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v1] serial: imx: only set receiver level if it is zero

On 03. 07. 24, 13:25, Stefan Eichenberger wrote:
> From: Stefan Eichenberger <stefan.eichenberger@...adex.com>
> 
> With commit a81dbd0463ec ("serial: imx: set receiver level before
> starting uart") we set the receiver level to its default value. This
> caused a regression when using SDMA, where the receiver level is 9
> instead of 8 (default). This change will first check if the receiver
> level is zero and only then set it to the default. This still avoids the
> interrupt storm when the receiver level is zero.
> 
> Fixes: a81dbd0463ec ("serial: imx: set receiver level before starting uart")
> Signed-off-by: Stefan Eichenberger <stefan.eichenberger@...adex.com>
> ---
>   drivers/tty/serial/imx.c | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
> index f4f40c9373c2f..e22be8f45c93e 100644
> --- a/drivers/tty/serial/imx.c
> +++ b/drivers/tty/serial/imx.c
> @@ -120,6 +120,7 @@
>   #define UCR4_OREN	(1<<1)	/* Receiver overrun interrupt enable */
>   #define UCR4_DREN	(1<<0)	/* Recv data ready interrupt enable */
>   #define UFCR_RXTL_SHF	0	/* Receiver trigger level shift */
> +#define UFCR_RXTL_MASK	0x3F	/* Receiver trigger 6 bits wide */
>   #define UFCR_DCEDTE	(1<<6)	/* DCE/DTE mode select */
>   #define UFCR_RFDIV	(7<<7)	/* Reference freq divider mask */

All these should be converted to BIT() and GENMASK(). Then, 
UFCR_RXTL_MASK should be obviously GENMASK(5, 0).

UFCR_RXTL_SHF is unused (and unneeded) BTW.

>   #define UFCR_RFDIV_REG(x)	(((x) < 7 ? 6 - (x) : 6) << 7)

thanks,
-- 
js


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ