zephyr/drivers/spi
Marti Bolivar 3ac9ca0859 spi: dw: fix spi_dw_init()
It is incorrect to call spi_context_release() on a
spi_dw_data object's ctx field before data->ctx->config is first
set in spi_dw_configure(). This is because spi_context_release()
reads ctx->config->operation. In particular, during spi_dw_init(),
calling spi_context_release() reads the uninitialized memory in
spi->ctx->config->operation.

Call spi_context_unlock_unconditionally() instead to properly increase
the semaphore count.

Without this patch, the first call to spi_transceive() can block
forever depending on the value of the uninitialized memory holding
spi->ctx->config->operation.

Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-07-14 18:10:38 +03:00
..
Kconfig spi: add SPI driver for STM32 family 2017-07-01 08:36:51 -04:00
Kconfig.dw doc: misspellings in Kconfig files 2017-05-05 19:38:53 -04:00
Kconfig.mcux_dspi spell: Kconfig help typos: /arch 2017-04-24 20:14:53 +00:00
Kconfig.nrf5 drivers: spi: add nRF5 slave driver 2017-05-11 22:35:28 -04:00
Makefile spi: add SPI driver for STM32 family 2017-07-01 08:36:51 -04:00
spi_context.h kernel: make K_.*_INITIALIZER private to kernel 2017-07-10 11:44:56 -07:00
spi_dw.c spi: dw: fix spi_dw_init() 2017-07-14 18:10:38 +03:00
spi_dw.h drivers/spi: Handle synchronous calls in a generic manner in DW driver 2017-05-19 18:52:25 -04:00
spi_dw_legacy.c drivers/spi: Adapt DW driver to new SPI API 2017-05-19 18:52:25 -04:00
spi_dw_quark_se_ss_regs.h drivers/spi: Adapt DW driver to new SPI API 2017-05-19 18:52:25 -04:00
spi_dw_regs.h drivers/spi: Adapt DW driver to new SPI API 2017-05-19 18:52:25 -04:00
spi_intel.c drivers: convert to using newly introduced integer sized types 2017-04-21 10:06:48 -05:00
spi_intel.h drivers: convert to using newly introduced integer sized types 2017-04-21 10:06:48 -05:00
spi_ll_stm32.c spi: stm32: fix spi_stm32_init() 2017-07-14 18:10:38 +03:00
spi_ll_stm32.h spi: add SPI driver for STM32 family 2017-07-01 08:36:51 -04:00
spi_mcux_dspi.c drivers: spi_mcux_dspi: Fix unlikely but possible division by zero 2017-05-23 06:48:26 -05:00
spi_qmsi.c drivers/spi: Get QMSI shim driver following syntax rules 2017-04-21 16:34:52 +00:00
spi_qmsi_ss.c drivers: convert to using newly introduced integer sized types 2017-04-21 10:06:48 -05:00
spim_nrf52.c drivers: convert to using newly introduced integer sized types 2017-04-21 10:06:48 -05:00
spis_nrf5.c drivers: spi: add nRF5 slave driver 2017-05-11 22:35:28 -04:00