aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/hal/platforms/STM32/OTGv1/usb_lld.c4
-rw-r--r--readme.txt2
2 files changed, 4 insertions, 2 deletions
diff --git a/os/hal/platforms/STM32/OTGv1/usb_lld.c b/os/hal/platforms/STM32/OTGv1/usb_lld.c
index 978acea90..3dcb0d839 100644
--- a/os/hal/platforms/STM32/OTGv1/usb_lld.c
+++ b/os/hal/platforms/STM32/OTGv1/usb_lld.c
@@ -549,7 +549,7 @@ static void otg_epin_handler(USBDriver *usbp, usbep_t ep) {
stm32_otg_t *otgp = usbp->otg;
uint32_t epint = otgp->ie[ep].DIEPINT;
- otgp->ie[ep].DIEPINT = 0xFFFFFFFF;
+ otgp->ie[ep].DIEPINT = epint;
if (epint & DIEPINT_TOC) {
/* Timeouts not handled yet, not sure how to handle.*/
@@ -582,7 +582,7 @@ static void otg_epout_handler(USBDriver *usbp, usbep_t ep) {
uint32_t epint = otgp->oe[ep].DOEPINT;
/* Resets all EP IRQ sources.*/
- otgp->oe[ep].DOEPINT = 0xFFFFFFFF;
+ otgp->oe[ep].DOEPINT = epint;
if ((epint & DOEPINT_STUP) && (otgp->DOEPMSK & DOEPMSK_STUPM)) {
/* Setup packets handling, setup packets are handled using a
diff --git a/readme.txt b/readme.txt
index 2d76a7bec..f94a041a0 100644
--- a/readme.txt
+++ b/readme.txt
@@ -89,6 +89,8 @@
*****************************************************************************
*** 2.7.0 ***
+- FIX: Fixed race condition in STM32 OTG driver (bug #457)(backported
+ to 2.6.3).
- FIX: Fixed memstreams.c missing from simulator makefiles (bug #454)
(backported to 2.6.3).
- FIX: Fixed chprintf() does not compile in strict C90 mode (bug #453)