diff options
author | Serge Semin <Sergey.Semin@baikalelectronics.ru> | 2020-10-08 02:55:00 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-10-08 23:00:14 +0100 |
commit | da8f58909e7e047a01e4577807e648482672eddd (patch) | |
tree | ea3ef956f4b98bb80db6b2ecec380f90271d4f00 /drivers/spi | |
parent | 82d02944d238a6fdac729d135623b1d88ca8cbd6 (diff) |
spi: dw: Unmask IRQs after enabling the chip
It's theoretically erroneous to enable IRQ before the chip is turned on.
If IRQ handler gets executed before the chip is enabled, then any data
written to the Tx FIFO will be just ignored.
I say "theoretically" because we haven't noticed any problem with that,
but let's fix it anyway just in case...
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Link: https://lore.kernel.org/r/20201007235511.4935-12-Sergey.Semin@baikalelectronics.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-dw-core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-dw-core.c b/drivers/spi/spi-dw-core.c index e7ffcfff6594..89e5428c8de6 100644 --- a/drivers/spi/spi-dw-core.c +++ b/drivers/spi/spi-dw-core.c @@ -376,8 +376,6 @@ static int dw_spi_transfer_one(struct spi_controller *master, spi_enable_chip(dws, 1); return ret; } - } else { - dw_spi_irq_setup(dws); } spi_enable_chip(dws, 1); @@ -385,6 +383,8 @@ static int dw_spi_transfer_one(struct spi_controller *master, if (dws->dma_mapped) return dws->dma_ops->dma_transfer(dws, transfer); + dw_spi_irq_setup(dws); + return 1; } |