From patchwork Fri Feb 10 21:55:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 9567543 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C958760572 for ; Fri, 10 Feb 2017 21:56:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8527285CE for ; Fri, 10 Feb 2017 21:56:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD069285D9; Fri, 10 Feb 2017 21:56:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 677BF285CE for ; Fri, 10 Feb 2017 21:56:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751229AbdBJV4I (ORCPT ); Fri, 10 Feb 2017 16:56:08 -0500 Received: from mail-pf0-f172.google.com ([209.85.192.172]:35775 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750910AbdBJV4G (ORCPT ); Fri, 10 Feb 2017 16:56:06 -0500 Received: by mail-pf0-f172.google.com with SMTP id 202so8964822pfx.2 for ; Fri, 10 Feb 2017 13:55:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=l1bwFCW9pK+w0DDjQzN2BmKD16EARtpEm8JDAUG4+tk=; b=MEozmfImw1T9yCOrcWQAXNTFqQ4qc9xT1HPAJYSqIaZuXOrNwVP1Gco3FWXOQD07rq aOmrnfJFf1C1HPO183UJNvY4z+jq4vjY3EOMIteoonceZCNdG7AGzXjvCpyMJSuGd+u8 iykEEgoXcHCRDfBIqYsiSPsg0jnxUaQOIuSIw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=l1bwFCW9pK+w0DDjQzN2BmKD16EARtpEm8JDAUG4+tk=; b=WLIivikoliATbL1XFsg5eA4uliMeK4ZqWm16laOfDga58+NxCqeWVmXVdW3LrQDRmz Ek7ky4ppBBLcROQ2pbqZxrS6st0bgY2Ardcxo1l3Pqflkl8OLsulj8klLteKC7y0zFIn zjmO802jQ8Cl3M33Lkrm00c3/HSgEpQLRDqaL/PoQoHT6YOdHnDU6gMylhVQxpXzf6+i gSt3EkB6eb3M6bJRNtnRWSeSGjliP4SZtVnPcPEWVMUa4LxHBUpqw9jqOHM9NzNTNXA+ 4uY7iY2hrNCVeL+qYXWKs7BI0JBT+w2Oe0BlKGBe2VL5PFcBDNj/NSOQy9ABLli0AxR6 l2fQ== X-Gm-Message-State: AMke39kJ5af5W/z3hBFnRx9O/+gZcds4UdXAfYwgk74sewdkWx71qDbCUfRh3Zbi7NvKRNDI X-Received: by 10.84.211.137 with SMTP id c9mr14103297pli.8.1486763730092; Fri, 10 Feb 2017 13:55:30 -0800 (PST) Received: from ban.mtv.corp.google.com ([172.22.64.120]) by smtp.gmail.com with ESMTPSA id x2sm7393071pfa.71.2017.02.10.13.55.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 10 Feb 2017 13:55:29 -0800 (PST) From: Brian Norris To: Amitkumar Karwar , Nishant Sarmukadam , Kalle Valo Cc: , linux-wireless@vger.kernel.org, Rajat Jain , Brian Norris Subject: [PATCH - REGRESSION] mwifiex: don't enable/disable IRQ 0 during suspend/resume Date: Fri, 10 Feb 2017 13:55:25 -0800 Message-Id: <20170210215525.139701-1-briannorris@chromium.org> X-Mailer: git-send-email 2.11.0.483.g087da7b7c-goog Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- This is a 4.10 regression. Not sure if it's critical to push quickly, or if it should just be tagged -stable and pushed in 4.11. drivers/net/wireless/marvell/mwifiex/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/main.c b/drivers/net/wireless/marvell/mwifiex/main.c index e5c3a8aa3929..c246d8efb6fc 100644 --- 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 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, @@ -1595,7 +1595,7 @@ static void mwifiex_probe_of(struct mwifiex_adapter *adapter) return; err_exit: - adapter->irq_wakeup = 0; + adapter->irq_wakeup = -1; } /*