From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:41984 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753161AbdEIJV0 (ORCPT ); Tue, 9 May 2017 05:21:26 -0400 Subject: Patch "mwifiex: don't enable/disable IRQ 0 during suspend/resume" has been added to the 4.10-stable tree To: briannorris@chromium.org, gregkh@linuxfoundation.org, kvalo@codeaurora.org, rajatja@google.com Cc: , From: Date: Tue, 09 May 2017 11:20:09 +0200 Message-ID: <14943216097831@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled mwifiex: don't enable/disable IRQ 0 during suspend/resume to the 4.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: mwifiex-don-t-enable-disable-irq-0-during-suspend-resume.patch and it can be found in the queue-4.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 2447e2cad75239ae407c0f98acf12511354208c5 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Fri, 10 Feb 2017 13:55:25 -0800 Subject: mwifiex: don't enable/disable IRQ 0 during suspend/resume From: Brian Norris commit 2447e2cad75239ae407c0f98acf12511354208c5 upstream. 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 Acked-by: Rajat Jain Signed-off-by: Kalle Valo Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/marvell/mwifiex/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/drivers/net/wireless/marvell/mwifiex/main.c +++ b/drivers/net/wireless/marvell/mwifiex/main.c @@ -1569,13 +1569,13 @@ static void mwifiex_probe_of(struct mwif 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, @@ -1595,7 +1595,7 @@ static void mwifiex_probe_of(struct mwif return; err_exit: - adapter->irq_wakeup = 0; + adapter->irq_wakeup = -1; } /* Patches currently in stable-queue which might be from briannorris@chromium.org are queue-4.10/mwifiex-don-t-enable-disable-irq-0-during-suspend-resume.patch queue-4.10/mwifiex-debugfs-fix-sometimes-off-by-1-ssid-print.patch queue-4.10/mwifiex-set-adapter-dev-before-starting-to-use-mwifiex_dbg.patch