aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-01-18 09:16:20 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-01-18 09:16:20 +0000
commit027e1f38459888c6641a66063bfd203493c35dd4 (patch)
tree039386c7f5d5dff6045e0b36a206ef9e317caf38
parente44be744f288e2c58c0d0e26ed1c08123d821641 (diff)
downloadChibiOS-027e1f38459888c6641a66063bfd203493c35dd4.tar.gz
ChibiOS-027e1f38459888c6641a66063bfd203493c35dd4.tar.bz2
ChibiOS-027e1f38459888c6641a66063bfd203493c35dd4.zip
Fixed bug #458.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6630 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--os/hal/platforms/STM32/sdc_lld.c8
-rw-r--r--readme.txt2
2 files changed, 6 insertions, 4 deletions
diff --git a/os/hal/platforms/STM32/sdc_lld.c b/os/hal/platforms/STM32/sdc_lld.c
index 69873d5f0..0ad164235 100644
--- a/os/hal/platforms/STM32/sdc_lld.c
+++ b/os/hal/platforms/STM32/sdc_lld.c
@@ -618,16 +618,16 @@ bool_t sdc_lld_read_aligned(SDCDriver *sdcp, uint32_t startblk,
SDIO_MASK_DATAENDIE;
SDIO->DLEN = n * MMCSD_BLOCK_SIZE;
- /* Talk to card what we want from it.*/
- if (sdc_lld_prepare_read(sdcp, startblk, n, resp) == TRUE)
- goto error;
-
/* Transaction starts just after DTEN bit setting.*/
SDIO->DCTRL = SDIO_DCTRL_DTDIR |
SDIO_DCTRL_DBLOCKSIZE_3 |
SDIO_DCTRL_DBLOCKSIZE_0 |
SDIO_DCTRL_DMAEN |
SDIO_DCTRL_DTEN;
+
+ /* Talk to card what we want from it.*/
+ if (sdc_lld_prepare_read(sdcp, startblk, n, resp) == TRUE)
+ goto error;
if (sdc_lld_wait_transaction_end(sdcp, n, resp) == TRUE)
goto error;
diff --git a/readme.txt b/readme.txt
index f94a041a0..da17204b0 100644
--- a/readme.txt
+++ b/readme.txt
@@ -89,6 +89,8 @@
*****************************************************************************
*** 2.7.0 ***
+- FIX: Fixed race condition in STM32 SDC driver (bug #458)(backported
+ to 2.6.3).
- 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)