[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdZmgiON1Sz3e0LobeyDCpiyX-TGswC4xQ62sWQcEi2bjA@mail.gmail.com>
Date: Wed, 29 Nov 2023 14:58:10 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Nam Cao <namcao@...utronix.de>
Cc: broonie@...nel.org, linux-arm-kernel@...ts.infradead.org,
linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] spi: spl022: switch to use default spi_transfer_one_message()
On Wed, Nov 29, 2023 at 2:32 PM Nam Cao <namcao@...utronix.de> wrote:
> Except for polling mode, this driver's transfer_one_message() makes use
> of interrupt handler and tasklet. This is problematic because
> spi_transfer_delay_exec(), who may sleep, is called in interrupt handler
> and tasklet. This causes the following warning:
> BUG: sleeping function called from invalid context at drivers/spi/spi.c:1428
>
> Switch to use the default spi_transfer_one_message() instead, which
> calls spi_transfer_delay_exec() appropriately.
>
> Signed-off-by: Nam Cao <namcao@...utronix.de>
> ---
> Tested with polling mode and interrupt mode, NOT with DMA mode.
> Support with testing very appreciated!
Oh this is great!
Because I think Mark started nagging me something like 10 years
ago to fix this in this driver...
I have a device using DMA mode, I will dig it out and make sure to
get this tested ASAP, in the meantime:
Reviewed-by: Linus Walleij <linus.walleij@...aro.org>
Yours,
Linus Walleij
Powered by blists - more mailing lists