Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1598228
| From | Brian Norris <briannorris@chromium.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/4] mwifiex: uninit wakeup info when removing device |
| Date | 2017-03-11 02:50 +0100 |
| Message-ID | <tjEkq-3VF-15@gated-at.bofh.it> (permalink) |
| References | <tjEkq-3VF-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
We manually init wakeup info, but we don't detach it on device removal.
This means that if we (for example) rmmod + modprobe the driver, the
device framework might return -EEXIST the second time, and we'll
complain in the logs:
[ 839.311881] mwifiex_pcie 0000:01:00.0: fail to init wakeup for mwifiex
AFAICT, there's no other negative effect.
But we can fix this by disabling wakeup on remove, similar to what a few
other drivers do (e.g., the power supply framework).
This code (and bug) has existed on SDIO for a while, but it got moved
around and enabled for PCIe with commit 853402a00823 ("mwifiex: Enable
WoWLAN for both sdio and pcie").
Signed-off-by: Brian Norris <briannorris@chromium.org>
---
drivers/net/wireless/marvell/mwifiex/main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/wireless/marvell/mwifiex/main.c b/drivers/net/wireless/marvell/mwifiex/main.c
index 43d040e02e4d..b62e03d11c2e 100644
--- a/drivers/net/wireless/marvell/mwifiex/main.c
+++ b/drivers/net/wireless/marvell/mwifiex/main.c
@@ -1718,6 +1718,9 @@ int mwifiex_remove_card(struct mwifiex_adapter *adapter)
wiphy_unregister(adapter->wiphy);
wiphy_free(adapter->wiphy);
+ if (adapter->irq_wakeup >= 0)
+ device_init_wakeup(adapter->dev, false);
+
/* Unregister device */
mwifiex_dbg(adapter, INFO,
"info: unregister device\n");
--
2.12.0.246.ga2ecc84866-goog
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/4] mwifiex: several bugfixes Brian Norris <briannorris@chromium.org> - 2017-03-11 02:50 +0100 [PATCH 4/4] mwifiex: pcie: de-duplicate buffer allocation code Brian Norris <briannorris@chromium.org> - 2017-03-11 02:50 +0100 [PATCH 3/4] mwifiex: uninit wakeup info when removing device Brian Norris <briannorris@chromium.org> - 2017-03-11 02:50 +0100 [PATCH 1/4] mwifiex: pcie: don't leak DMA buffers when removing Brian Norris <briannorris@chromium.org> - 2017-03-11 02:50 +0100
csiph-web