mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-27 14:43:58 +08:00
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>
This commit is contained in:
parent
82d02944d2
commit
da8f58909e
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user