[PATCH v3 4/5] spi: dw: restore previous irq handling behavior when !ctlr->cur_msg

From: Changhuang Liang

Date: Wed Sep 23 2026 - 22:14:26 EST


hi, Jisheng

Thanks for the fix.

> Recent "enhanced" support changes the dw_spi_irq() behavior a bit
> when !!ctlr->cur_msg:
>
> if (!ctlr->cur_msg && dws->transfer_handler == dw_spi_transfer_handler) {
> dw_spi_mask_intr(dws, 0xff);
> return IRQ_HANDLED;
> }
>
> But it misses the dma case, where the transfer_handler ==
> dw_spi_dma_transfer_handler, so this changes the previous long time
> working behavior, let's restore the previous handling by only filtering
> out the dw_spi_enh_handler.
>
> Signed-off-by: Jisheng Zhang <jszhang@xxxxxxxxxx>

Reviewed-by: Changhuang Liang <changhuang.liang@xxxxxxxxxxxxxxxx>

Maybe a “Fixes” tag could be added.

> ---
> drivers/spi/spi-dw-core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/spi/spi-dw-core.c b/drivers/spi/spi-dw-core.c
> index 91de357f97f3..da7d4872e513 100644
> --- a/drivers/spi/spi-dw-core.c
> +++ b/drivers/spi/spi-dw-core.c
> @@ -280,7 +280,7 @@ static irqreturn_t dw_spi_irq(int irq, void *dev_id)
> if (!irq_status)
> return IRQ_NONE;
>
> - if (!ctlr->cur_msg && dws->transfer_handler == dw_spi_transfer_handler) {
> + if (!ctlr->cur_msg && dws->transfer_handler != dw_spi_enh_handler) {
> dw_spi_mask_intr(dws, 0xff);
> return IRQ_HANDLED;
> }