From 57b011ad0edce748bbcf0eba39fc40e2a79496d3 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Tue, 18 Jan 2022 06:58:42 +0000 Subject: [PATCH] Fixed bug #1211. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15373 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- os/hal/src/hal_sio.c | 6 ++++++ readme.txt | 2 ++ 2 files changed, 8 insertions(+) diff --git a/os/hal/src/hal_sio.c b/os/hal/src/hal_sio.c index 4e8ab3e21..5c465720c 100644 --- a/os/hal/src/hal_sio.c +++ b/os/hal/src/hal_sio.c @@ -465,6 +465,9 @@ msg_t sioSynchronizeRX(SIODriver *siop, sysinterval_t timeout) { while (sio_lld_is_rx_empty(siop)) { /*lint -restore*/ msg = osalThreadSuspendTimeoutS(&siop->sync_rx, timeout); + if (msg != MSG_OK) { + break; + } } osalSysUnlock(); @@ -502,6 +505,9 @@ msg_t sioSynchronizeTX(SIODriver *siop, sysinterval_t timeout) { while (sio_lld_is_tx_full(siop)) { /*lint -restore*/ msg = osalThreadSuspendTimeoutS(&siop->sync_tx, timeout); + if (msg != MSG_OK) { + break; + } } osalSysUnlock(); diff --git a/readme.txt b/readme.txt index d621dad39..41c78b9f6 100644 --- a/readme.txt +++ b/readme.txt @@ -110,6 +110,8 @@ ARMv7-M and ARMv8-M-ML. - NEW: On STM32WBxx added a check on STM32_LSI_ENABLE required by IWDG. - NEW: Added SPIv2 support also to STM32WB and STM32WL. +- FIX: Fixed missing exit condition in sioSynchronizeRX() and + sioSynchronizeTX() (bug #1211)(backported to 21.11.2). - FIX: Fixed missing check in chobjcaches.h (bug #1210) (backported to 20.3.5)(backported to 21.11.2). - FIX: Fixed misspelled chTraceSuspendI() function name (bug #1209)