summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/marvell
diff options
context:
space:
mode:
authorBrian Norris <briannorris@chromium.org>2017-02-10 13:55:25 -0800
committerKalle Valo <kvalo@codeaurora.org>2017-02-15 11:14:10 +0200
commit2447e2cad75239ae407c0f98acf12511354208c5 (patch)
tree4efc194e404b39ba6d55d552025a50ed9a407ad9 /drivers/net/wireless/marvell
parent3a6282045b228f6de6abced74b793c71178fb948 (diff)
mwifiex: don't enable/disable IRQ 0 during suspend/resume
If we don't have an out-of-band wakeup IRQ configured through DT (as most platforms don't), then we fall out of this function with 'irq_wakeup == 0'. Other code (e.g., mwifiex_disable_wake() and mwifiex_enable_wake()) treats 'irq_wakeup >= 0' as a valid IRQ, and so we end up calling {enable,disable}_irq() on IRQ 0. That seems bad, so let's not do that. Same problem as fixed in this patch: https://patchwork.kernel.org/patch/9531693/ [PATCH v2 2/3] btmrvl: set irq_bt to -1 when failed to parse it with the difference that: (a) this one is actually a regression and (b) this affects both device tree and non-device-tree systems While fixing the regression, also drop the verbosity on the parse failure, so we don't see this when a DT node is present but doesn't have an interrupt property (this is perfectly legal): [ 21.999000] mwifiex_pcie 0000:01:00.0: fail to parse irq_wakeup from device tree Fixes: 853402a00823 ("mwifiex: Enable WoWLAN for both sdio and pcie") Signed-off-by: Brian Norris <briannorris@chromium.org> Acked-by: Rajat Jain <rajatja@google.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/marvell')
-rw-r--r--drivers/net/wireless/marvell/mwifiex/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/main.c b/drivers/net/wireless/marvell/mwifiex/main.c
index 9d80180a5519..5ebca1d0cfc7 100644
--- a/drivers/net/wireless/marvell/mwifiex/main.c
+++ b/drivers/net/wireless/marvell/mwifiex/main.c
@@ -1519,13 +1519,13 @@ static void mwifiex_probe_of(struct mwifiex_adapter *adapter)
struct device *dev = adapter->dev;
if (!dev->of_node)
- return;
+ goto err_exit;
adapter->dt_node = dev->of_node;
adapter->irq_wakeup = irq_of_parse_and_map(adapter->dt_node, 0);
if (!adapter->irq_wakeup) {
- dev_info(dev, "fail to parse irq_wakeup from device tree\n");
- return;
+ dev_dbg(dev, "fail to parse irq_wakeup from device tree\n");
+ goto err_exit;
}
ret = devm_request_irq(dev, adapter->irq_wakeup,
@@ -1545,7 +1545,7 @@ static void mwifiex_probe_of(struct mwifiex_adapter *adapter)
return;
err_exit:
- adapter->irq_wakeup = 0;
+ adapter->irq_wakeup = -1;
}
/*