From: Douglas Anderson <dianders@chromium.org>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: linux-rockchip@lists.infradead.org, briannorris@chromium.org,
mka@chromium.org, ryandcase@chromium.org, heiko@sntech.de,
Douglas Anderson <dianders@chromium.org>,
"David S. Miller" <davem@davemloft.net>,
Ganapathi Bhat <gbhat@marvell.com>,
linux-wireless@vger.kernel.org,
Amitkumar Karwar <amitkarwar@gmail.com>,
linux-kernel@vger.kernel.org,
Nishant Sarmukadam <nishants@marvell.com>,
netdev@vger.kernel.org, Xinming Hu <huxinming820@gmail.com>
Subject: [PATCH] mwifiex: Make resume actually do something useful again on SDIO cards
Date: Wed, 3 Apr 2019 21:01:06 -0700 [thread overview]
Message-ID: <20190404040106.40519-1-dianders@chromium.org> (raw)
The commit fc3a2fcaa1ba ("mwifiex: use atomic bitops to represent
adapter status variables") had a fairly straightforward bug in it. It
contained this bit of diff:
- if (!adapter->is_suspended) {
+ if (test_bit(MWIFIEX_IS_SUSPENDED, &adapter->work_flags)) {
As you can see the patch missed the "!" when converting to the atomic
bitops. This meant that the resume hasn't done anything at all since
that commit landed and suspend/resume for mwifiex SDIO cards has been
totally broken.
After fixing this mwifiex suspend/resume appears to work again, at
least with the simple testing I've done.
Fixes: fc3a2fcaa1ba ("mwifiex: use atomic bitops to represent adapter status variables")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
drivers/net/wireless/marvell/mwifiex/sdio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c
index a85648342d15..d5a70340a945 100644
--- a/drivers/net/wireless/marvell/mwifiex/sdio.c
+++ b/drivers/net/wireless/marvell/mwifiex/sdio.c
@@ -181,7 +181,7 @@ static int mwifiex_sdio_resume(struct device *dev)
adapter = card->adapter;
- if (test_bit(MWIFIEX_IS_SUSPENDED, &adapter->work_flags)) {
+ if (!test_bit(MWIFIEX_IS_SUSPENDED, &adapter->work_flags)) {
mwifiex_dbg(adapter, WARN,
"device already resumed\n");
return 0;
--
2.21.0.392.gf8f6787159e-goog
next reply other threads:[~2019-04-04 4:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-04 4:01 Douglas Anderson [this message]
2019-04-04 5:20 ` [PATCH] mwifiex: Make resume actually do something useful again on SDIO cards Kalle Valo
2019-04-04 20:47 ` Brian Norris
2019-04-05 3:35 ` Kalle Valo
2019-04-18 16:31 ` Doug Anderson
2019-04-19 4:03 ` Kalle Valo
2019-04-25 11:05 ` Kalle Valo
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=20190404040106.40519-1-dianders@chromium.org \
--to=dianders@chromium.org \
--cc=amitkarwar@gmail.com \
--cc=briannorris@chromium.org \
--cc=davem@davemloft.net \
--cc=gbhat@marvell.com \
--cc=heiko@sntech.de \
--cc=huxinming820@gmail.com \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mka@chromium.org \
--cc=netdev@vger.kernel.org \
--cc=nishants@marvell.com \
--cc=ryandcase@chromium.org \
/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).