3ac9ca0859
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> |
||
---|---|---|
.. | ||
Kconfig | ||
Kconfig.dw | ||
Kconfig.mcux_dspi | ||
Kconfig.nrf5 | ||
Makefile | ||
spi_context.h | ||
spi_dw.c | ||
spi_dw.h | ||
spi_dw_legacy.c | ||
spi_dw_quark_se_ss_regs.h | ||
spi_dw_regs.h | ||
spi_intel.c | ||
spi_intel.h | ||
spi_ll_stm32.c | ||
spi_ll_stm32.h | ||
spi_mcux_dspi.c | ||
spi_qmsi.c | ||
spi_qmsi_ss.c | ||
spim_nrf52.c | ||
spis_nrf5.c |