[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20231214084955.7245c538@namcao>
Date: Thu, 14 Dec 2023 08:49:55 +0100
From: Nam Cao <namcao@...utronix.de>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: broonie@...nel.org, linux-arm-kernel@...ts.infradead.org,
linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] spi: spl022: switch to use default
spi_transfer_one_message()
On Thu, 14 Dec 2023 01:19:04 +0100 Linus Walleij <linus.walleij@...aro.org> wrote:
> On Wed, Nov 29, 2023 at 5: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>
> > Reviewed-by: Linus Walleij <linus.walleij@...aro.org>
> > ---
> > Tested with polling mode and interrupt mode, NOT with DMA mode.
> > Support with testing very appreciated!
>
> FWIW I tested this now on a device using DMA for the transfers
> and everything works fine like before.
Thanks for spending time reviewing and testing!
Best regards,
Nam
Powered by blists - more mailing lists