On Wed, May 5, 2021 at 8:26 PM Saravana Kannan <[email protected]> wrote:
>
> When a spi device is unregistered and triggers a driver unbind, the
> driver might need to access the spi device. So, don't have the
> controller clean up the spi device before the driver is unbound. Clean
> up the spi device after the driver is unbound.
>
> Fixes: c7299fea6769 ("spi: Fix spi device unregister flow")
> Reported-by: Lukas Wunner <[email protected]>
And
Suggested-by: Lukas ...
> Signed-off-by: Saravana Kannan <[email protected]>
...
> Can you test this one your end to make sure you don't have issues
> anymore?
Do you need a test on my setup?
...
> + device_del(&spi->dev);
> + spi_cleanup(spi);
> + put_device(&spi->dev);
This block deserves a comment in the code.
--
With Best Regards,
Andy Shevchenko
On Wed, May 05, 2021 at 08:53:14PM +0300, Andy Shevchenko wrote:
> On Wed, May 5, 2021 at 8:26 PM Saravana Kannan <[email protected]> wrote:
> > Can you test this one your end to make sure you don't have issues
> > anymore?
> Do you need a test on my setup?
It wouldn't hurt.
On Tue, May 11, 2021 at 6:58 PM Mark Brown <[email protected]> wrote:
>
> On Wed, May 05, 2021 at 08:53:14PM +0300, Andy Shevchenko wrote:
> > On Wed, May 5, 2021 at 8:26 PM Saravana Kannan <[email protected]> wrote:
>
> > > Can you test this one your end to make sure you don't have issues
> > > anymore?
>
> > Do you need a test on my setup?
>
> It wouldn't hurt.
Okay, I have reverted first the "spi: Fix spi device unregister flow"
to be sure I can reproduce the lockdep warning, indeed, it's there.
After applying the above mentioned patch it's gone.
On top I applied this ("spi: Don't have controller clean up spi device
before driver unbind") patch to see if there is any changes,
nope, seems everything is fine.
FWIW,
Tested-by: Andy Shevchenko <[email protected]>
--
With Best Regards,
Andy Shevchenko