From: Art Nikpal <email2tema@gmail.com>
To: Mark Brown <broonie@kernel.org>
Cc: Neil Armstrong <narmstrong@baylibre.com>,
Kevin Hilman <khilman@baylibre.com>,
jbrunet@baylibre.com,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
dri-devel@lists.freedesktop.org, linux-spi@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org,
Christian Hewitt <christianshewitt@gmail.com>,
Artem Lapkin <art@khadas.com>,
nick@khadas.com, Gouwa Wang <gouwa@khadas.com>
Subject: Re: [PATCH] SPI: meson-spifc add missed calls to remove function
Date: Sat, 24 Apr 2021 08:08:57 +0800 [thread overview]
Message-ID: <CAKaHn9LC19cduyrwxkDRAdM5pjgSPBCdZUjsEMgGqS7yVQS1-g@mail.gmail.com> (raw)
In-Reply-To: <20210423114735.GA5507@sirena.org.uk>
> 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@kernel.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.
next prev parent reply other threads:[~2021-04-24 0:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-23 3:42 [PATCH] SPI: meson-spifc add missed calls to remove function Artem Lapkin
2021-04-23 11:47 ` Mark Brown
2021-04-24 0:08 ` Art Nikpal [this message]
[not found] ` <CAKaHn9+d5crmmG-aKyLuvyxk+A7aC9qqfX_3wuMXm50pg+pZ4w@mail.gmail.com>
2021-04-26 11:56 ` Mark Brown
2021-04-30 8:49 ` Art Nikpal
2021-04-30 10:59 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKaHn9LC19cduyrwxkDRAdM5pjgSPBCdZUjsEMgGqS7yVQS1-g@mail.gmail.com \
--to=email2tema@gmail.com \
--cc=art@khadas.com \
--cc=broonie@kernel.org \
--cc=christianshewitt@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gouwa@khadas.com \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=narmstrong@baylibre.com \
--cc=nick@khadas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).