STM32F7: serial: do not stop processing input in SW flow-control mode

This commit is contained in:
Jussi Kivilinna 2017-04-11 06:40:44 -06:00 committed by Gregory Nutt
parent e9a8dc7c6e
commit 4c99a6aeec

View File

@ -2224,6 +2224,22 @@ static bool up_rxflowcontrol(struct uart_dev_s *dev,
/* Assert/de-assert nRTS set it high resume/stop sending */
stm32_gpiowrite(priv->rts_gpio, upper);
if (upper)
{
/* With heavy Rx traffic, RXNE might be set and data pending.
* Returning 'true' in such case would cause RXNE left unhandled
* and causing interrupt storm. Sending end might be also be slow
* to react on nRTS, and returning 'true' here would prevent
* processing that data.
*
* Therefore, return 'false' so input data is still being processed
* until sending end reacts on nRTS signal and stops sending more.
*/
return false;
}
return upper;
}