[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190815070739.GA3906@amd>
Date: Thu, 15 Aug 2019 09:07:39 +0200
From: Pavel Machek <pavel@...x.de>
To: Jorge Ramirez <jorge.ramirez-ortiz@...aro.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Sasha Levin <sashal@...nel.org>
Subject: Re: [PATCH 4.19 024/113] tty: serial: msm_serial: avoid system
lockup condition
Hi!
> >> [ Upstream commit ba3684f99f1b25d2a30b6956d02d339d7acb9799 ]
> > Should it use something like 5000*udelay(100), instead, as that has
> > chance to result in closer-to-500msec wait?
>
> the half a second timeout didnt mean to be accurate but a worst case
> scenario...I am not sure accuracy matters.
Well, I'd be afraid that it would wait 5 seconds, not half a
second. udelay(1) may be very inaccurate.
> >> while (!(msm_read(port, UART_SR) & UART_SR_TX_EMPTY)) {
> >> if (msm_read(port, UART_ISR) & UART_ISR_TX_READY)
> >> break;
> >> udelay(1);
> >> + if (!timeout--)
> >> + break;
> >> }
> >> msm_write(port, UART_CR_CMD_RESET_TX_READY, UART_CR);
> >> }
> >
> > Plus, should it do some kind of dev_err() to let users know that
> > something went very wrong with their serial?
>
> I did consider this but then I thought that 1/2 second without
> interrupts on the core should not go unnoticed. But I might be wrong.
Well, maybe it will be noticed, but user will have no idea what caused
it.
Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)
Powered by blists - more mailing lists