[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAKaHn9LC19cduyrwxkDRAdM5pjgSPBCdZUjsEMgGqS7yVQS1-g@mail.gmail.com>
Date: Sat, 24 Apr 2021 08:08:57 +0800
From: Art Nikpal <email2tema@...il.com>
To: Mark Brown <broonie@...nel.org>
Cc: Neil Armstrong <narmstrong@...libre.com>,
Kevin Hilman <khilman@...libre.com>, jbrunet@...libre.com,
Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
dri-devel@...ts.freedesktop.org, linux-spi@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-amlogic@...ts.infradead.org, linux-kernel@...r.kernel.org,
Christian Hewitt <christianshewitt@...il.com>,
Artem Lapkin <art@...das.com>, nick@...das.com,
Gouwa Wang <gouwa@...das.com>
Subject: Re: [PATCH] SPI: meson-spifc add missed calls to remove function
> I would expect the driver to unregister the controller at the start of
> the remove function, suspend doesn't really make sense here
It's strange - But without spi_master_suspend i have randomly stucks
when i try unload this module - as was written before
i was test it (load/unload module in loop) and for me suspend make sense here
If anybody has another solution - or real problem not here - please
help to find the right way!
PS: i have another way for solve this problem (may be it can help us
fix problem in kernel)
# before unload module need
echo -n spi0.0 > /sys/bus/spi/drivers/spi-nor/unbind
# after unbind driver we can unload module without problem
rmmod spi_meson_spifc # can stuck without unbind driver before ...
On Fri, Apr 23, 2021 at 7:48 PM Mark Brown <broonie@...nel.org> wrote:
>
> On Fri, Apr 23, 2021 at 11:42:47AM +0800, Artem Lapkin wrote:
> > Problem: rmmod meson_gx_mmc - not stable without spi_master_suspend call
> > and we can get stuck when try unload this module
>
> > +++ b/drivers/spi/spi-meson-spifc.c
> > @@ -359,6 +359,7 @@ static int meson_spifc_remove(struct platform_device *pdev)
> > struct spi_master *master = platform_get_drvdata(pdev);
> > struct meson_spifc *spifc = spi_master_get_devdata(master);
> >
> > + spi_master_suspend(master);
> > pm_runtime_get_sync(&pdev->dev);
> > clk_disable_unprepare(spifc->clk);
> > pm_runtime_disable(&pdev->dev);
>
> I would expect the driver to unregister the controller at the start of
> the remove function, suspend doesn't really make sense here.
Powered by blists - more mailing lists